-
Notifications
You must be signed in to change notification settings - Fork 506
[rewrite] add CodeCleanup
#2812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c131cac
[rewrite] add `CodeCleanup`
0641ba0
[rewrite] add `CodeCleanup`
91c39a8
[rewrite] add `CodeCleanup`
a36e4a6
[rewrite] add `CodeCleanup`
71b299c
[rewrite] add `CodeCleanup`
f055534
[rewrite] add `CodeCleanup`
19acd46
[rewrite] add `CodeCleanup`
a52d33d
[rewrite] add `CodeCleanup`
c89207c
[rewrite] add `CodeCleanup`
2ac524e
[rewrite] add `CodeCleanup`
5def918
[rewrite] add `CodeCleanup`
b20f1b7
[rewrite] add `CodeCleanup`
8731414
[rewrite] add `CodeCleanup`
dc1ba60
[rewrite] add `CodeCleanup`
5f4b4c0
[rewrite] add `CodeCleanup`
5a9b6f3
[rewrite] add `CodeCleanup`
bd88ca5
[rewrite] add `CodeCleanup`
ddfcbff
[rewrite] add `CodeCleanup`
b063218
[rewrite] add `CodeCleanup`
92c5103
[rewrite] add `CodeCleanup`
edf6b28
[rewrite] add `CodeCleanup`
6f31ca4
[rewrite] add `CodeCleanup`
bca2009
[rewrite] add `CodeCleanup`
953c0b6
[rewrite] add `CodeCleanup`
e1e970a
[rewrite] add `CodeCleanup`
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ on: | |
| push: | ||
| branches: [main, release] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
@@ -19,34 +18,35 @@ jobs: | |
| buildcacheuser: ${{ secrets.BUILDCACHE_USER }} | ||
| buildcachepass: ${{ secrets.BUILDCACHE_PASS }} | ||
| steps: | ||
| - name: Checkout | ||
| - name: Checkout Code 📥 | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| distribution: temurin | ||
| java-version: 21 | ||
| - name: gradle caching | ||
| - name: Setup Gradle 🐘 | ||
| uses: gradle/actions/setup-gradle@v5 | ||
| - name: Spotless ✨ | ||
| run: ./gradlew spotlessCheck | ||
| run: ./gradlew clean spotlessCheck | ||
| - name: Error Prone 🚧 | ||
| run: ./gradlew clean assemble | ||
| - name: Test Classes ⚙️ | ||
| run: ./gradlew clean testClasses | ||
| - name: Rewrite ♻️ | ||
| run: ./gradlew rewriteDryRun | ||
| - name: assemble testClasses | ||
| run: ./gradlew assemble testClasses | ||
| run: ./gradlew clean rewriteDryRun | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. try with |
||
| build: | ||
| name: Build 🏗️ | ||
| needs: sanity-check | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| kind: [maven, gradle] | ||
| # Test on the latest Java version once Gradle & Maven support it. | ||
| jre: [17, 21, 24] | ||
| jre: [17, 21, 24] # test on the latest Java version once Gradle & Maven support it. | ||
| os: [ubuntu-latest, windows-latest] | ||
| include: | ||
| # npm on linux only (crazy slow on windows) | ||
| - kind: npm | ||
| - kind: npm # npm on linux only (crazy slow on windows). | ||
| jre: 17 | ||
| os: ubuntu-latest | ||
| - kind: shfmt | ||
|
|
@@ -58,66 +58,64 @@ jobs: | |
| os: ubuntu-latest | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout | ||
| - name: Checkout Code 📥 | ||
| uses: actions/checkout@v6 | ||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| distribution: temurin | ||
| java-version: ${{ matrix.jre }} | ||
| - name: gradle caching | ||
| - name: Setup Gradle 🐘 | ||
| uses: gradle/actions/setup-gradle@v5 | ||
| - name: build (maven-only) | ||
| - name: Build Maven 🪶 | ||
| if: matrix.kind == 'maven' | ||
| run: ./gradlew :plugin-maven:build -x spotlessCheck -x rewriteDryRun | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - name: build (everything-but-maven) | ||
| run: ./gradlew :plugin-maven:build -x spotlessCheck | ||
| - name: Build Gradle 🐘 | ||
| if: matrix.kind == 'gradle' | ||
| run: ./gradlew build -x spotlessCheck -x rewriteDryRun -PSPOTLESS_EXCLUDE_MAVEN=true | ||
| - name: test npm | ||
| run: ./gradlew build -PSPOTLESS_EXCLUDE_MAVEN=true -x spotlessCheck | ||
| - name: Test npm 📊 | ||
| if: matrix.kind == 'npm' | ||
| run: ./gradlew testNpm | ||
| - name: Setup go | ||
| - name: Setup Go | ||
| if: matrix.kind == 'shfmt' | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: 'stable' | ||
| - name: Install shfmt | ||
| go-version: stable | ||
| - name: Install shfmt 📥 | ||
| if: matrix.kind == 'shfmt' | ||
| run: | | ||
| go install mvdan.cc/sh/v3/cmd/shfmt@${{ matrix.shfmt-version }} | ||
| - name: Test shfmt | ||
| run: go install mvdan.cc/sh/v3/cmd/shfmt@${{ matrix.shfmt-version }} | ||
| - name: Test shfmt 📊 | ||
| if: matrix.kind == 'shfmt' | ||
| run: ./gradlew testShfmt | ||
| - name: Test idea | ||
| - name: Test IDEA 📊 | ||
| if: matrix.kind == 'idea' | ||
| run: | | ||
| download_link=$(curl https://data.services.jetbrains.com/products/releases\?code\=IIC\&latest\=true\&type\=release | jq -r '.IIC[0].downloads.linux.link') | ||
| curl --location "$download_link" -o idea.tar.gz | ||
| curl --location $download_link -o idea.tar.gz | ||
| tar -xf idea.tar.gz | ||
| cd idea-IC* | ||
| export PATH=${PATH}:$(pwd)/bin | ||
| cd .. | ||
| ./gradlew testIdea | ||
| - name: junit result | ||
| - name: Junit Report 📋 | ||
| uses: mikepenz/action-junit-report@v6 | ||
| if: always() # always run even if the previous step fails | ||
| if: always() # always run even if the previous step fails. | ||
| with: | ||
| check_name: JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }} | ||
| report_paths: '*/build/test-results/*/TEST-*.xml' | ||
| check_retries: true | ||
|
|
||
| # Status check that is required in branch protection rules. | ||
| final-status: | ||
| complete: # this check is required in branch protection rules. | ||
| name: Complete ✅ | ||
| needs: | ||
| - sanity-check | ||
| - build | ||
| runs-on: ubuntu-latest | ||
| if: always() | ||
| steps: | ||
| - name: Check | ||
| - name: Check 🦉 | ||
| run: | | ||
| results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}') | ||
| if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then | ||
| echo "One or more required jobs failed" | ||
| if ! grep -q -v -E '(failure|cancelled)' <<< $results; then | ||
| echo ❌ One or more required jobs failed. | ||
| exit 1 | ||
| fi | ||
| echo "All required jobs completed successfully." | ||
| echo ✅ All required jobs completed successfully. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
testlib/src/main/java/com/diffplug/spotless/ReflectionUtil.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is came into live as one job:
as its one dedicated goal why not run it also in dedicated job?