-
-
Notifications
You must be signed in to change notification settings - Fork 971
Enforce code style #15016
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
Merged
Merged
Enforce code style #15016
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
55af4eb
style: conform to style rules
matrei 3bb575b
fix: add style enforcement
matrei 1f4739e
ci: run style checks in dedicated workflow
matrei 73e3278
fix: `skipCodeStyle` task condition
matrei ae2efa2
ci: add report upload
matrei 6fc1cc6
ci: set correct report directory
matrei 12a1270
chore: trigger code style errors
matrei 20468a4
ci: specify code style reports more granular
matrei 37355fc
ci: add `--continue` to get all codestyle errors
matrei 8238b0a
ci: set correct `skipCodeStyle` condition for `grails-gradle`
matrei 1b6d267
ci: stop using Gradle --continue for code style checks
matrei 5dd8fcd
Revert "chore: trigger code style errors"
matrei d4214c8
style: conform to code style
matrei 43dcd6f
refactor(build): dry up `code-style-config`
matrei cc80268
fix(build): align code style checking in `grails-forge`
matrei 611c745
ci: add `grails-forge` code style checking
matrei ef17c7f
ci: fix typos
matrei 40b134c
ci: remove redundant gradle param
matrei c2118ca
docs: add `skipCodeStyle` to `DEVELOPMENT.md`
matrei 955b423
docs: update `DEVELOPMENT.md`
matrei 6395939
docs: update `DEVELOPMENT.md`
matrei 2dbf541
docs: update `CONTRIBUTING.md`
matrei 8b1a7d4
Merge branch '7.0.x' into enforce-code-style
matrei 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: "Code Style" | ||
| on: | ||
| push: | ||
| branches: | ||
| - '[0-9]+.[0-9]+.x' | ||
| pull_request: | ||
| workflow_dispatch: | ||
| # queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| jobs: | ||
| check_core_projects: | ||
| name: "Core Projects" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: "🌐 Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | ||
| run: curl -s https://api.ipify.org | ||
| - name: "📥 Checkout repository" | ||
| uses: actions/checkout@v4 | ||
| - name: "☕️ Setup JDK" | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: liberica | ||
| java-version: 17 | ||
| - name: "🐘 Setup Gradle" | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | ||
| - name: "🔎 Check Core Projects" | ||
| run: ./gradlew codeStyle | ||
| - name: "📤 Upload Failure Reports" | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: core-reports | ||
| path: | | ||
| **/build/reports/checkstyle/ | ||
| **/build/reports/codenarc/ | ||
| check_gradle_plugin_projects: | ||
| name: "Gradle Plugin Projects" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: "🌐 Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | ||
| run: curl -s https://api.ipify.org | ||
| - name: "📥 Checkout repository" | ||
| uses: actions/checkout@v4 | ||
| - name: "☕️ Setup JDK" | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: liberica | ||
| java-version: 17 | ||
| - name: "🐘 Setup Gradle" | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | ||
| - name: "🔎 Check Gradle Plugin Projects" | ||
| working-directory: grails-gradle | ||
| run: ./gradlew codeStyle | ||
| - name: "📤 Upload Failure Reports" | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: gradle-plugin-reports | ||
| path: | | ||
| grails-gradle/**/build/reports/checkstyle/ | ||
| grails-gradle/**/build/reports/codenarc/ | ||
| check_grails_forge_projects: | ||
| name: "Forge Projects" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: "🌐 Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | ||
| run: curl -s https://api.ipify.org | ||
| - name: "📥 Checkout repository" | ||
| uses: actions/checkout@v4 | ||
| - name: "☕️ Setup JDK" | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: liberica | ||
| java-version: 17 | ||
| - name: "🐘 Setup Gradle" | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | ||
| - name: "🔎 Check Forge Projects" | ||
| working-directory: grails-forge | ||
| run: ./gradlew codeStyle | ||
| - name: "📤 Upload Failure Reports" | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: forge-reports | ||
| path: | | ||
| grails-forge/**/build/reports/checkstyle/ | ||
| grails-forge/**/build/reports/checkstyleNohttp/ | ||
| grails-forge/**/build/reports/codenarc/ | ||
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 |
|---|---|---|
|
|
@@ -161,3 +161,4 @@ jobs: | |
| run: > | ||
| ./gradlew build | ||
| -x groovydoc | ||
| -PskipCodeStyle | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
| <!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd"> | ||
| <suppressions> | ||
| </suppressions> |
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.
Uh oh!
There was an error while loading. Please reload this page.