-
Notifications
You must be signed in to change notification settings - Fork 90
Add GDLint as a workflow and re-format files to fit Godot's style guide #437
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
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5d9554c
Add GDLint as a workflow
BenjaTK 313adb3
Update gdlint.yml
BenjaTK 1413d92
Update gdlint.yml
BenjaTK 90ffa69
Update workflow name.
BenjaTK 8ea9758
Call all workflows from a single file
BenjaTK 37487ae
Update on-prs.yml
BenjaTK f453a0a
Update on-prs.yml
BenjaTK b96cfef
Comment out unit tests (for now)
BenjaTK 610eae2
Update names
BenjaTK 2938d1e
Re-format `editor/`
BenjaTK 51aaca9
Re-format `graph/`
BenjaTK 7001972
Re-format rest of files
BenjaTK 70c0171
Update gdlint.yml
BenjaTK 7ef5a9f
Update gdlint.yml
BenjaTK e86f29f
Update workflows
BenjaTK 86aa4ab
Fix errors
BenjaTK 139f07a
Fix formatting
BenjaTK 3a9322a
Fix workflows
BenjaTK ca03e9c
Fix more formatting and update max public methods
BenjaTK 75bf4ab
Fix trailing whitespaces
BenjaTK a9b92b0
Fix more formatting
BenjaTK 63669f5
Update gaea_graph_migration.gd
BenjaTK d2b9907
Apply automatic changes
BenjaTK 641936c
Rename gdlint job
BenjaTK 01bd54f
Remove multiline `_get_data` functions
BenjaTK be416be
Resolve conversations
BenjaTK 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,48 @@ | ||
| class-definitions-order: | ||
| - tools | ||
| - classnames | ||
| - extends | ||
| - docstrings | ||
| - signals | ||
| - enums | ||
| - consts | ||
| - exports | ||
| - pubvars | ||
| - prvvars | ||
| - onreadypubvars | ||
| - onreadyprvvars | ||
| - staticvars | ||
| - others | ||
| class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*) | ||
| class-name: ([A-Z][a-z0-9]*)+ | ||
| class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
| comparison-with-itself: null | ||
| constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)* | ||
| disable: [] | ||
| duplicated-load: null | ||
| enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*' | ||
| enum-name: ([A-Z][a-z0-9]*)+ | ||
| excluded_directories: !!set | ||
| .git: null | ||
| expression-not-assigned: null | ||
| function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
| function-arguments-number: 10 | ||
| function-name: (_on_([A-Z][a-z0-9]*)+(_[a-z0-9]+)*|_?[a-z][a-z0-9]*(_[a-z0-9]+)*) | ||
| function-preload-variable-name: ([A-Z][a-z0-9]*)+ | ||
| function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' | ||
| load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*) | ||
| loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* | ||
| max-file-lines: 1000 | ||
| max-line-length: 140 | ||
Zehir marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| max-public-methods: 999 | ||
| max-returns: 20 | ||
| mixed-tabs-and-spaces: null | ||
| no-elif-return: null | ||
| no-else-return: null | ||
| private-method-call: null | ||
| signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' | ||
| sub-class-name: _?([A-Z][a-z0-9]*)+ | ||
| tab-characters: 1 | ||
| trailing-whitespace: null | ||
| unnecessary-pass: null | ||
| unused-argument: null | ||
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,43 @@ | ||
| name: GHA | ||
|
|
||
| run-name: ${{ github.head_ref || github.ref_name }}-gdlint | ||
|
|
||
| on: | ||
| workflow_call: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| gdlint: | ||
| name: Formatting Checks | ||
| runs-on: 'ubuntu-22.04' | ||
| timeout-minutes: 5 | ||
|
|
||
| steps: | ||
| - name: Checkout GdUnit Repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| lfs: true | ||
|
|
||
| - name: "Setup GDLint" | ||
| uses: Scony/godot-gdscript-toolkit@master | ||
| with: | ||
| version: 4.5.0 | ||
|
|
||
| - name: "Run GDLint" | ||
| id: run-gdlint | ||
| shell: bash | ||
| run: | | ||
| mkdir -p reports/gdlint/ | ||
| gdlint addons/gaea/editor/ | tee reports/gdlint/editor.txt | ||
| gdlint addons/gaea/graph/ | tee reports/gdlint/graph.txt | ||
| gdlint addons/gaea/nodes/ | tee reports/gdlint/nodes.txt | ||
| gdlint addons/gaea/resources/ | tee reports/gdlint/resources.txt | ||
|
|
||
| - name: "Upload GDLint Report" | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: gdlint.txt | ||
| path: reports/gdlint/** | ||
| if-no-files-found: error | ||
| compression-level: 0 # no compression |
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,67 @@ | ||
| name: GHA | ||
|
|
||
| run-name: ${{ github.head_ref || github.ref_name }}-gha | ||
|
|
||
| on: # yamllint disable-line rule:truthy | ||
| pull_request: | ||
| paths-ignore: | ||
| - '**.yml' | ||
| - '**.md' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: gha-${{ github.event.number }} | ||
| cancel-in-progress: true | ||
|
|
||
|
|
||
| jobs: | ||
| gdlint: | ||
| if: ${{ !cancelled() }} | ||
| name: '📝 GDLint' | ||
| uses: ./.github/workflows/gdlint.yml | ||
|
|
||
| generation_testing: | ||
| name: '🐞 Generation' | ||
| uses: ./.github/workflows/generation_testing.yml | ||
|
|
||
| permissions: | ||
| actions: write | ||
| checks: write | ||
| contents: write | ||
| pull-requests: write | ||
| statuses: write | ||
|
|
||
| nodes_testing: | ||
| name: '🐞 Node' | ||
| uses: ./.github/workflows/nodes_testing.yml | ||
|
|
||
| permissions: | ||
| actions: write | ||
| checks: write | ||
| contents: write | ||
| pull-requests: write | ||
| statuses: write | ||
|
|
||
| renderers_testing: | ||
| name: '🐞 Renderers' | ||
| uses: ./.github/workflows/renderers_testing.yml | ||
|
|
||
| permissions: | ||
| actions: write | ||
| checks: write | ||
| contents: write | ||
| pull-requests: write | ||
| statuses: write | ||
|
|
||
| other_testing: | ||
| name: '🐞 Other' | ||
| uses: ./.github/workflows/other_testing.yml | ||
|
|
||
| permissions: | ||
| actions: write | ||
| checks: write | ||
| contents: write | ||
| pull-requests: write | ||
| statuses: write | ||
|
|
||
|
|
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
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.