Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .github/config/.rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MD013]
enabled = true
line-length = 120
code-blocks = false
tables = false
6 changes: 6 additions & 0 deletions .github/config/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: relaxed

rules:
document-start: disable
line-length: disable
indentation: warning
2 changes: 2 additions & 0 deletions .github/config/flint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[checks.lychee]
check_all_local = true
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
"github>grafana/flint#v0.20.4",
'config:best-practices',
'helpers:pinGitHubActionDigestsToSemver',
],
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you connect the dots for me here..

My read:

  • mise is ageneric task runner
  • lint is a task for mise defined in the repo to call fling run
  • Flint run is pluggable, lychee plugs in as a linter for flint - how exactly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

From https://github.com/grafana/flint#misetoml-setup

Flint reads your [tools] section to discover which linters to run


- 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 --full
6 changes: 6 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
29 changes: 25 additions & 4 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
[tools]

# Linters
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"

[settings]
# Only install tools explicitly defined in the [tools] section above
Expand All @@ -11,7 +28,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"
Loading