diff --git a/.github/actions/linter_tests/action.yaml b/.github/actions/linter_tests/action.yaml index 40850c627..503dd9db0 100644 --- a/.github/actions/linter_tests/action.yaml +++ b/.github/actions/linter_tests/action.yaml @@ -73,8 +73,9 @@ runs: sudo apt install -y php8.2-fpm php8.2-xml php8.2-mbstring php8.2-curl ;; macOS) - brew install cpm - cpm install -g --no-test --color Perl::Critic Perl::Tidy + brew install powershell/tap/powershell + brew install cpanminus + cpanm YAML::PP Class::Tiny Perl::Critic brew unlink perl && brew link perl brew install php gnupg ;; diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 11780764e..d3accc356 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -34,7 +34,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 + uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13 # Override language selection by uncommenting this and choosing your languages with: languages: javascript @@ -42,7 +42,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 + uses: github/codeql-action/autobuild@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -56,4 +56,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 + uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 57a1fc226..0f742fc01 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -43,7 +43,7 @@ jobs: - name: Cache tool downloads # ubuntu runner has persistent cache if: matrix.os == 'windows-latest' - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. @@ -149,7 +149,7 @@ jobs: - name: Cache tool downloads # ubuntu, mac runners have persistent cache if: matrix.os == 'windows-latest' - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. @@ -182,7 +182,7 @@ jobs: - name: Upload Test Outputs for Upload Job # Only upload results from latest. Always run, except when cancelled. if: (failure() || success()) && matrix.linter-version == 'Latest' - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ matrix.results-file }}-test-results path: ${{ matrix.results-file }}-res.json @@ -244,7 +244,7 @@ jobs: - name: Upload Test Outputs for Notification Job # Always run, except when cancelled. if: (failure() || success()) - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: tools-${{ matrix.results-file }}-test-results path: ${{ matrix.results-file }}-res.json diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 3b5b72a1a..7040c3b86 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -253,7 +253,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache key: trunk-${{ runner.os }} @@ -283,7 +283,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache key: trunk-${{ runner.os }} diff --git a/.github/workflows/repo_tests.reusable.yaml b/.github/workflows/repo_tests.reusable.yaml index e22591ab7..5a1ad9169 100644 --- a/.github/workflows/repo_tests.reusable.yaml +++ b/.github/workflows/repo_tests.reusable.yaml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup node - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: 18 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 011b6861a..3c5333b64 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -35,7 +35,7 @@ jobs: persist-credentials: false - name: Run analysis - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 with: results_file: results.sarif results_format: sarif @@ -57,7 +57,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: Upload artifact - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: SARIF file path: results.sarif @@ -65,6 +65,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5 + uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13 with: sarif_file: results.sarif diff --git a/.github/workflows/upload_results.reusable.yaml b/.github/workflows/upload_results.reusable.yaml index 8e19d284f..94fe278cc 100644 --- a/.github/workflows/upload_results.reusable.yaml +++ b/.github/workflows/upload_results.reusable.yaml @@ -64,14 +64,14 @@ jobs: - name: Retrieve Test Outputs ubuntu id: download-ubuntu - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 continue-on-error: true with: name: ${{ inputs.results-prefix }}ubuntu-latest-test-results - name: Retrieve Test Outputs macOS id: download-macos - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 continue-on-error: true with: name: ${{ inputs.results-prefix }}macos-latest-test-results @@ -79,7 +79,7 @@ jobs: # TODO(Tyler): Re-add Windows runners. # - name: Retrieve Test Outputs Windows # id: download-windows - # uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + # uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 # continue-on-error: true # with: # name: ${{ inputs.results-prefix }}windows-latest-test-results @@ -115,10 +115,10 @@ jobs: - type: section text: type: mrkdwn - text: "Failure: " + text: "Failure: " - name: Setup Node - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: 18 @@ -227,7 +227,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: 18 diff --git a/.github/workflows/windows_nightly.yaml b/.github/workflows/windows_nightly.yaml index 68ff0bb43..53313f2ec 100644 --- a/.github/workflows/windows_nightly.yaml +++ b/.github/workflows/windows_nightly.yaml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. @@ -63,7 +63,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 9178fddea..fa6bd9366 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -2,7 +2,7 @@ version: 0.1 # version used for local trunk runs and testing cli: - version: 1.22.8-beta.6 + version: 1.22.12 shell_hooks: enforce: true @@ -17,7 +17,7 @@ plugins: - id: configs uri: https://github.com/trunk-io/configs - ref: v1.0.9 + ref: v1.0.11 lint: files: @@ -42,7 +42,7 @@ lint: enabled: # enabled linters inherited from github.com/trunk-io/configs plugin - definition-checker - - eslint@9.16.0 + - eslint@9.24.0 - trunk-toolbox@0.5.4 disabled: - pylint # pylint diagnostics are too strict @@ -53,6 +53,11 @@ lint: paths: - "**/test_data" # required for golangci-lint, which runs on directories - "**/test_data/**" + - linters: [prettier] + paths: [linters/markdownlint/README.md] + threshold: + - linters: [trunk] + level: high actions: # Uncomment to enable more verbose action logs @@ -102,8 +107,9 @@ actions: - tool-test-helper tools: enabled: - - clangd-indexing-tools@18.1.3 - - clangd@18.1.3 + - clangd-indexing-tools@19.1.2 + - clangd@19.1.2 + runtimes: # expose shims in .trunk/tools - node diff --git a/linters/ansible-lint/test_data/ansible_lint_v25.2.0_FQCN.check.shot b/linters/ansible-lint/test_data/ansible_lint_v25.2.0_FQCN.check.shot new file mode 100644 index 000000000..cdb54c019 --- /dev/null +++ b/linters/ansible-lint/test_data/ansible_lint_v25.2.0_FQCN.check.shot @@ -0,0 +1,595 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ansible-lint test FQCN 1`] = ` +{ + "issues": [ + { + "code": "fqcn[action-core]", + "column": "7", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "29", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.wait_for\` or \`ansible.legacy.wait_for\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/deploy-application.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "15", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "20", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: restart jboss", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ansible-lint", + "message": "Task/Handler: restart iptables", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "Task/Handler: Download JBoss from jboss.org", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "13", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.get_url\` or \`ansible.legacy.get_url\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "18", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.unarchive\` or \`ansible.legacy.unarchive\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "22", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "26", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.command\` or \`ansible.legacy.command\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.dnf\` or \`ansible.legacy.dnf\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "31", + "linter": "ansible-lint", + "message": "Task/Handler: Copying standalone.xml configuration file", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "32", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "38", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.group\` or \`ansible.legacy.group\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "42", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.user\` or \`ansible.legacy.user\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "48", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.file\` or \`ansible.legacy.file\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "53", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "56", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[octal-values]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[octal-values]", + "level": "LEVEL_HIGH", + "line": "59", + "linter": "ansible-lint", + "message": "Forbidden implicit octal value "0755"", + "targetType": "yaml", + }, + { + "code": "command-instead-of-module", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#command-instead-of-module", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "ignore-errors", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#ignore-errors", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "no-changed-when", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#no-changed-when", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "62", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.shell\` or \`ansible.legacy.shell\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "63", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "66", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "68", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "72", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "79", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.dnf\` or \`ansible.legacy.dnf\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "85", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "90", + "linter": "ansible-lint", + "message": "Task/Handler: deploy firewalld rules", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "91", + "linter": "ansible-lint", + "message": "Action \`firewalld\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "92", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "95", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/site.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "yaml", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/demo-aws-launch.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/deploy-application.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/java-app/tasks/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/site.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ansible-lint/test_data/ansible_lint_v25.2.0_non_FQCN.check.shot b/linters/ansible-lint/test_data/ansible_lint_v25.2.0_non_FQCN.check.shot new file mode 100644 index 000000000..a993e1d2a --- /dev/null +++ b/linters/ansible-lint/test_data/ansible_lint_v25.2.0_non_FQCN.check.shot @@ -0,0 +1,583 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ansible-lint test non_FQCN 1`] = ` +{ + "issues": [ + { + "code": "syntax-check[unknown-module]", + "column": "7", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#syntax-check[unknown-module]", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "couldn't resolve module/action 'ec2'. This often indicates a misspelling, missing collection, or incorrect module path.", + "targetType": "yaml", + }, + { + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/deploy-application.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "15", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "20", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: restart jboss", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ansible-lint", + "message": "Task/Handler: restart iptables", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "Task/Handler: Download JBoss from jboss.org", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "13", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.get_url\` or \`ansible.legacy.get_url\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "18", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.unarchive\` or \`ansible.legacy.unarchive\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "22", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "26", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.command\` or \`ansible.legacy.command\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.dnf\` or \`ansible.legacy.dnf\` instead.", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "31", + "linter": "ansible-lint", + "message": "Task/Handler: Copying standalone.xml configuration file", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "32", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "38", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.group\` or \`ansible.legacy.group\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "42", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.user\` or \`ansible.legacy.user\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "48", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.file\` or \`ansible.legacy.file\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "53", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "56", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[octal-values]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[octal-values]", + "level": "LEVEL_HIGH", + "line": "59", + "linter": "ansible-lint", + "message": "Forbidden implicit octal value "0755"", + "targetType": "yaml", + }, + { + "code": "command-instead-of-module", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#command-instead-of-module", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "ignore-errors", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#ignore-errors", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "no-changed-when", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#no-changed-when", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "62", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.shell\` or \`ansible.legacy.shell\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "63", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "66", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "68", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "72", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "79", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.dnf\` or \`ansible.legacy.dnf\` instead.", + "targetType": "yaml", + }, + { + "code": "fqcn[action-core]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "85", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "yaml", + }, + { + "code": "name[casing]", + "column": "9", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "90", + "linter": "ansible-lint", + "message": "Task/Handler: deploy firewalld rules", + "targetType": "yaml", + }, + { + "code": "fqcn[action]", + "column": "3", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "91", + "linter": "ansible-lint", + "message": "Action \`firewalld\` is not FQCN.", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "92", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "95", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "yaml", + }, + { + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/site.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "yaml", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/demo-aws-launch.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/deploy-application.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/java-app/tasks/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone/site.yml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/buildifier/test_data/buildifier_v8.0.3_basic_check.check.shot b/linters/buildifier/test_data/buildifier_v8.0.3_basic_check.check.shot new file mode 100644 index 000000000..730ef74be --- /dev/null +++ b/linters/buildifier/test_data/buildifier_v8.0.3_basic_check.check.shot @@ -0,0 +1,171 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter buildifier test basic_check 1`] = ` +{ + "issues": [ + { + "code": "native-sh-library", + "column": "1", + "file": "test_data/add_tables.BUILD", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#native-sh-library", + "level": "LEVEL_HIGH", + "line": "13", + "linter": "buildifier", + "message": "Function "sh_library" is not global anymore and needs to be loaded from "@rules_shell//shell:sh_library.bzl".", + "targetType": "bazel-build", + }, + { + "code": "native-sh-library", + "column": "1", + "file": "test_data/add_tables.BUILD", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#native-sh-library", + "level": "LEVEL_HIGH", + "line": "18", + "linter": "buildifier", + "message": "Function "sh_library" is not global anymore and needs to be loaded from "@rules_shell//shell:sh_library.bzl".", + "targetType": "bazel-build", + }, + { + "code": "native-sh-binary", + "column": "1", + "file": "test_data/add_tables.BUILD", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#native-sh-binary", + "level": "LEVEL_HIGH", + "line": "23", + "linter": "buildifier", + "message": "Function "sh_binary" is not global anymore and needs to be loaded from "@rules_shell//shell:sh_binary.bzl".", + "targetType": "bazel-build", + }, + { + "code": "module-docstring", + "column": "1", + "file": "test_data/basic.bzl", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#module-docstring", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "buildifier", + "message": "The file has no module docstring. +A module docstring is a string literal (not a comment) which should be the first statement of a file (it may follow comment lines).", + "targetType": "starlark", + }, + { + "code": "load", + "column": "26", + "file": "test_data/basic.bzl", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#load", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "buildifier", + "message": "Loaded symbol "a" is unused. Please remove it. +To disable the warning, add '@unused' in a comment. +If you want to re-export a symbol, use the following pattern: + + load(..., _a = "a", ...) + a = _a", + "targetType": "starlark", + }, + { + "code": "load", + "column": "26", + "file": "test_data/basic.bzl", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#load", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "buildifier", + "message": "Loaded symbol "b" is unused. Please remove it. +To disable the warning, add '@unused' in a comment. +If you want to re-export a symbol, use the following pattern: + + load(..., _b = "b", ...) + b = _b", + "targetType": "starlark", + }, + ], + "lintActions": [ + { + "command": "fix", + "fileGroupName": "bazel-build", + "linter": "buildifier", + "paths": [ + "test_data/add_tables.BUILD", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "fix", + "fileGroupName": "starlark", + "linter": "buildifier", + "paths": [ + "test_data/basic.bzl", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "warn", + "fileGroupName": "bazel-build", + "linter": "buildifier", + "paths": [ + "test_data/add_tables.BUILD", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "warn", + "fileGroupName": "starlark", + "linter": "buildifier", + "paths": [ + "test_data/basic.bzl", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "warn", + "fileGroupName": "bazel-build", + "linter": "buildifier", + "paths": [ + "test_data/add_tables.BUILD", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "warn", + "fileGroupName": "starlark", + "linter": "buildifier", + "paths": [ + "test_data/basic.bzl", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/add_tables.BUILD", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "buildifier", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + { + "column": "1", + "file": "test_data/basic.bzl", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "buildifier", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`; diff --git a/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.add_tables.BUILD.fmt.shot b/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.add_tables.BUILD.fmt.shot new file mode 100644 index 000000000..5ee7d8e85 --- /dev/null +++ b/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.add_tables.BUILD.fmt.shot @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter buildifier test no_config 1`] = ` +"load("@rules_shell//shell:sh_binary.bzl", "sh_binary") +load("@rules_shell//shell:sh_library.bzl", "sh_library") + +foo_macro( + fizz = [ + ":lib2", + ":lib1", + ], +) + +filegroup( + name = "files", + srcs = glob(["**"]), +) + +sh_library( + name = "lib1", + srcs = ["src1.sh"], +) + +sh_library( + name = "lib2", + srcs = ["src1.sh"], +) + +sh_binary( + name = "foo", + srcs = ["foo.sh"], + deps = [ + ":lib1", + ":lib2", + ], +) +" +`; diff --git a/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.basic.bzl.fmt.shot b/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.basic.bzl.fmt.shot new file mode 100644 index 000000000..0f9da3bb5 --- /dev/null +++ b/linters/buildifier/test_data/buildifier_v8.0.3_no_config.test_data.basic.bzl.fmt.shot @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter buildifier test no_config 1`] = ` +"# Misformatted file +def eponymous_name(): + name = native.package_name() + + return name[name.rfind("/") + 1:] +" +`; diff --git a/linters/buildifier/test_data/buildifier_v8.0.3_with_config.test_data.add_tables.BUILD.fmt.shot b/linters/buildifier/test_data/buildifier_v8.0.3_with_config.test_data.add_tables.BUILD.fmt.shot new file mode 100644 index 000000000..f0e17ff72 --- /dev/null +++ b/linters/buildifier/test_data/buildifier_v8.0.3_with_config.test_data.add_tables.BUILD.fmt.shot @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter buildifier test with_config 1`] = ` +"load("@rules_shell//shell:sh_binary.bzl", "sh_binary") +load("@rules_shell//shell:sh_library.bzl", "sh_library") + +foo_macro( + fizz = [ + ":lib1", + ":lib2", + ], +) + +filegroup( + name = "files", + srcs = glob(["**"]), +) + +sh_library( + name = "lib1", + srcs = ["src1.sh"], +) + +sh_library( + name = "lib2", + srcs = ["src1.sh"], +) + +sh_binary( + name = "foo", + srcs = ["foo.sh"], + deps = [ + ":lib1", + ":lib2", + ], +) +" +`; diff --git a/linters/eslint/README.md b/linters/eslint/README.md index cb23b3e87..d876f9bcb 100644 --- a/linters/eslint/README.md +++ b/linters/eslint/README.md @@ -6,3 +6,86 @@ [migration guide](https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config)) in order to run. Trunk will automatically detect which config file you have and by default will only enable a compatible version. + +## Ignores + +Here is a conversion guide for +[ESLint-style ignores](https://eslint.org/docs/latest/use/configure/rules#disabling-rules) and +[trunk-ignores](https://docs.trunk.io/code-quality/linters/ignoring-issues-and-files): + +### Same Line + +```typescript +alert("foo"); // trunk-ignore(eslint) + +alert("foo"); // eslint-disable-line +``` + +### Next Line + +```typescript +// trunk-ignore(eslint) +alert("foo"); + +/* eslint-disable-next-line */ +alert("foo"); +``` + +### With Comments + +```typescript +// trunk-ignore(eslint): Expected alert +alert("foo"); + +/* eslint-disable-next-line -- Expected alert */ +alert("foo"); +``` + +### Specific Issue + +```typescript +// trunk-ignore(eslint/no-alert) +alert("foo"); + +/* eslint-disable-next-line no-alert */ +alert("foo"); +``` + +### Multiple Issues + +```typescript +// trunk-ignore(eslint/no-alert,eslint/quotes) +alert("foo"); + +/* eslint-disable-next-line no-alert, quotes */ +alert("foo"); +``` + +### Blocks + +```typescript +// trunk-ignore-begin(eslint/no-alert) +alert("foo"); +// trunk-ignore-end(eslint/no-alert) + +/* eslint-disable no-alert */ +alert("foo"); +/* eslint-enable no-alert */ +``` + +### Whole File + +```typescript +// trunk-ignore-all(eslint/no-alert) +alert("foo"); + +/* eslint-disable no-alert */ +alert("foo"); +``` + +### Notes + +Only `eslint-disable-line` and `eslint-disable-next-line` support `//` comments. All other +ESLint-style ignores must use `/* */` comments. The full set of rules and their applicable files can +be configured in an +[eslint config file](https://eslint.org/docs/latest/use/configure/rules#using-configuration-files). diff --git a/linters/golangci-lint/golangci_lint.test.ts b/linters/golangci-lint/golangci_lint.test.ts index 9a5ba201a..d0d4e7e69 100644 --- a/linters/golangci-lint/golangci_lint.test.ts +++ b/linters/golangci-lint/golangci_lint.test.ts @@ -1,11 +1,67 @@ import path from "path"; +import semver from "semver"; import { customLinterCheckTest } from "tests"; import { TrunkLintDriver } from "tests/driver"; import { skipOS, TEST_DATA } from "tests/utils"; +const testGenerator = ({ + args, + testName, + preCheck, + skipTestIf, +}: { + args: string; + testName: string; + preCheck?: (driver: TrunkLintDriver) => void; + skipTestIf?: (version?: string) => boolean; +}) => { + const skipTest = (v1: boolean) => (version?: string) => { + if (v1 && version === "Latest") { + return true; + } + + const parsedVersion = semver.parse(version); + if (!parsedVersion) { + return false; + } + if (v1 && parsedVersion.major >= 2) { + return true; + } else if (!v1 && parsedVersion.major < 2) { + return true; + } + + if (skipTestIf) { + return skipTestIf(version); + } + return false; + }; + + const preCheckV2 = (driver: TrunkLintDriver) => { + driver.moveFile(path.join(TEST_DATA, ".golangci.yml"), ".golangci2.yml"); + if (preCheck) { + preCheck(driver); + } + }; + + customLinterCheckTest({ + linterName: "golangci-lint", + args, + testName, + preCheck, + skipTestIf: skipTest(true), + }); + + customLinterCheckTest({ + linterName: "golangci-lint2", + args, + testName, + preCheck: preCheckV2, + skipTestIf: skipTest(false), + }); +}; + // Don't run on Windows since the typecheck errors are dependent on system libs, and the set of diagnostics seems to vary. -customLinterCheckTest({ - linterName: "golangci-lint", +testGenerator({ args: `${TEST_DATA} -y`, testName: "all", skipTestIf: skipOS(["win32"]), @@ -18,12 +74,11 @@ const addEmpty = (driver: TrunkLintDriver) => { // Don't run on Windows since the typecheck errors are dependent on system libs, and for the sake of these tests // it is easier to simply skip these tests than handle additional setup. -customLinterCheckTest({ - linterName: "golangci-lint", - testName: "empty", +testGenerator({ args: TEST_DATA, - preCheck: addEmpty, + testName: "empty", skipTestIf: skipOS(["win32"]), + preCheck: addEmpty, }); // Having an ignored file and no other files causes an error diagnostic to be surfaced. @@ -32,8 +87,7 @@ const setupUnbuildable = (driver: TrunkLintDriver) => { driver.deleteFile(TEST_DATA); }; -customLinterCheckTest({ - linterName: "golangci-lint", +testGenerator({ testName: "unbuildable", args: "unbuildable.go", preCheck: setupUnbuildable, diff --git a/linters/golangci-lint/plugin.yaml b/linters/golangci-lint/plugin.yaml index e9311d3ba..b47df3812 100644 --- a/linters/golangci-lint/plugin.yaml +++ b/linters/golangci-lint/plugin.yaml @@ -7,6 +7,11 @@ tools: package: github.com/golangci/golangci-lint/cmd/golangci-lint shims: [golangci-lint] known_good_version: 1.46.2 + - name: golangci-lint2 + runtime: go + package: github.com/golangci/golangci-lint/v2/cmd/golangci-lint + shims: [golangci-lint] + known_good_version: 2.0.0 lint: definitions: @@ -50,7 +55,7 @@ lint: run_from: ${root_or_parent_with(go.mod)} # TODO(Tyler): Audit golangci-lint running on upstream once sandboxing and relative path fix is landed. disable_upstream: true - suggest_if: files_present + suggest_if: never direct_configs: - .golangci.json - .golangci.toml @@ -65,3 +70,57 @@ lint: parse_regex: ${semver} run: golangci-lint --version run_timeout: 10m + - name: golangci-lint2 + files: [go] + tools: [golangci-lint2] + description: A powerful Go linter runner + environment: + - name: GOLANGCI_LINT_CACHE + value: ${cachedir} + # Needs to use system `diff` and `git` + - name: PATH + list: ["${env.PATH}"] + - name: GO111MODULE + value: auto + # May need to git clone with ssh authentication for private packages. + - name: SSH_AUTH_SOCK + value: ${env.SSH_AUTH_SOCK} + optional: true + commands: + - name: lint + output: sarif + read_output_from: tmp_file + # We need to run golangci-lint on directories since running on files only works for --fast + # and can also produce false positives. + target: ${parent} + # Exclude go linters we already include. + run: + golangci-lint run --output.sarif.path ${tmpfile} --timeout 10m --concurrency 1 + --allow-parallel-runners --issues-exit-code 0 ${target} + # exit codes + # 0 - success + # 1 - issues found -> we override this to be 0 + # 2 - warning in test + # 3 - failure + # 4 - timeout + # 5 - no go files + # 6 - no config file detected + # 7 - error logged + success_codes: [0, 2, 7] + run_from: ${root_or_parent_with(go.mod)} + disable_upstream: true + suggest_if: files_present + direct_configs: + - .golangci.json + - .golangci.toml + - .golangci.yaml + - .golangci.yml + affects_cache: + - go.mod + - go.sum + issue_url_format: https://golangci-lint.run/usage/linters/ + known_good_version: 2.0.0 + version_command: + parse_regex: ${semver} + run: golangci-lint --version + run_timeout: 10m diff --git a/linters/golangci-lint/test_data/.golangci2.yml b/linters/golangci-lint/test_data/.golangci2.yml new file mode 100644 index 000000000..9a10c7739 --- /dev/null +++ b/linters/golangci-lint/test_data/.golangci2.yml @@ -0,0 +1,24 @@ +version: "2" +linters: + enable: + - govet + - asciicheck + - bodyclose + - depguard + - dogsled + - errcheck + - gochecknoinits + - godot + - goheader + - goprintffuncname + - gosec + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - rowserrcheck + - staticcheck + - unconvert + - unused + - whitespace diff --git a/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_all.check.shot b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_all.check.shot new file mode 100644 index 000000000..11b1a0385 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_all.check.shot @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter golangci-lint2 test all 1`] = ` +{ + "issues": [ + { + "code": "errcheck", + "column": "12", + "file": "test_data/basic.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "golangci-lint2", + "message": "Error return value of \`time.Parse\` is not checked", + "targetType": "go", + }, + { + "code": "unused", + "column": "6", + "file": "test_data/unused_func.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "golangci-lint2", + "message": "func helper is unused", + "targetType": "go", + }, + { + "code": "typecheck", + "column": "1", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint2", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint2", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint2", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_empty.check.shot b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_empty.check.shot new file mode 100644 index 000000000..756736b45 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_empty.check.shot @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter golangci-lint2 test empty 1`] = ` +{ + "issues": [ + { + "code": "typecheck", + "column": "1", + "file": "test_data/empty.go", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint2", + "message": "expected 'package', found 'EOF'", + "targetType": "go", + }, + { + "code": "typecheck", + "column": "1", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint2", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint2", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint2", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_unbuildable.check.shot b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_unbuildable.check.shot new file mode 100644 index 000000000..dceb23821 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint2_v2.0.0_unbuildable.check.shot @@ -0,0 +1,20 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter golangci-lint2 test unbuildable 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint2", + "paths": [ + ".", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.64.4_all.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_all.check.shot new file mode 100644 index 000000000..cddddc14c --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_all.check.shot @@ -0,0 +1,97 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test all 1`] = ` +{ + "issues": [ + { + "code": "error", + "file": "test_data", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "exportloopref: This linter is fully inactivated: it will not produce any reports.", + "targetType": "go", + }, + { + "code": "godot", + "column": "1", + "file": "test_data/basic.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "golangci-lint", + "message": "Comment should end in a period", + "targetType": "go", + }, + { + "code": "errcheck", + "column": "12", + "file": "test_data/basic.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "golangci-lint", + "message": "Error return value of \`time.Parse\` is not checked", + "targetType": "go", + }, + { + "code": "unused", + "column": "6", + "file": "test_data/unused_func.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "golangci-lint", + "message": "func \`helper\` is unused", + "targetType": "go", + }, + { + "code": "error", + "file": "test_data/wrapper", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "exportloopref: This linter is fully inactivated: it will not produce any reports.", + "targetType": "go", + }, + { + "code": "typecheck", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.64.4_empty.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_empty.check.shot new file mode 100644 index 000000000..715447f29 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_empty.check.shot @@ -0,0 +1,73 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test empty 1`] = ` +{ + "issues": [ + { + "code": "error", + "file": "test_data", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "exportloopref: This linter is fully inactivated: it will not produce any reports.", + "targetType": "go", + }, + { + "code": "typecheck", + "column": "1", + "file": "test_data/empty.go", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": "expected 'package', found 'EOF'", + "targetType": "go", + }, + { + "code": "error", + "file": "test_data/wrapper", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "exportloopref: This linter is fully inactivated: it will not produce any reports.", + "targetType": "go", + }, + { + "code": "typecheck", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.64.4_unbuildable.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_unbuildable.check.shot new file mode 100644 index 000000000..5e14a0891 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.64.4_unbuildable.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test unbuildable 1`] = ` +{ + "issues": [ + { + "code": "error", + "file": ".", + "issueClass": "ISSUE_CLASS_NEW", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "typechecking error: build constraints exclude all Go files in /tmp/plugins_", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + ".", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/hadolint/test_data/hadolint_v2.10.0_CUSTOM.check.shot b/linters/hadolint/test_data/hadolint_v2.10.0_CUSTOM.check.shot index 4fe2209ca..e5b0d64c0 100644 --- a/linters/hadolint/test_data/hadolint_v2.10.0_CUSTOM.check.shot +++ b/linters/hadolint/test_data/hadolint_v2.10.0_CUSTOM.check.shot @@ -26,6 +26,15 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` ], "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -44,6 +53,15 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` ], "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -72,6 +90,16 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` "upstream": true, "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -92,6 +120,16 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` "upstream": true, "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", diff --git a/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot b/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot index 4fe2209ca..e5b0d64c0 100644 --- a/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot +++ b/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot @@ -26,6 +26,15 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` ], "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -44,6 +53,15 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` ], "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -72,6 +90,16 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` "upstream": true, "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", @@ -92,6 +120,16 @@ exports[`Testing linter hadolint test CUSTOM 1`] = ` "upstream": true, "verb": "TRUNK_VERB_CHECK", }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, { "command": "lint", "fileGroupName": "docker", diff --git a/linters/kube-linter/plugin.yaml b/linters/kube-linter/plugin.yaml index d040b35fc..35d39188d 100644 --- a/linters/kube-linter/plugin.yaml +++ b/linters/kube-linter/plugin.yaml @@ -5,7 +5,7 @@ tools: runtime: go package: golang.stackrox.io/kube-linter/cmd/kube-linter shims: [kube-linter] - known_good_version: 0.6.4 + known_good_version: 0.7.2 lint: definitions: - name: kube-linter @@ -20,5 +20,5 @@ lint: environment: - name: PATH list: ["${linter}"] - known_good_version: 0.6.4 + known_good_version: 0.7.2 suggest_if: never diff --git a/linters/kube-linter/test_data/kube_linter_v0.7.2_basic.check.shot b/linters/kube-linter/test_data/kube_linter_v0.7.2_basic.check.shot new file mode 100644 index 000000000..20279574e --- /dev/null +++ b/linters/kube-linter/test_data/kube_linter_v0.7.2_basic.check.shot @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter kube-linter test basic 1`] = ` +{ + "issues": [ + { + "code": "latest-tag", + "column": "1", + "file": "test_data/basic.in.yaml", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "kube-linter", + "message": "The container "sec-ctx-demo" is using an invalid container image, "busybox". Please use images that are not blocked by the \`BlockList\` criteria : [".*:(latest)$" "^[^:]*$" "(.*/[^:]+)$"] +object: /security-context-demo /v1, Kind=Pod", + "targetType": "yaml", + }, + { + "code": "no-read-only-root-fs", + "column": "1", + "file": "test_data/basic.in.yaml", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "kube-linter", + "message": "container "sec-ctx-demo" does not have a read-only root file system +object: /security-context-demo /v1, Kind=Pod", + "targetType": "yaml", + }, + { + "code": "unset-memory-requirements", + "column": "1", + "file": "test_data/basic.in.yaml", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "kube-linter", + "message": "container "sec-ctx-demo" has memory limit 0 +object: /security-context-demo /v1, Kind=Pod", + "targetType": "yaml", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "kube-linter", + "paths": [ + "test_data/basic.in.yaml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "yaml", + "linter": "kube-linter", + "paths": [ + "test_data/basic.in.yaml", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/markdownlint/README.md b/linters/markdownlint/README.md new file mode 100644 index 000000000..4555d5de4 --- /dev/null +++ b/linters/markdownlint/README.md @@ -0,0 +1,91 @@ +# markdownlint + +## Ignores + +Here is a conversion guide for +[markdownlint-style ignores](https://github.com/DavidAnson/markdownlint/blob/main/README.md#configuration) +and [trunk-ignores](https://docs.trunk.io/code-quality/linters/ignoring-issues-and-files): + +### Same Line + +```markdown +# (name)[link] + +# (name)[link] +``` + +### Next Line + +```markdown + +# (name)[link] + + +# (name)[link] +``` + +### With Comments + +```markdown + +# (name)[link] + + +# (name)[link] +``` + +### Specific Issue + +```markdown + +# (name)[link] + + +# (name)[link] +``` + +### Multiple Issues + +```markdown + +# (name)[link] + + +# (name)[link] +``` + +### Blocks + +```markdown + + +# (name)[link] + + + + + +# (name)[link] + + +``` + +### Whole File + +```markdown + + +# (name)[link] + + + +# (name)[link] +``` + +### Notes + +By default, prettier will add empty lines between markdown content and comments. +For this reason, we recommend using next-line ignores with [prettier ignores](https://prettier.io/docs/ignore/#range-ignore) or using ignore bocks. + +Specific rules and multi-file ignores can be specified in a +[markdownlint config file](https://github.com/DavidAnson/markdownlint#optionsconfig). diff --git a/linters/mypy/README.md b/linters/mypy/README.md new file mode 100644 index 000000000..dcaf70946 --- /dev/null +++ b/linters/mypy/README.md @@ -0,0 +1,75 @@ +# mypy + +## Ignores + +Here is a conversion guide for +[mypy-style ignores](https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker) +and [trunk-ignores](https://docs.trunk.io/code-quality/linters/ignoring-issues-and-files): + +### Same Line + +```python +x: str = 1 # trunk-ignore(mypy) + +x: str = 1 # type: ignore +``` + +### Next Line + +```python +# trunk-ignore(mypy) +x: str = 1 + +# Unsupported in mypy +x: str = 1 +``` + +### With Comments + +```python +x: str = 1 # trunk-ignore(mypy): Expected type + +x: str = 1 # Unsupported in mypy +``` + +### Specific Issue + +```python +x: str = 1 # trunk-ignore(mypy/assignment) + +x: str = 1 # type: ignore[assignment] +``` + +### Multiple Issues + +```python +x: str = 1 # trunk-ignore(mypy/assignment,mypy/note) + +x: str = 1 # type: ignore[assignment, note] +``` + +### Blocks + +```python +# trunk-ignore-begin(mypy/assigment) +x: str = 1 +# trunk-ignore-end(mypy/assigment) + +# Unsupported in mypy +x: str = 1 +``` + +### Whole File + +```python +# trunk-ignore-all(mypy/assigment) +x: str = 1 + +# mypy: disable-error-code="assignment" +x: str = 1 +``` + +### Notes + +The applied linter rules can be specified in a +[mypy config file](https://mypy.readthedocs.io/en/stable/config_file.html#example-mypy-ini). diff --git a/linters/osv-scanner/plugin.yaml b/linters/osv-scanner/plugin.yaml index 66847e8f6..5624aecfe 100644 --- a/linters/osv-scanner/plugin.yaml +++ b/linters/osv-scanner/plugin.yaml @@ -1,7 +1,7 @@ version: 0.1 downloads: - name: osv-scanner - version: 1.3.6 + version: 2.0.1 executable: true downloads: - os: @@ -35,13 +35,13 @@ tools: - name: osv-scanner download: osv-scanner shims: [osv-scanner] - known_good_version: 1.3.6 + known_good_version: 2.0.1 lint: definitions: - name: osv-scanner files: [lockfile] tools: [osv-scanner] - known_good_version: 1.3.6 + known_good_version: 2.0.1 description: Checks for known vulnerabilities in your dependencies commands: - name: scan diff --git a/linters/osv-scanner/test_data/bun.lock b/linters/osv-scanner/test_data/bun.lock new file mode 100644 index 000000000..369edc44a --- /dev/null +++ b/linters/osv-scanner/test_data/bun.lock @@ -0,0 +1,17 @@ +{ + "version": 2, + "dependencies": { + "chalk@5.2.0": { + "integrity": "sha512-abc123...", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz" + }, + "react@18.2.0": { + "integrity": "sha512-def456...", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz" + }, + "react-dom@18.2.0": { + "integrity": "sha512-ghi789...", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" + } + } +} diff --git a/linters/osv-scanner/test_data/osv_scanner_v2.0.1_CUSTOM.check.shot b/linters/osv-scanner/test_data/osv_scanner_v2.0.1_CUSTOM.check.shot new file mode 100644 index 000000000..da5a08abb --- /dev/null +++ b/linters/osv-scanner/test_data/osv_scanner_v2.0.1_CUSTOM.check.shot @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter osv-scanner test CUSTOM 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/Cargo.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/Gemfile.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/bun.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/composer.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/go.mod", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/requirements.txt", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "scan", + "fileGroupName": "lockfile", + "linter": "osv-scanner", + "paths": [ + "test_data/yarn.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/plugin.yaml b/linters/plugin.yaml index c57210920..4b00387cd 100644 --- a/linters/plugin.yaml +++ b/linters/plugin.yaml @@ -221,8 +221,7 @@ lint: # ?: is a non-capturing group, so that the RE2 DFA is more memory efficient # NOTE(Tyler): This is more strict than it realistically needs to be, but this partial match # and the file extensions provide a general enough capture. - # Note that re2 does not support ?!, so this does not capture all correct cases. - - (?i)(?:^|/)Dockerfile\.(?!.*\.dockerignore$).+$ + - (?i)(?:^|/)Dockerfile\..+$ filenames: - dockerfile - Dockerfile @@ -379,6 +378,10 @@ lint: # Conan (C++) - conan.lock + # csharp + - deps.json + - packages.config + # Golang - go.mod - go.sum @@ -387,6 +390,10 @@ lint: - buildscript-gradle.lockfile - gradle.lockfile + # Haskell + - cabal.project.freeze + - stack.yaml.lock + # Maven - pom.xml @@ -397,6 +404,7 @@ lint: - package-lock.json - pnpm-lock.yaml - yarn.lock + - bun.lock # NuGet (.NET) - packages.lock.json @@ -707,3 +715,6 @@ lint: - linters: [osv-scanner] paths: ["**/go.sum"] + + - linters: [checkov, hadolint, snyk, terrascan, trivy] + paths: ["**/*.dockerignore"] diff --git a/linters/psscriptanalyzer/plugin.yaml b/linters/psscriptanalyzer/plugin.yaml index 000798f21..78585b1a1 100644 --- a/linters/psscriptanalyzer/plugin.yaml +++ b/linters/psscriptanalyzer/plugin.yaml @@ -12,7 +12,13 @@ downloads: linux: linux windows: windows macos: macos + version: <=1.23.0 url: https://github.com/PowerShell/PSScriptAnalyzer/releases/download/v${version}/PSScriptAnalyzer.${version}.nupkg + - os: + linux: linux + windows: windows + macos: macos + url: https://github.com/PowerShell/PSScriptAnalyzer/releases/download/${version}/PSScriptAnalyzer.${version}.nupkg - name: converttosarif downloads: - os: diff --git a/linters/ruff/README.md b/linters/ruff/README.md new file mode 100644 index 000000000..fc5556747 --- /dev/null +++ b/linters/ruff/README.md @@ -0,0 +1,75 @@ +# ruff + +## Ignores + +Here is a conversion guide for +[ruff-style ignores](https://docs.astral.sh/ruff/linter/#disabling-fixes) and +[trunk-ignores](https://docs.trunk.io/code-quality/linters/ignoring-issues-and-files): + +### Same Line + +```python +x = 1 # trunk-ignore(ruff) + +x = 1 # noqa +``` + +### Next Line + +```python +# trunk-ignore(ruff) +x = 1 + +# Unsupported in ruff +x = 1 +``` + +### With Comments + +```python +x = 1 # trunk-ignore(ruff): Expected var + +x = 1 # noqa Expected var +``` + +### Specific Issue + +```python +x = 1 # trunk-ignore(ruff/F841) + +x = 1 # noqa: F841 +``` + +### Multiple Issues + +```python +x = 1 # trunk-ignore(ruff/E741,ruff/F841) + +x = 1 # noqa: E741, F841 +``` + +### Blocks + +```python +# trunk-ignore-begin(ruff/F841) +x = 1 +# trunk-ignore-end(ruff/F841) + +# Unsupported in ruff +x = 1 +``` + +### Whole File + +```python +# trunk-ignore-all(ruff/F841) +x = 1 + +# ruff: noqa: F841 +x = 1 +``` + +### Notes + +You can also configure which rules to use and which files to apply them to using +[ruff config files](https://docs.astral.sh/ruff/settings/#lint_per-file-ignores). diff --git a/linters/scalafmt/plugin.yaml b/linters/scalafmt/plugin.yaml index e3fecea56..ca6c2656b 100644 --- a/linters/scalafmt/plugin.yaml +++ b/linters/scalafmt/plugin.yaml @@ -47,4 +47,4 @@ lint: run: scalafmt --version known_good_version: 3.4.3 # We don't support this semver format, and it's a prerelease - known_bad_versions: [3.8.4-RC1] + known_bad_versions: [3.8.4-RC1, 3.9.0] diff --git a/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot b/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot new file mode 100644 index 000000000..1816be293 --- /dev/null +++ b/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter scalafmt test basic 1`] = ` +"case class Demo(a: String, b: Int, c: Char) +" +`; diff --git a/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot b/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot new file mode 100644 index 000000000..180d1aacc --- /dev/null +++ b/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter scalafmt test empty 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "format", + "fileGroupName": "scala", + "linter": "scalafmt", + "paths": [ + "test_data/empty.in.scala", + ], + "verb": "TRUNK_VERB_FMT", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/empty.in.scala", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "scalafmt", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`; diff --git a/linters/semgrep/plugin.yaml b/linters/semgrep/plugin.yaml index 9a0af399a..f3213979a 100644 --- a/linters/semgrep/plugin.yaml +++ b/linters/semgrep/plugin.yaml @@ -35,7 +35,7 @@ lint: - name: PATH list: ["${env.PATH}"] known_good_version: 1.33.2 - known_bad_versions: [1.5.1] # Does not work on MacOS + known_bad_versions: [1.5.1, 1.117.0] # Does not work on MacOS version_command: parse_regex: ${semver} run: semgrep --version diff --git a/linters/snyk/snyk.test.ts b/linters/snyk/snyk.test.ts index c382ce7ca..91fa6a531 100644 --- a/linters/snyk/snyk.test.ts +++ b/linters/snyk/snyk.test.ts @@ -1,5 +1,4 @@ -import { customLinterCheckTest } from "tests"; -import { TEST_DATA } from "tests/utils"; +import { linterCheckTest } from "tests"; // Requires SNYK_TOKEN to run -customLinterCheckTest({ linterName: "snyk", args: TEST_DATA, testName: "basic" }); +linterCheckTest({ linterName: "snyk" }); diff --git a/linters/snyk/test_data/SqlInjectionLess4.java b/linters/snyk/test_data/java.in.java similarity index 100% rename from linters/snyk/test_data/SqlInjectionLess4.java rename to linters/snyk/test_data/java.in.java diff --git a/linters/snyk/test_data/index.js b/linters/snyk/test_data/js.in.js similarity index 100% rename from linters/snyk/test_data/index.js rename to linters/snyk/test_data/js.in.js diff --git a/linters/snyk/test_data/snyk_v1.1295.0_basic.check.shot b/linters/snyk/test_data/snyk_v1.1295.0_basic.check.shot deleted file mode 100644 index a535e0542..000000000 --- a/linters/snyk/test_data/snyk_v1.1295.0_basic.check.shot +++ /dev/null @@ -1,145 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing linter snyk test basic 1`] = ` -{ - "issues": [ - { - "code": "java/Sqli", - "column": "18", - "file": "test_data/SqlInjectionLess4.java", - "isSecurity": true, - "issueClass": "ISSUE_CLASS_EXISTING", - "level": "LEVEL_HIGH", - "line": "59", - "linter": "snyk", - "message": "Unsanitized input from an HTTP parameter flows into executeUpdate, where it is used in an SQL query. This may result in an SQL Injection vulnerability.", - "ranges": [ - { - "filePath": "test_data/SqlInjectionLess4.java", - "length": "23", - "offset": "2394", - }, - ], - "targetType": "javascript", - }, - { - "code": "javascript/NoRateLimitingForExpensiveWebOperation", - "column": "18", - "file": "test_data/index.js", - "isSecurity": true, - "issueClass": "ISSUE_CLASS_EXISTING", - "level": "LEVEL_MEDIUM", - "line": "166", - "linter": "snyk", - "message": "This endpoint handler performs a file system operation and does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", - "ranges": [ - { - "filePath": "test_data/index.js", - "length": "1567", - "offset": "3702", - }, - ], - "targetType": "javascript", - }, - { - "code": "javascript/NoRateLimitingForExpensiveWebOperation", - "column": "21", - "file": "test_data/index.js", - "isSecurity": true, - "issueClass": "ISSUE_CLASS_EXISTING", - "level": "LEVEL_MEDIUM", - "line": "222", - "linter": "snyk", - "message": "This endpoint handler performs a file system operation and does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", - "ranges": [ - { - "filePath": "test_data/index.js", - "length": "242", - "offset": "5292", - }, - ], - "targetType": "javascript", - }, - { - "code": "javascript/NoSqli", - "column": "8", - "file": "test_data/index.js", - "isSecurity": true, - "issueClass": "ISSUE_CLASS_EXISTING", - "level": "LEVEL_HIGH", - "line": "39", - "linter": "snyk", - "message": "Unsanitized input from the HTTP request body flows into find, where it is used in an NoSQL query. This may result in an NoSQL Injection vulnerability.", - "ranges": [ - { - "filePath": "test_data/index.js", - "length": "4", - "offset": "918", - }, - ], - "targetType": "javascript", - }, - { - "code": "javascript/NoRateLimitingForExpensiveWebOperation", - "column": "18", - "file": "test_data/index.js", - "isSecurity": true, - "issueClass": "ISSUE_CLASS_EXISTING", - "level": "LEVEL_MEDIUM", - "line": "77", - "linter": "snyk", - "message": "This endpoint handler performs a system command execution and does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", - "ranges": [ - { - "filePath": "test_data/index.js", - "length": "928", - "offset": "1741", - }, - ], - "targetType": "javascript", - }, - ], - "lintActions": [ - { - "command": "code", - "fileGroupName": "java", - "linter": "snyk", - "paths": [ - "test_data/SqlInjectionLess4.java", - ], - "verb": "TRUNK_VERB_CHECK", - }, - { - "command": "code", - "fileGroupName": "javascript", - "linter": "snyk", - "paths": [ - "test_data/index.js", - ], - "verb": "TRUNK_VERB_CHECK", - }, - { - "command": "code", - "fileGroupName": "java", - "linter": "snyk", - "paths": [ - "test_data/SqlInjectionLess4.java", - ], - "upstream": true, - "verb": "TRUNK_VERB_CHECK", - }, - { - "command": "code", - "fileGroupName": "javascript", - "linter": "snyk", - "paths": [ - "test_data/index.js", - ], - "upstream": true, - "verb": "TRUNK_VERB_CHECK", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/snyk/test_data/snyk_v1.1295.0_java.check.shot b/linters/snyk/test_data/snyk_v1.1295.0_java.check.shot new file mode 100644 index 000000000..390821ea6 --- /dev/null +++ b/linters/snyk/test_data/snyk_v1.1295.0_java.check.shot @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter snyk test java 1`] = ` +{ + "issues": [ + { + "code": "java/Sqli", + "column": "18", + "file": "test_data/java.in.java", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "59", + "linter": "snyk", + "message": "Unsanitized input from an HTTP parameter flows into executeUpdate, where it is used in an SQL query. This may result in an SQL Injection vulnerability.", + "ranges": [ + { + "filePath": "test_data/java.in.java", + "length": "23", + "offset": "2394", + }, + ], + "targetType": "java", + }, + ], + "lintActions": [ + { + "command": "code", + "fileGroupName": "java", + "linter": "snyk", + "paths": [ + "test_data/java.in.java", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [ + { + "details": StringMatching /\\.\\*\\$/m, + "message": "test_data/java.in.java", + "name": "snyk", + }, + ], + "unformattedFiles": [], +} +`; diff --git a/linters/snyk/test_data/snyk_v1.1295.0_js.check.shot b/linters/snyk/test_data/snyk_v1.1295.0_js.check.shot new file mode 100644 index 000000000..02ca7cb1e --- /dev/null +++ b/linters/snyk/test_data/snyk_v1.1295.0_js.check.shot @@ -0,0 +1,103 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter snyk test js 1`] = ` +{ + "issues": [ + { + "code": "javascript/NoRateLimitingForExpensiveWebOperation", + "column": "18", + "file": "test_data/js.in.js", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "166", + "linter": "snyk", + "message": "Expensive operation (a file system operation) is performed by an endpoint handler which does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", + "ranges": [ + { + "filePath": "test_data/js.in.js", + "length": "1567", + "offset": "3702", + }, + ], + "targetType": "javascript", + }, + { + "code": "javascript/NoRateLimitingForExpensiveWebOperation", + "column": "21", + "file": "test_data/js.in.js", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "222", + "linter": "snyk", + "message": "Expensive operation (a file system operation) is performed by an endpoint handler which does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", + "ranges": [ + { + "filePath": "test_data/js.in.js", + "length": "242", + "offset": "5292", + }, + ], + "targetType": "javascript", + }, + { + "code": "javascript/NoSqli", + "column": "8", + "file": "test_data/js.in.js", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "39", + "linter": "snyk", + "message": "Unsanitized input from the HTTP request body flows into find, where it is used in an NoSQL query. This may result in an NoSQL Injection vulnerability.", + "ranges": [ + { + "filePath": "test_data/js.in.js", + "length": "4", + "offset": "918", + }, + ], + "targetType": "javascript", + }, + { + "code": "javascript/NoRateLimitingForExpensiveWebOperation", + "column": "18", + "file": "test_data/js.in.js", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "77", + "linter": "snyk", + "message": "Expensive operation (a system command execution) is performed by an endpoint handler which does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.", + "ranges": [ + { + "filePath": "test_data/js.in.js", + "length": "928", + "offset": "1741", + }, + ], + "targetType": "javascript", + }, + ], + "lintActions": [ + { + "command": "code", + "fileGroupName": "javascript", + "linter": "snyk", + "paths": [ + "test_data/js.in.js", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [ + { + "details": StringMatching /\\.\\*\\$/m, + "message": "test_data/js.in.js", + "name": "snyk", + }, + ], + "unformattedFiles": [], +} +`; diff --git a/package-lock.json b/package-lock.json index f61099fff..469391833 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,32 +16,32 @@ "@types/debug": "^4.1.12", "@types/jest": "^29.5.14", "@types/jest-specific-snapshot": "^0.5.9", - "@types/node": "^22.10.10", + "@types/node": "^22.13.10", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^8.21.0", - "@typescript-eslint/parser": "^8.21.0", + "@typescript-eslint/eslint-plugin": "^8.26.0", + "@typescript-eslint/parser": "^8.26.0", "caller": "^1.1.0", "debug": "^4.4.0", "eslint": "9.14.0", - "eslint-config-prettier": "^10.0.1", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-config-prettier": "^10.1.1", + "eslint-import-resolver-typescript": "^3.8.3", "eslint-plugin-import": "^2.31.0", "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-jest": "^28.11.0", - "eslint-plugin-n": "^17.15.1", + "eslint-plugin-n": "^17.16.2", "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-simple-import-sort": "^12.1.1", "fast-sort": "^3.4.1", "jest": "^29.3.1", "jest-junit": "^16.0.0", "jest-specific-snapshot": "^8.0.0", - "semver": "^7.6.3", + "semver": "^7.7.1", "simple-git": "^3.27.0", - "ts-jest": "^29.2.5", + "ts-jest": "^29.2.6", "ts-node": "^10.9.2", "tsconfig-paths": "^4.1.2", - "typescript": "^5.7.3", - "typescript-eslint": "^8.21.0", + "typescript": "^5.8.2", + "typescript-eslint": "^8.26.0", "yaml": "^2.7.0" }, "engines": { @@ -1469,9 +1469,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.10.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz", - "integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==", + "version": "22.13.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", + "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "dev": true, "license": "MIT", "dependencies": { @@ -1503,21 +1503,21 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.21.0.tgz", - "integrity": "sha512-eTH+UOR4I7WbdQnG4Z48ebIA6Bgi7WO8HvFEneeYBxG8qCOYgTOFPSg6ek9ITIDvGjDQzWHcoWHCDO2biByNzA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz", + "integrity": "sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/type-utils": "8.21.0", - "@typescript-eslint/utils": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/type-utils": "8.26.0", + "@typescript-eslint/utils": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1529,20 +1529,83 @@ "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.21.0.tgz", - "integrity": "sha512-Wy+/sdEH9kI3w9civgACwabHbKl+qIOu0uFZ9IMKzX3Jpv9og0ZBJrZExGrPpFAY7rWsXuxs5e7CPPP17A4eYA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.26.0.tgz", + "integrity": "sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/typescript-estree": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4" }, "engines": { @@ -1554,18 +1617,81 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.21.0.tgz", - "integrity": "sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", + "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0" + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1576,16 +1702,16 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.21.0.tgz", - "integrity": "sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.26.0.tgz", + "integrity": "sha512-ruk0RNChLKz3zKGn2LwXuVoeBcUMh+jaqzN461uMMdxy5H9epZqIBtYj7UiPXRuOpaALXGbmRuZQhmwHhaS04Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.21.0", - "@typescript-eslint/utils": "8.21.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/utils": "8.26.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1596,13 +1722,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.21.0.tgz", - "integrity": "sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", + "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", "dev": true, "license": "MIT", "engines": { @@ -1614,20 +1740,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.21.0.tgz", - "integrity": "sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.26.0.tgz", + "integrity": "sha512-tiJ1Hvy/V/oMVRTbEOIeemA2XoylimlDQ03CgPPNaHYZbpsc78Hmngnt+WXZfJX1pjQ711V7g0H7cSJThGYfPQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1637,7 +1763,39 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/types": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -1650,6 +1808,19 @@ "balanced-match": "^1.0.0" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -1667,16 +1838,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.21.0.tgz", - "integrity": "sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-2L2tU3FVwhvU14LndnQCA2frYC8JnPDVKyQtWFPf8IYFMt/ykEN1bPolNhNbCVgOmdzTlWdusCTKA/9nKrf8Ig==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/typescript-estree": "8.21.0" + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1687,17 +1858,80 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.26.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.21.0.tgz", - "integrity": "sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", + "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", + "@typescript-eslint/types": "8.24.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2769,12 +3003,13 @@ } }, "node_modules/eslint-config-prettier": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", - "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.1.tgz", + "integrity": "sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==", "dev": true, + "license": "MIT", "bin": { - "eslint-config-prettier": "build/bin/cli.js" + "eslint-config-prettier": "bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" @@ -2799,19 +3034,19 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.8.3.tgz", + "integrity": "sha512-A0bu4Ks2QqDWNpeEgTQMPTngaMhuDu4yv6xpftBMAf+1ziXnpx+eSR1WRfoPTe2BAiAjHFZ7kSNx1fvr5g5pmQ==", "dev": true, + "license": "ISC", "dependencies": { "@nolyfill/is-core-module": "1.0.39", "debug": "^4.3.7", "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", + "get-tsconfig": "^4.10.0", "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" + "stable-hash": "^0.0.4", + "tinyglobby": "^0.2.12" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -3046,10 +3281,11 @@ } }, "node_modules/eslint-plugin-n": { - "version": "17.15.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.15.1.tgz", - "integrity": "sha512-KFw7x02hZZkBdbZEFQduRGH4VkIH4MW97ClsbAM4Y4E6KguBJWGfWG1P4HEIpZk2bkoWf0bojpnjNAhYQP8beA==", + "version": "17.16.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.16.2.tgz", + "integrity": "sha512-iQM5Oj+9o0KaeLoObJC/uxNGpktZCkYiTTBo8PkRWq3HwNcRxwpvSDFjBhQ5+HLJzBTy+CLDC5+bw0Z5GyhlOQ==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.1", "enhanced-resolve": "^5.17.1", @@ -3614,10 +3850,11 @@ } }, "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", "dev": true, + "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -5699,10 +5936,11 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -6065,6 +6303,51 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tmpl": { "version": "1.0.5", "dev": true, @@ -6090,10 +6373,11 @@ } }, "node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", + "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", "dev": true, + "license": "MIT", "engines": { "node": ">=18.12" }, @@ -6102,10 +6386,11 @@ } }, "node_modules/ts-jest": { - "version": "29.2.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", - "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "version": "29.2.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz", + "integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==", "dev": true, + "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", "ejs": "^3.1.10", @@ -6114,7 +6399,7 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.6.3", + "semver": "^7.7.1", "yargs-parser": "^21.1.1" }, "bin": { @@ -6311,10 +6596,11 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6324,15 +6610,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.21.0.tgz", - "integrity": "sha512-txEKYY4XMKwPXxNkN8+AxAdX6iIJAPiJbHE/FpQccs/sxw8Lf26kqwC3cn0xkHlW8kEbLhkhCsjWuMveaY9Rxw==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.26.0.tgz", + "integrity": "sha512-PtVz9nAnuNJuAVeUFvwztjuUgSnJInODAUx47VDwWPXzd5vismPOtPtt83tzNXyOjVQbPRp786D6WFW/M2koIA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.21.0", - "@typescript-eslint/parser": "8.21.0", - "@typescript-eslint/utils": "8.21.0" + "@typescript-eslint/eslint-plugin": "8.26.0", + "@typescript-eslint/parser": "8.26.0", + "@typescript-eslint/utils": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6343,7 +6629,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/unbox-primitive": { diff --git a/package.json b/package.json index aaf3e6c6f..1aa047127 100644 --- a/package.json +++ b/package.json @@ -14,32 +14,32 @@ "@types/debug": "^4.1.12", "@types/jest": "^29.5.14", "@types/jest-specific-snapshot": "^0.5.9", - "@types/node": "^22.10.10", + "@types/node": "^22.13.10", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^8.21.0", - "@typescript-eslint/parser": "^8.21.0", + "@typescript-eslint/eslint-plugin": "^8.26.0", + "@typescript-eslint/parser": "^8.26.0", "caller": "^1.1.0", "debug": "^4.4.0", "eslint": "9.14.0", - "eslint-config-prettier": "^10.0.1", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-config-prettier": "^10.1.1", + "eslint-import-resolver-typescript": "^3.8.3", "eslint-plugin-import": "^2.31.0", "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-jest": "^28.11.0", - "eslint-plugin-n": "^17.15.1", + "eslint-plugin-n": "^17.16.2", "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-simple-import-sort": "^12.1.1", "fast-sort": "^3.4.1", "jest": "^29.3.1", "jest-junit": "^16.0.0", "jest-specific-snapshot": "^8.0.0", - "semver": "^7.6.3", + "semver": "^7.7.1", "simple-git": "^3.27.0", - "ts-jest": "^29.2.5", + "ts-jest": "^29.2.6", "ts-node": "^10.9.2", "tsconfig-paths": "^4.1.2", - "typescript": "^5.7.3", - "typescript-eslint": "^8.21.0", + "typescript": "^5.8.2", + "typescript-eslint": "^8.26.0", "yaml": "^2.7.0" }, "bundleDependencies": [ diff --git a/runtimes/ruby/plugin.yaml b/runtimes/ruby/plugin.yaml index 1f738f00e..af8da07fa 100644 --- a/runtimes/ruby/plugin.yaml +++ b/runtimes/ruby/plugin.yaml @@ -1,15 +1,15 @@ version: 0.1 downloads: - name: ruby-build - version: 20241105 + version: 20250409 downloads: - os: linux: linux macos: macos - url: https://github.com/rbenv/ruby-build/archive/refs/tags/v20241105.tar.gz + url: https://github.com/rbenv/ruby-build/archive/refs/tags/v20250409.tar.gz strip_components: 1 - name: ruby-install - version: 3.1.4 + version: 3.4.2 downloads: # Functionally a separate download used for Windows only. Runs OOTB and does not require a prepare build step. - os: windows @@ -44,7 +44,7 @@ runtimes: - name: SYSTEMDRIVE value: ${env.SYSTEMDRIVE} optional: true - known_good_version: 3.1.4 + known_good_version: 3.4.2 version_commands: - run: ruby --version parse_regex: ruby ${semver}(p+.*)? diff --git a/tests/parse/index.ts b/tests/parse/index.ts index d53cf2424..fa5d2eab2 100644 --- a/tests/parse/index.ts +++ b/tests/parse/index.ts @@ -17,6 +17,7 @@ const RESULTS_FILE = path.resolve(REPO_ROOT, "results.json"); const FAILURES_FILE = path.resolve(REPO_ROOT, "failures.yaml"); const RERUN_FILE = path.resolve(REPO_ROOT, "reruns.txt"); +const EXCLUDED_RERUN_LINTERS: string[] = ["snyk"]; const VALIDATED_LINTER_BLOCKLIST: string[] = []; const RUN_ID = process.env.RUN_ID ?? ""; @@ -357,12 +358,14 @@ const writeTestResults = (testResults: TestResultSummary) => { const allMetadata = Array.from(testFailureMetadata.values()); // Must have at least one assertion_failure and no other failure types in order to proactively generate snapshot. const shouldRerunTest = + !EXCLUDED_RERUN_LINTERS.includes(linter) && allMetadata.every( (failureMode) => failureMode === "assertion_failure" || failureMode === "skipped" || failureMode === "passed", - ) && allMetadata.find((failureMode) => failureMode === "assertion_failure") !== undefined; + ) && + allMetadata.find((failureMode) => failureMode === "assertion_failure") !== undefined; if (shouldRerunTest) { rerunPaths.push(testFilePath); } diff --git a/tests/repo_tests/config_check.test.ts b/tests/repo_tests/config_check.test.ts index b7e03a679..73ecb0384 100644 --- a/tests/repo_tests/config_check.test.ts +++ b/tests/repo_tests/config_check.test.ts @@ -148,7 +148,7 @@ describe("Global config health check", () => { "dotenv-linter", "git-diff-check", "gofmt", - "golangci-lint", + "golangci-lint2", "hadolint", "haml-lint", "isort",