Skip to content

Commit

Permalink
chore: Fix pre-commit. (#1294)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeli0 authored and lqiu96 committed Feb 23, 2023
1 parent 5fce328 commit 5af299d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fi
if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] || [ $NUM_UNIT_GOLDEN_FILES_CHANGED -gt 0 ]
then
echo_status "Checking unit tests..."
mvn test
mvn install --batch-mode --no-transfer-progress -Dcheckstyle.skip -Dfmt.skip
TEST_STATUS=$?
if [ $TEST_STATUS != 0 ]
then
Expand All @@ -133,7 +133,7 @@ if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] \
|| [ $NUM_INTEGRATION_BAZEL_FILES_CHANGED -gt 0 ]
then
echo_status "Checking integration tests..."
bazel --batch test --disk_cache="$BAZEL_CACHE_DIR" //test/integration/...
bazelisk --batch test --disk_cache="$BAZEL_CACHE_DIR" //test/integration/...
TEST_STATUS=$?
if [ $TEST_STATUS != 0 ]
then
Expand Down
9 changes: 0 additions & 9 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
```sh
cp .githooks/pre-commit .git/hooks/pre-commit
```

### Note: You may see this error with the pre-commits due to the monorepo migration:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project gapic-generator-java: Compilation failure: Compilation failure:
[ERROR] gapic-generator-java/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/rest/ServiceClientTestClassComposer.java:[19,43] package com.google.api.gax.httpjson.testing does not exist
[ERROR] gapic-generator-java/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/rest/ServiceClientTestClassComposer.java:[24,38] package com.google.api.gax.rpc.testing does not exist
[ERROR] gapic-generator-java/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/ServiceClientTestClassComposer.java:[18,39] package com.google.api.gax.grpc.testing does not exist
```
Remove the pre-commit hooks. Tracking the issue in https://github.com/googleapis/gapic-generator-java/issues/1253

3. Install [`bazelisk`](https://github.com/bazelbuild/bazelisk) in your `PATH`.

Expand Down

0 comments on commit 5af299d

Please sign in to comment.