Skip to content

Commit 5af299d

Browse files
blakeli0lqiu96
authored andcommitted
chore: Fix pre-commit. (#1294)
1 parent 5fce328 commit 5af299d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

.githooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fi
118118
if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] || [ $NUM_UNIT_GOLDEN_FILES_CHANGED -gt 0 ]
119119
then
120120
echo_status "Checking unit tests..."
121-
mvn test
121+
mvn install --batch-mode --no-transfer-progress -Dcheckstyle.skip -Dfmt.skip
122122
TEST_STATUS=$?
123123
if [ $TEST_STATUS != 0 ]
124124
then
@@ -133,7 +133,7 @@ if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] \
133133
|| [ $NUM_INTEGRATION_BAZEL_FILES_CHANGED -gt 0 ]
134134
then
135135
echo_status "Checking integration tests..."
136-
bazel --batch test --disk_cache="$BAZEL_CACHE_DIR" //test/integration/...
136+
bazelisk --batch test --disk_cache="$BAZEL_CACHE_DIR" //test/integration/...
137137
TEST_STATUS=$?
138138
if [ $TEST_STATUS != 0 ]
139139
then

DEVELOPMENT.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
```sh
1212
cp .githooks/pre-commit .git/hooks/pre-commit
1313
```
14-
15-
### Note: You may see this error with the pre-commits due to the monorepo migration:
16-
```
17-
[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:
18-
[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
19-
[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
20-
[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
21-
```
22-
Remove the pre-commit hooks. Tracking the issue in https://github.com/googleapis/gapic-generator-java/issues/1253
2314

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

0 commit comments

Comments
 (0)