Skip to content

Commit f21b9d0

Browse files
author
Vincent Potucek
committed
Add rewrite support for staticanalysis.RemoveUnused and maven.BestPractices
1 parent f6b2e04 commit f21b9d0

File tree

25 files changed

+230
-184
lines changed

25 files changed

+230
-184
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,16 @@ jobs:
5151
cache: 'maven'
5252
- name: 'Install'
5353
shell: bash
54-
run: ./mvnw -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dtoolchain.skip install -U -DskipTests=true -f $ROOT_POM
54+
run: ./mvnw -DrewriteSkip=true -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dtoolchain.skip install -U -DskipTests=true -f $ROOT_POM
5555
- name: 'Test'
5656
shell: bash
57-
run: ./mvnw -B -P!standard-with-extra-repos -Dtoolchain.skip verify -U -Dmaven.javadoc.skip=true -Dsurefire.toolchain.version=${{ matrix.java }} -f $ROOT_POM
57+
run: ./mvnw -DrewriteSkip=true -B -P!standard-with-extra-repos -Dtoolchain.skip verify -U -Dmaven.javadoc.skip=true -Dsurefire.toolchain.version=${{ matrix.java }} -f $ROOT_POM
58+
# Apple M2 (4E+4P+10GPU 8GB)
59+
# Total time: 44.504 s
60+
# TODO: consider switch invert, executing on CI only (if acceptable build time).
61+
# - name: 'Rewrite'
62+
# shell: bash
63+
# run: ./mvnw rewrite:dryRun -B -P!standard-with-extra-repos -Dtoolchain.skip -U -Dmaven.javadoc.skip=true -Dsurefire.toolchain.version=${{ matrix.java }} -f $ROOT_POM
5864
- name: 'Print Surefire reports'
5965
# Note: Normally a step won't run if the job has failed, but this causes it to
6066
if: ${{ failure() }}

android/guava-testlib/src/com/google/common/escape/testing/package-info.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@
2222
*/
2323
@CheckReturnValue
2424
package com.google.common.escape.testing;
25-
26-
import com.google.errorprone.annotations.CheckReturnValue;

android/guava-testlib/src/com/google/common/testing/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@
2121
@CheckReturnValue
2222
@NullMarked
2323
package com.google.common.testing;
24-
25-
import com.google.errorprone.annotations.CheckReturnValue;
26-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/base/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,3 @@
5959
@CheckReturnValue
6060
@NullMarked
6161
package com.google.common.base;
62-
63-
import com.google.errorprone.annotations.CheckReturnValue;
64-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/cache/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,3 @@
3131
@CheckReturnValue
3232
@NullMarked
3333
package com.google.common.cache;
34-
35-
import com.google.errorprone.annotations.CheckReturnValue;
36-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/collect/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,3 @@
122122
@CheckReturnValue
123123
@NullMarked
124124
package com.google.common.collect;
125-
126-
import com.google.errorprone.annotations.CheckReturnValue;
127-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/escape/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,3 @@
2727
@CheckReturnValue
2828
@NullMarked
2929
package com.google.common.escape;
30-
31-
import com.google.errorprone.annotations.CheckReturnValue;
32-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/eventbus/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@
2222
@CheckReturnValue
2323
@NullMarked
2424
package com.google.common.eventbus;
25-
26-
import com.google.errorprone.annotations.CheckReturnValue;
27-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/graph/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@
2424
@CheckReturnValue
2525
@NullMarked
2626
package com.google.common.graph;
27-
28-
import com.google.errorprone.annotations.CheckReturnValue;
29-
import org.jspecify.annotations.NullMarked;

android/guava/src/com/google/common/hash/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@
2222
@CheckReturnValue
2323
@NullMarked
2424
package com.google.common.hash;
25-
26-
import com.google.errorprone.annotations.CheckReturnValue;
27-
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)