Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0f25ad4
chore: migrate from flint v1 (super-linter) to flint v2 binary
zeitlinger Apr 8, 2026
d39fbc7
chore: update renovate-tracked-deps for flint v2 tools
zeitlinger Apr 8, 2026
8653637
chore: use full multi-line license header text
zeitlinger Apr 8, 2026
63b8ce0
fix: refresh flint v2 migration
zeitlinger Apr 21, 2026
ba9c472
fix: keep fix alias and align license header text
zeitlinger Apr 21, 2026
bb734ab
chore: switch flint migration to v0.20.3
zeitlinger Apr 21, 2026
fc7b442
ci: normalize flint init output
zeitlinger Apr 21, 2026
9727c12
ci: keep markdownlint exceptions local
zeitlinger Apr 21, 2026
a48cf1e
Merge origin/main into feat/flint-v2-migration
zeitlinger Apr 21, 2026
4974ccc
chore: simplify lint tasks
zeitlinger Apr 21, 2026
e43dea7
docs: clarify markdown line length policy
zeitlinger Apr 21, 2026
2431a8f
chore: clarify tool grouping
zeitlinger Apr 21, 2026
54df30f
chore: separate tools from linters
zeitlinger Apr 21, 2026
547e2c7
chore: group flint with linters
zeitlinger Apr 21, 2026
d906733
chore: drop redundant tools heading
zeitlinger Apr 21, 2026
361ff3d
chore: tighten mise tool spacing
zeitlinger Apr 21, 2026
e284979
chore: drop pre-commit setup task
zeitlinger Apr 21, 2026
cda1842
chore: preserve markdownlint config
zeitlinger Apr 21, 2026
8b4d549
chore: replace spotless with flint linting
zeitlinger Apr 21, 2026
1db27cb
chore: refresh renovate tracked deps
zeitlinger Apr 21, 2026
cf4b158
chore: restore markdownlint config
zeitlinger Apr 21, 2026
d5201b8
chore: scope line length by file type
zeitlinger Apr 21, 2026
0d8f17a
chore: enforce markdown line length
zeitlinger Apr 21, 2026
07ce173
chore: apply prettier fixes
zeitlinger Apr 21, 2026
e67342b
chore: tighten line length enforcement
zeitlinger Apr 21, 2026
0f792e6
chore: apply prettier fixes
zeitlinger Apr 21, 2026
2b54954
chore: restore upstream reference
zeitlinger Apr 21, 2026
5f93725
chore: apply java formatting
zeitlinger Apr 21, 2026
90265a8
docs: align markdown lint guidance
zeitlinger Apr 21, 2026
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ indent_size = 2

[*.java]
indent_size = 2

[*.md]
max_line_length = 120
Comment thread
zeitlinger marked this conversation as resolved.
Outdated
18 changes: 18 additions & 0 deletions .github/config/flint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[settings]
exclude = [
"CHANGELOG.md",
"gradlew",
Comment thread
zeitlinger marked this conversation as resolved.
"buildscripts/spotless.license.java",
]

[checks.license-header]
text = """
/*
* Copyright Grafana Labs
* SPDX-License-Identifier: Apache-2.0
*/
"""
Comment thread
zeitlinger marked this conversation as resolved.
patterns = ["**/*.java"]

[checks.renovate-deps]
exclude_managers = ["github-actions", "github-runners"]
29 changes: 0 additions & 29 deletions .github/config/super-linter.env

This file was deleted.

17 changes: 12 additions & 5 deletions .github/renovate-tracked-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@
},
"mise.toml": {
"mise": [
"actionlint",
"cargo:xmloxide",
"editorconfig-checker",
"github:google/google-java-format",
"github:grafana/flint",
"hadolint",
"java",
"lychee",
"node",
"npm:@biomejs/biome",
"npm:markdownlint-cli2",
"npm:prettier",
"npm:renovate",
"ubi:google/google-java-format"
],
"regex": [
"ghcr.io/super-linter/super-linter",
"grafana/flint"
"pipx:codespell",
"shellcheck",
"shfmt"
]
},
"scripts/otel_operator/Dockerfile": {
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extends: [
"config:best-practices",
"config:recommended",
"github>grafana/flint",
"github>grafana/flint#v0.20.3",
],
platformCommit: "enabled",
automerge: true,
Expand Down
11 changes: 0 additions & 11 deletions .markdownlint.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Line length is enforced by editorconfig-checker via .editorconfig
Comment thread
zeitlinger marked this conversation as resolved.
Outdated
MD013: false
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Package relocation (`gradle/shadow.gradle`) moves OpenTelemetry classes to `io.o
After modifying non-Java files (Markdown, YAML, Dockerfiles, shell scripts, etc.), always run linting via mise:

```sh
mise run lint:super-linter # run super-linter only
mise run fix # auto-fix lint issues
mise run lint # run lint checks
mise run lint:fix # auto-fix lint issues
Comment thread
zeitlinger marked this conversation as resolved.
```

Lint tasks are sourced from [grafana/flint](https://github.com/grafana/flint).
Expand Down
7 changes: 7 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// Keep JSON formatting aligned with the repo's two-space style.
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
84 changes: 23 additions & 61 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,76 +1,38 @@
[tools]

# Linters
actionlint = "1.7.10"
"cargo:xmloxide" = "0.4.1"
editorconfig-checker = "v3.6.0"
"github:google/google-java-format" = "1.34.1"
Comment thread
zeitlinger marked this conversation as resolved.
"github:grafana/flint" = "0.20.3"
hadolint = "2.14.0"
java = "temurin-25.0.1+8.0.LTS"
lychee = "0.22.0"
node = "24.15.0"
"npm:@biomejs/biome" = "2.4.12"
"npm:markdownlint-cli2" = "0.17.2"
"npm:prettier" = "3.8.1"
"npm:renovate" = "43.127.1"
"ubi:google/google-java-format" = "1.34.1"
"pipx:codespell" = "2.4.1"
shellcheck = "v0.11.0"
shfmt = "v3.12.0"

[env]
RENOVATE_TRACKED_DEPS_EXCLUDE="github-actions,github-runners"
# renovate: datasource=docker depName=ghcr.io/super-linter/super-linter
SUPER_LINTER_VERSION="slim-v8.4.0@sha256:8421cd4687937ac32a829539d03de51a147c164b42842cbfb20aada83ce1bb0c"
FLINT_CONFIG_DIR = ".github/config"

[tasks.build]
description = "Build the Java project"
run = "./gradlew build"

# 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/5af56d473d2f82ec5af0fad36b054bde2bd2f8cf/tasks/lint/super-linter.sh" # v0.20.1

[tasks."lint:links"]
description = "Check for broken links in changed files + all local links"
file = "https://raw.githubusercontent.com/grafana/flint/5af56d473d2f82ec5af0fad36b054bde2bd2f8cf/tasks/lint/links.sh" # v0.20.1

[tasks."lint:renovate-deps"]
description = "Verify renovate-tracked-deps.json is up to date"
file = "https://raw.githubusercontent.com/grafana/flint/5af56d473d2f82ec5af0fad36b054bde2bd2f8cf/tasks/lint/renovate-deps.py" # v0.20.1

[tasks."setup:native-lint-tools"]
description = "Install native lint tools matching the pinned super-linter version"
file = "https://raw.githubusercontent.com/grafana/flint/5af56d473d2f82ec5af0fad36b054bde2bd2f8cf/tasks/setup/native-lint-tools.sh" # v0.20.1

[tasks."lint:java"]
description = "Check Java formatting and license headers (changed files only)"
run = """
files=$(git diff --name-only --diff-filter=d origin/main...HEAD -- '*.java')
[ -z "$files" ] && exit 0
failed=0
for f in $files; do
if ! head -4 "$f" | grep -q "SPDX-License-Identifier: Apache-2.0"; then
echo "Missing license header: $f"
failed=1
fi
done
google-java-format --dry-run --set-exit-if-changed $files || failed=1
exit $failed
"""

[tasks."lint:fast"]
description = "Run fast lints (no Renovate)"
depends = ["lint:super-linter", "lint:links", "lint:java"]

[tasks.native-lint]
description = "Run lints natively (no container)"
run = "NATIVE=true mise run lint:fast"

[tasks.pre-commit]
description = "Pre-commit hook: native lint"
depends = ["setup:native-lint-tools"]
run = "NATIVE=true mise run lint:fast"
[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"

[tasks.lint]
description = "Run all lints"
depends = ["lint:fast", "lint:renovate-deps"]
run = "flint run"

[tasks."lint:fix"]
description = "Auto-fix lint issues"
run = "flint run --fix"

[tasks.fix]
description = "Auto-fix lint issues and regenerate tracked deps"
run = """
files=$(git diff --name-only --diff-filter=d origin/main...HEAD -- '*.java')
[ -n "$files" ] && google-java-format -i $files
AUTOFIX=true mise run lint
"""
[tasks."setup:pre-commit-hook"]
description = "Install git pre-commit hook"
run = "mise generate git-pre-commit --write --task=lint"
Loading