-
Notifications
You must be signed in to change notification settings - Fork 35
Enable linting #732
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
+5,025
−4,013
Merged
Enable linting #732
Changes from 72 commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
b8a502f
Add Github Actions for running code linters
maxstack 9939b23
Fix linting issues.
maxstack 1c298e9
Update GH workflow so linting always runs befor any other jobs
maxstack 572bdd0
Update GH workflow so linting always runs befor any other jobs
maxstack 47c9ffe
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack f6477c7
Fix linting issues on the merge of origin/main
maxstack 684123f
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack dedef28
Fix linting issues on the merge of origin/main
maxstack db6fca4
Use the head ref for workflow concurrency
maxstack 86215ab
Output the path filter result of the workflow
maxstack 87bf78b
Tweak github action used to detect changed paths on push/pull request
maxstack 20d0874
Tweak github action used to detect changed paths on push/pull request
maxstack dbebb2a
Tweak github action used to detect changed paths on push/pull request
maxstack 0457142
Tweak github action used to detect changed paths on push/pull request
maxstack 5ce0b00
Tweak github action used to detect changed paths on push/pull request
maxstack 2b53a02
Tweak github action used to detect changed paths on push/pull request
maxstack df0bb62
Tweak github action used to detect changed paths on push/pull request
maxstack 55d26e2
Tweak github action used to detect changed paths on push/pull request
maxstack 59e2c38
Tweak github action used to detect changed paths on push/pull request
maxstack b965ecb
Tweak github action used to detect changed paths on push/pull request
maxstack 5b02436
Tweak github action used to detect changed paths on push/pull request
maxstack 8131025
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 2f698a3
Tweak github action used to detect changed paths on push/pull request
maxstack e17401d
Tweak github action used to detect changed paths on push/pull request
maxstack 642888a
Tweak github action used to detect changed paths on push/pull request
maxstack c35c930
Tweak github action used to detect changed paths on push/pull request
maxstack 1e165bb
Tweak github action used to detect changed paths on push/pull request
maxstack c046991
Tweak github action used to detect changed paths on push/pull request
maxstack b29f846
Tweak github action used to detect changed paths on push/pull request
maxstack 4531d42
Tweak github action used to detect changed paths on push/pull request
maxstack fc6e6e7
Tweak github action used to detect changed paths on push/pull request
maxstack 8d3261f
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 7ed8866
Troubleshooting: ansible.builtin.user
maxstack bdb0bbf
Troubleshooting: debugging temporarily added
maxstack 7f8e61a
Shift pylint invalid-name linting behond python bang line
maxstack de0b35f
Temporarily disable the ansible galaxy requirements validation
maxstack 66f0e7e
Reverting changes made to ansible.builtin.user and ansible.builtin.gr…
maxstack ef9147d
Arguments are dicts not labels
maxstack 6a698b2
Preserve file permissions on .ssh directory contents
maxstack 32326a9
Wherever we use become_user set become: true, keeps the linter happy …
maxstack bb6abed
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 5a55e6c
Fix linting on merge of origin/main
maxstack 9a3b4da
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack afcf8df
Fix linting on merge of origin/main
maxstack 8eed9d9
Update cluster image - using fatimage built from ci/linting branch
maxstack a3086ad
Add comments to workflow files detailing the CI workflow and enable t…
maxstack 4e68527
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack ab3f44d
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 7fadc19
Fix workflow execution:
maxstack 0c4dbdd
Fix linting issues from merge of origin/main
maxstack 3f9c6b7
Exclude 'ansible/roles/compute_init/files/compute-init.yml' from ansi…
maxstack 4eeb7ae
Temporarily disable Rocky 8 to speed up testing and reduce CI resources
maxstack 53786c2
Fix some bad ansible-lint line-length markup
maxstack 0f2deb9
Fix ansible-lint markup for line-length
maxstack a875531
Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
maxstack c221045
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 2f194ce
Revert ansible.builtin.command to ansible.builtin.shell due to missed…
maxstack 7501c89
Disable extra-build.yml workflow which has previously passed so we ca…
maxstack 917c82e
Disable concurrency to see if this is killing stackhpc.yml
maxstack cc3b09d
Remove concurrency from extr.yml, stackhpc.yml, and trivyscan.yml as …
maxstack 69359d0
Enable ansible-lint
maxstack 21ac0b6
Enable triggering of all workflows from the main CI workflow
maxstack 83e4d43
Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
maxstack 209632b
Fix bad ansible-lint markup affecting the bang line
maxstack bfeedd8
Reduce workflow CI resources whilst fixing test deploy and reimage wo…
maxstack 3fb3022
Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
maxstack 0d09fb4
Enable Rocky Linux 8 - disabled to speed up testing
maxstack 0d16b95
Enable all CI workflows
maxstack d8a8196
Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
maxstack 63e848d
Remove empty line between ansible "when" and "block" added by ansible…
maxstack 68f7277
Enable check for ansible galaxy requirements
maxstack 0be53fc
Merge remote-tracking branch 'origin/main' into ci/enable-linting
maxstack 930223f
Revert the ansible collections path to ansible/collections so we don'…
maxstack b3d0212
Bump CI image
maxstack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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,24 @@ | ||
--- | ||
skip_list: | ||
- role-name | ||
# Unresolved issues with parsing jinja in multiline strings | ||
# https://github.com/ansible/ansible-lint/issues/3935 | ||
- jinja[spacing] | ||
- galaxy[no-changelog] | ||
- meta-runtime[unsupported-version] | ||
|
||
warn_list: | ||
- name[missing] | ||
- name[play] | ||
- var-naming | ||
|
||
exclude_paths: | ||
- actionlint.yml | ||
- .ansible/ | ||
- .github/ | ||
# Rule 'syntax-check' is unskippable, you cannot use it in 'skip_list' or 'warn_list'. | ||
# It breaks the parser which takes place before the linter, the only option is to exclude the file. | ||
- ansible/roles/filebeat/tasks/runtime.yml | ||
- environments/common/files/filebeat/filebeat.yml | ||
# Rule 'load-failure[filenotfounderror]' is also unskippable | ||
- ansible/roles/compute_init/files/compute-init.yml |
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,4 @@ | ||
--- | ||
skip-check: | ||
# Requires all blocks to have rescue: - not considered appropriate | ||
- CKV2_ANSIBLE_3 |
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,8 @@ | ||
# The is primarily used to alter the behaviour of linters executed by super-linter. | ||
# See https://editorconfig.org/ | ||
|
||
# shfmt will default to indenting shell scripts with tabs, | ||
# define the indent as 2 spaces | ||
[{.github/bin,dev}/*.sh] | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
../../.checkov.yaml |
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 @@ | ||
../../.python-lint |
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 @@ | ||
../../.shellcheckrc |
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 @@ | ||
../../.yamllint.yml |
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 @@ | ||
../../actionlint.yml |
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,47 @@ | ||
--- | ||
name: Lint | ||
|
||
on: # yamllint disable-line rule:truthy | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
# To report GitHub Actions status checks | ||
statuses: write | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
# To report GitHub Actions status checks | ||
statuses: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# super-linter needs the full git history to get the | ||
# list of files that changed across commits | ||
fetch-depth: 0 | ||
submodules: true | ||
|
||
- name: Run ansible-lint | ||
uses: ansible/[email protected] | ||
|
||
- name: Load super-linter configuration | ||
# Use grep inverse matching to exclude eventual comments in the .env file | ||
# because the GitHub Actions command to set environment variables doesn't | ||
# support comments. | ||
# yamllint disable-line rule:line-length | ||
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable | ||
run: grep -v '^#' super-linter.env >> "$GITHUB_ENV" | ||
if: always() | ||
|
||
- name: Run super-linter | ||
uses: super-linter/[email protected] | ||
if: always() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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.