Skip to content

Commit f02cfd2

Browse files
authored
chore: switch super-linter to allow-list format (#1149)
## Summary - Switch `super-linter.env` from deny-list (`VALIDATE_X=false`) to allow-list (`VALIDATE_X=true`) - Makes explicit which linters run, avoids noise from irrelevant linters - Drops high-cost/redundant linters: gitleaks (TruffleHog covers this), checkov, trivy, jscpd, biome (prettier conflict) ## What's enabled - **Shell**: shellcheck, shfmt - **Markdown**: markdownlint, prettier - **Data**: JSON prettier, YAML prettier, dotenv - **Code**: C#, JavaScript prettier, google-java-format, Go modules, Python (black, isort, ruff) - **Cross-language**: editorconfig, actionlint, codespell, merge conflict markers, renovate ## What's dropped | Linter | Reason | |--------|--------| | gitleaks | TruffleHog workflow already covers secret scanning | | checkov/trivy | security scanning not needed for examples repo | | biome | conflicts with prettier | | jscpd | too noisy for example code with intentional duplication | | JSONC | covered by JSON prettier | Happy to add back anything you think is valuable — the goal is to make the list explicit and trim what doesn't earn its runtime cost. ## Test plan - [ ] CI lint passes --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent c69d96f commit f02cfd2

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

.github/config/super-linter.env

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
1+
DOTNET_GENERATE_ASPNET_CERTIFICATE=false
2+
DOTNET_NOLOGO=true
13
FILTER_REGEX_EXCLUDE=mvnw|examples/dotnet/.gitignore|renovate-tracked-deps.json
24
IGNORE_GITIGNORED_FILES=true
35
JAVA_FILE_NAME=google_checks.xml
46
LOG_LEVEL=ERROR
7+
NUGET_XMLDOC_MODE=skip
58

6-
# conflicts with prettier
7-
VALIDATE_BIOME_FORMAT=false
8-
# conflicts with prettier
9-
VALIDATE_BIOME_LINT=false
10-
# disable kubernetes linter - complains about resource limits, etc
11-
VALIDATE_CHECKOV=false
12-
VALIDATE_DOCKERFILE_HADOLINT=false
13-
VALIDATE_GIT_COMMITLINT=false
14-
# golangci-lint (non-module mode) can't handle two Go modules; GO_MODULES covers this
15-
VALIDATE_GO=false
16-
# we have many duplicate code in our codebase for demo purposes
17-
VALIDATE_JSCPD=false
18-
# conflicts with black
19-
VALIDATE_PYTHON_RUFF_FORMAT=false
9+
# Keys MUST be sorted alphabetically — dotenv-linter enforces this in CI.
2010

21-
# Avoid redundant work linting C# files
22-
DOTNET_GENERATE_ASPNET_CERTIFICATE=false
23-
DOTNET_NOLOGO=true
24-
NUGET_XMLDOC_MODE=skip
25-
# excluding examples doesn't seem to work
26-
VALIDATE_TRIVY=false
11+
# --- Allow-list: only these linters run ---
12+
# (switching from deny-list to allow-list for clarity and performance)
13+
14+
VALIDATE_BASH=true
15+
VALIDATE_CSHARP=true
16+
VALIDATE_EDITORCONFIG=true
17+
VALIDATE_ENV=true
18+
VALIDATE_GITHUB_ACTIONS=true
19+
VALIDATE_GIT_MERGE_CONFLICT_MARKERS=true
20+
VALIDATE_GOOGLE_JAVA_FORMAT=true
21+
VALIDATE_GO_MODULES=true
22+
VALIDATE_JAVASCRIPT_PRETTIER=true
23+
VALIDATE_JSON_PRETTIER=true
24+
VALIDATE_MARKDOWN=true
25+
VALIDATE_MARKDOWN_PRETTIER=true
26+
VALIDATE_PYTHON_BLACK=true
27+
VALIDATE_PYTHON_ISORT=true
28+
VALIDATE_PYTHON_RUFF=true
29+
VALIDATE_RENOVATE=true
30+
VALIDATE_SHELL_SHFMT=true
31+
VALIDATE_SPELL_CODESPELL=true
32+
VALIDATE_YAML_PRETTIER=true
2733

34+
# --- Autofix ---
2835
FIX_CSHARP=true
2936
FIX_ENV=true
3037
FIX_GOOGLE_JAVA_FORMAT=true
3138
FIX_GO_MODULES=true
3239
FIX_JAVASCRIPT_PRETTIER=true
33-
FIX_JSON=true
34-
FIX_JSONC=true
35-
FIX_JSONC_PRETTIER=true
3640
FIX_JSON_PRETTIER=true
3741
FIX_MARKDOWN=true
3842
FIX_MARKDOWN_PRETTIER=true

0 commit comments

Comments
 (0)