Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 13 additions & 32 deletions .github/config/super-linter.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,23 @@ FILTER_REGEX_EXCLUDE=mvnw|src/main/generated/.*|docs/themes/.*|keystore.pkcs12|.
IGNORE_GITIGNORED_FILES=true
JAVA_FILE_NAME=google_checks.xml
LOG_LEVEL=ERROR
# conflicts with prettier
VALIDATE_BIOME_FORMAT=false
# conflicts with prettier
VALIDATE_BIOME_LINT=false
# disable kubernetes linter - complains about resource limits, etc
VALIDATE_CHECKOV=false
VALIDATE_CSS=false
VALIDATE_CSS_PRETTIER=false
VALIDATE_DOCKERFILE_HADOLINT=false
VALIDATE_GIT_COMMITLINT=false
# done by maven
VALIDATE_GOOGLE_JAVA_FORMAT=false
# times out
VALIDATE_GO_MODULES=false
VALIDATE_HTML=false
# done by checkstyle
VALIDATE_JAVA=false
# we have many duplicate code in our codebase for demo purposes
VALIDATE_JSCPD=false
VALIDATE_PYTHON_PYLINT=false
# conflicts with black
VALIDATE_PYTHON_RUFF_FORMAT=false
# excluding simpleclient-archive doesn't seem to work
VALIDATE_TRIVY=false

FIX_ENV=true
FIX_GITHUB_ACTIONS_ZIZMOR=true
FIX_GO=true
FIX_JAVASCRIPT_PRETTIER=true
FIX_JSON=true
FIX_JSONC=true
FIX_JSONC_PRETTIER=true
VALIDATE_BASH=true
VALIDATE_EDITORCONFIG=true
VALIDATE_GIT_MERGE_CONFLICT_MARKERS=true
VALIDATE_GITHUB_ACTIONS=true
VALIDATE_JSON_PRETTIER=true
VALIDATE_MARKDOWN=true
VALIDATE_MARKDOWN_PRETTIER=true
VALIDATE_RENOVATE=true
VALIDATE_SHELL_SHFMT=true
VALIDATE_SPELL_CODESPELL=true
VALIDATE_XML=true
VALIDATE_YAML_PRETTIER=true

FIX_JSON_PRETTIER=true
FIX_MARKDOWN=true
FIX_MARKDOWN_PRETTIER=true
FIX_PYTHON_BLACK=true
FIX_SHELL_SHFMT=true
FIX_SPELL_CODESPELL=true
FIX_YAML_PRETTIER=true
17 changes: 14 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,26 @@ run = "./mvnw install -DskipTests -Dcoverage.skip=true"
# Shared lint tasks from flint (https://github.com/grafana/flint)
[tasks."lint:super-linter"]
description = "Run Super-Linter on the repository"
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/super-linter.sh" # v0.7.1
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/super-linter.sh" # v0.8.0

[tasks."lint:links"]
description = "Lint links"
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/links.sh" # v0.7.1
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/links.sh" # v0.8.0

[tasks."lint:renovate-deps"]
description = "Verify renovate-tracked-deps.json is up to date"
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/renovate-deps.py" # v0.7.1
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/renovate-deps.py" # v0.8.0

[tasks."setup:native-lint-tools"]
description = "Install native lint tools matching the pinned super-linter version"
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/setup/native-lint-tools.sh" # v0.8.0
[tasks.pre-commit]
description = "Pre-commit hook: native lint with autofix"
depends = ["setup:native-lint-tools"]
run = "mise run lint:super-linter -- --native --autofix"
[tasks."setup:pre-commit-hook"]
description = "Install git pre-commit hook that runs native linting"
run = "mise generate git-pre-commit --write --task=pre-commit"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth adding these new commands to the readme?


[tasks."lint"]
description = "Run all lints"
Expand Down
Loading