Skip to content

Commit b2dd09b

Browse files
committed
chore(ci): exclude test fixtures from MegaLinter
v3 formatter test fixtures (testdata/) contain intentionally malformed, unordered, and fake-credentialed config files that trigger false positives in dotenv-linter, jsonlint, terragrunt, checkov, kingfisher, secretlint, and devskim. These are test inputs, not project configuration. - Exclude testdata/ from global file filter - Disable checkov (scans HCL fixtures as real infrastructure) - Demote devskim/kingfisher to non-blocking (localhost/fake creds in tests) - Exclude _test.go from secretlint (inline test connection strings)
1 parent b036b46 commit b2dd09b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.mega-linter.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,24 @@ DISABLE_LINTERS:
1919
- SPELL_CSPELL
2020
# ts-standard enforces StandardJS style which conflicts with Docusaurus conventions
2121
- TYPESCRIPT_STANDARD
22+
# Checkov scans HCL test fixtures as real infrastructure and flags fake resources
23+
- REPOSITORY_CHECKOV
2224

2325
DISABLE_ERRORS_LINTERS:
2426
# copypaste checker (JSCPD), can be added in a separate PR as this will need test refactor
2527
- COPYPASTE_JSCPD
2628
# zizmor requires GitHub API access that isn't always available in CI
2729
- ACTION_ZIZMOR
30+
# devskim flags localhost/http in test data — not real connections
31+
- REPOSITORY_DEVSKIM
32+
# kingfisher flags fake credentials in test fixtures
33+
- REPOSITORY_KINGFISHER
2834

29-
FILTER_REGEX_EXCLUDE: "(test/)"
30-
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: "(test/)"
31-
YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: "(test/)"
32-
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "(test/)"
35+
FILTER_REGEX_EXCLUDE: "(test/|testdata/)"
36+
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: "(test/|testdata/)"
37+
YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: "(test/|testdata/)"
38+
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "(test/|testdata/)"
39+
REPOSITORY_SECRETLINT_FILTER_REGEX_EXCLUDE: "(testdata/|_test\\.go$)"
3340
SHOW_ELAPSED_TIME: true
3441
FLAVOR_SUGGESTIONS: false
3542
REPORT_OUTPUT_FOLDER: megalinter-reports

0 commit comments

Comments
 (0)