From 2d406d041fa2cb091395b0fa488fa0305e5c4d67 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 22 Apr 2026 06:00:31 +0000 Subject: [PATCH 1/6] ci: update to rust version of flint Signed-off-by: Gregor Zeitlinger --- .github/config/flint.toml | 2 ++ .github/workflows/reusable-link-check.yml | 4 ++-- mise.toml | 17 +++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .github/config/flint.toml diff --git a/.github/config/flint.toml b/.github/config/flint.toml new file mode 100644 index 00000000000..d1d7d128746 --- /dev/null +++ b/.github/config/flint.toml @@ -0,0 +1,2 @@ +[checks.lychee] +check_all_local = true diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index 8ea87549c37..a7487c10ae1 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -22,10 +22,10 @@ jobs: GITHUB_TOKEN: ${{ github.token }} GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }} PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} - run: mise run lint:links + run: mise run lint - name: Link check for pushes and scheduled workflows if: github.event_name != 'pull_request' env: GITHUB_TOKEN: ${{ github.token }} - run: mise run lint:links --full + run: mise run lint diff --git a/mise.toml b/mise.toml index 11486456774..fc9b5e223ca 100644 --- a/mise.toml +++ b/mise.toml @@ -1,6 +1,11 @@ [tools] +# Linters +"github:grafana/flint" = "0.20.3" lychee = "0.23.0" +[env] +FLINT_CONFIG_DIR = ".github/config" + [settings] # Only install tools explicitly defined in the [tools] section above idiomatic_version_file_enable_tools = [] @@ -11,7 +16,11 @@ windows_executable_extensions = ["sh"] windows_default_file_shell_args = "bash" use_file_shell_for_executable_tasks = true -# Pick the tasks you need from flint (https://github.com/grafana/flint) -[tasks."lint:links"] -description = "Check for broken links in changed files + all local links" -file = "https://raw.githubusercontent.com/grafana/flint/9de186b090a2ce39486ae3b1d3e696bd2e200d6a/tasks/lint/links.sh" # v0.20.3 +[tasks.lint] +description = "Run lint checks" +raw_args = true +run = "flint run" + +[tasks."lint:fix"] +description = "Auto-fix lint issues" +run = "flint run --fix" From bdc9667f0be3060695150ab47674bc2c9a56d5aa Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 22 Apr 2026 06:01:35 +0000 Subject: [PATCH 2/6] ci: preserve full link-check mode on push Signed-off-by: Gregor Zeitlinger --- .github/workflows/reusable-link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index a7487c10ae1..b69b364e2b2 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -28,4 +28,4 @@ jobs: if: github.event_name != 'pull_request' env: GITHUB_TOKEN: ${{ github.token }} - run: mise run lint + run: mise run lint --full From 73db33decdabcaa0354d9dd4e56e1540bbab6f76 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 23 Apr 2026 16:38:31 +0000 Subject: [PATCH 3/6] chore: update flint to 0.20.4 Signed-off-by: Gregor Zeitlinger --- .github/renovate.json5 | 1 + .github/workflows/lint.yml | 32 ++++++++++++++++++++++++++++++++ .rumdl.toml | 5 +++++ .yamllint.yml | 8 ++++++++ biome.json | 6 ++++++ mise.toml | 14 +++++++++++++- 6 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .rumdl.toml create mode 100644 .yamllint.yml create mode 100644 biome.json diff --git a/.github/renovate.json5 b/.github/renovate.json5 index f5d4cb55f25..b427a417810 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,7 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ + "github>grafana/flint#v0.20.4", 'config:best-practices', 'helpers:pinGitHubActionDigestsToSemver', ], diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..e00a67b4f02 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: Lint + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Setup mise + uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1 + with: + version: v2026.4.18 + sha256: 6ae2d5f0f23a2f2149bc5d9bf264fe0922a1da843f1903e453516c462b23cc1f + + - name: Lint + env: + GITHUB_TOKEN: ${{ github.token }} + GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: mise run lint diff --git a/.rumdl.toml b/.rumdl.toml new file mode 100644 index 00000000000..066c5b40f02 --- /dev/null +++ b/.rumdl.toml @@ -0,0 +1,5 @@ +[MD013] +enabled = true +line-length = 120 +code-blocks = false +tables = false diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 00000000000..bf0a0027770 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,8 @@ +extends: relaxed + +rules: + document-start: disable + line-length: + max: 120 + indentation: + spaces: 2 diff --git a/biome.json b/biome.json new file mode 100644 index 00000000000..4e68cbc7f6a --- /dev/null +++ b/biome.json @@ -0,0 +1,6 @@ +{ + "formatter": { + "indentStyle": "space", + "indentWidth": 2 + } +} diff --git a/mise.toml b/mise.toml index fc9b5e223ca..45a0c4b9ec8 100644 --- a/mise.toml +++ b/mise.toml @@ -1,7 +1,19 @@ [tools] + # Linters -"github:grafana/flint" = "0.20.3" +actionlint = "1.7.12" +biome = "2.4.12" +"cargo:xmloxide" = "0.4.2" +"cargo:yaml-lint" = "0.1.0" +editorconfig-checker = "3.6.1" +"github:google/google-java-format" = "1.35.0" +"github:grafana/flint" = "0.20.4" +"github:pinterest/ktlint" = "1.8.0" lychee = "0.23.0" +"pipx:codespell" = "2.4.2" +rumdl = "0.1.80" +shellcheck = "0.11.0" +shfmt = "3.13.1" [env] FLINT_CONFIG_DIR = ".github/config" From a326ae086da190d60b27582f3ecd54caae0fc0de Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 23 Apr 2026 16:45:03 +0000 Subject: [PATCH 4/6] fix: add flint-managed linter configs Signed-off-by: Gregor Zeitlinger --- .github/config/.rumdl.toml | 5 +++++ .github/config/.yamllint.yml | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .github/config/.rumdl.toml create mode 100644 .github/config/.yamllint.yml diff --git a/.github/config/.rumdl.toml b/.github/config/.rumdl.toml new file mode 100644 index 00000000000..066c5b40f02 --- /dev/null +++ b/.github/config/.rumdl.toml @@ -0,0 +1,5 @@ +[MD013] +enabled = true +line-length = 120 +code-blocks = false +tables = false diff --git a/.github/config/.yamllint.yml b/.github/config/.yamllint.yml new file mode 100644 index 00000000000..bf0a0027770 --- /dev/null +++ b/.github/config/.yamllint.yml @@ -0,0 +1,8 @@ +extends: relaxed + +rules: + document-start: disable + line-length: + max: 120 + indentation: + spaces: 2 From 5fe17c2d68d499d98ff3d6aea2dcec19a3038c46 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 23 Apr 2026 16:48:23 +0000 Subject: [PATCH 5/6] fix: finish rust-native formatter cutover Signed-off-by: Gregor Zeitlinger --- .github/config/.yamllint.yml | 6 ++---- .yamllint.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/config/.yamllint.yml b/.github/config/.yamllint.yml index bf0a0027770..5a46209b134 100644 --- a/.github/config/.yamllint.yml +++ b/.github/config/.yamllint.yml @@ -2,7 +2,5 @@ extends: relaxed rules: document-start: disable - line-length: - max: 120 - indentation: - spaces: 2 + line-length: disable + indentation: warning diff --git a/.yamllint.yml b/.yamllint.yml index bf0a0027770..5a46209b134 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -2,7 +2,5 @@ extends: relaxed rules: document-start: disable - line-length: - max: 120 - indentation: - spaces: 2 + line-length: disable + indentation: warning From 1b45cbcecc37e84f0c096f532fff09dbd03a4e86 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 23 Apr 2026 16:55:57 +0000 Subject: [PATCH 6/6] chore: keep flint config under config dir Signed-off-by: Gregor Zeitlinger --- .rumdl.toml | 5 ----- .yamllint.yml | 6 ------ 2 files changed, 11 deletions(-) delete mode 100644 .rumdl.toml delete mode 100644 .yamllint.yml diff --git a/.rumdl.toml b/.rumdl.toml deleted file mode 100644 index 066c5b40f02..00000000000 --- a/.rumdl.toml +++ /dev/null @@ -1,5 +0,0 @@ -[MD013] -enabled = true -line-length = 120 -code-blocks = false -tables = false diff --git a/.yamllint.yml b/.yamllint.yml deleted file mode 100644 index 5a46209b134..00000000000 --- a/.yamllint.yml +++ /dev/null @@ -1,6 +0,0 @@ -extends: relaxed - -rules: - document-start: disable - line-length: disable - indentation: warning