-
Notifications
You must be signed in to change notification settings - Fork 3
Add linting on pull request #35
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,7 @@ | ||
| --- | ||
| skip_list: | ||
| - var-naming[no-role-prefix] | ||
| exclude_paths: | ||
| - .github | ||
| - ui-meta/ | ||
| - assets/ | ||
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,11 @@ | ||
| --- | ||
| skip-check: | ||
| # Requires all urls used with ansible.builtin.uri to be HTTPS | ||
|
seunghun1ee marked this conversation as resolved.
|
||
| # Redirection to HTTPS is handled by the Kubernetes ingress | ||
| - CKV2_ANSIBLE_1 | ||
| # Requires all blocks to have rescue: - not considered appropriate | ||
| - CKV2_ANSIBLE_3 | ||
| - CKV2_GHA_1 | ||
| skip-path: | ||
| - vendor/ | ||
| - collections/ | ||
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 | ||
| [bin/*] | ||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../.checkov.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
| 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/ansible-lint@v25.4.0 | ||
|
|
||
| - 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/super-linter@v7.3.0 | ||
| if: always() | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,26 @@ | ||
| --- | ||
| name: Build and test PR | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: read | ||
| # To report GitHub Actions status checks | ||
| statuses: write | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - ready_for_review | ||
| - reopened | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/lint.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,24 @@ | ||
| --- | ||
| extends: default | ||
|
|
||
| rules: | ||
| brackets: | ||
| forbid: non-empty | ||
| comments: | ||
| # https://github.com/prettier/prettier/issues/6780 | ||
| min-spaces-from-content: 1 | ||
| # https://github.com/adrienverge/yamllint/issues/384 | ||
| comments-indentation: false | ||
| document-start: disable | ||
| # 160 chars was the default used by old E204 rule, but | ||
| # you can easily change it or disable in your .yamllint file. | ||
| line-length: | ||
| max: 160 | ||
| # We are adding an extra space inside braces as that's how prettier does it | ||
| # and we are trying not to fight other linters. | ||
| braces: | ||
| min-spaces-inside: 0 # yamllint defaults to 0 | ||
| max-spaces-inside: 1 # yamllint defaults to 0 | ||
| octal-values: | ||
| forbid-implicit-octal: true # yamllint defaults to false | ||
| forbid-explicit-octal: true # yamllint defaults to false |
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 |
|---|---|---|
| @@ -1 +1,17 @@ | ||
| # caas-workstation | ||
|
|
||
| ## Developing locally | ||
|
|
||
| To run the GitHub Actions linters locally, use: | ||
|
|
||
| ```sh | ||
| docker run --rm \ | ||
| -e RUN_LOCAL=true \ | ||
| --env-file "super-linter.env" \ | ||
| -v "$(pwd)":/tmp/lint \ | ||
| ghcr.io/super-linter/super-linter:v7.3.0 | ||
| ``` | ||
|
|
||
| ```sh | ||
| ansible-lint -c .ansible-lint.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 @@ | ||
| --- |
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 |
|---|---|---|
| @@ -1,39 +1,41 @@ | ||
| --- | ||
|
|
||
| # Convert the floating IP id to an address for Terraform | ||
| - block: | ||
| - name: Convert the floating IP id to an address for Terraform | ||
| when: | ||
| - cluster_floating_ip is defined | ||
| - cluster_floating_ip | ||
| block: | ||
| - name: Look up floating ip | ||
| azimuth_cloud.terraform.os_floating_ip_info: | ||
| floating_ip: "{{ cluster_floating_ip }}" | ||
| register: cluster_floating_ip_info | ||
|
|
||
| - name: Set floating IP address fact | ||
| set_fact: | ||
| ansible.builtin.set_fact: | ||
| cluster_floating_ip_address: "{{ cluster_floating_ip_info.floating_ip.floating_ip_address }}" | ||
| when: | ||
| - cluster_floating_ip is defined | ||
| - cluster_floating_ip | ||
|
|
||
| - name: Install Terraform binary | ||
| include_role: | ||
| ansible.builtin.include_role: | ||
| name: azimuth_cloud.terraform.install | ||
|
|
||
| - name: Make Terraform project directory | ||
| file: | ||
| ansible.builtin.file: | ||
| path: "{{ terraform_project_path }}" | ||
| state: directory | ||
| mode: "0755" | ||
|
|
||
| - name: Template Terraform files into project directory | ||
| template: | ||
| ansible.builtin.template: | ||
| src: "{{ item }}.j2" | ||
| dest: "{{ terraform_project_path }}/{{ item }}" | ||
| mode: "0644" | ||
| loop: | ||
| - outputs.tf | ||
| - providers.tf | ||
| - resources.tf | ||
|
|
||
| - name: Provision infrastructure | ||
| include_role: | ||
| ansible.builtin.include_role: | ||
| name: azimuth_cloud.terraform.infra | ||
| vars: | ||
| terraform_rebuild_nodes: "{{ azimuth_update_reason == 'patch' }}" |
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,14 @@ | ||
| # Detect that default branch is main when running locally | ||
| DEFAULT_BRANCH=main | ||
|
|
||
| # Don't validate JSCPD | ||
| VALIDATE_JSCPD=false | ||
|
|
||
| # Don't validate JS standard because it conflicts with JS prettier | ||
| VALIDATE_JAVASCRIPT_STANDARD=false | ||
|
|
||
| # Don't validate Ansible because ansible-lint is more flexible | ||
| VALIDATE_ANSIBLE=false | ||
|
|
||
| # Don't validate YAML prettier because yamllint is sufficient | ||
| VALIDATE_YAML_PRETTIER=false |
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
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
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.