Skip to content

Initial commit#1

Merged
zeitlinger merged 10 commits intomainfrom
exclude-auto-generated-files
Feb 14, 2026
Merged

Initial commit#1
zeitlinger merged 10 commits intomainfrom
exclude-auto-generated-files

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented Feb 14, 2026

Initial version.

Extracted from docker-otel-lgtm. Provides reusable mise task scripts
for running Super-Linter in Docker/Podman and lychee link checking
(including a "modified files only" optimization for CI).
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Add one-liner description to README and create CLAUDE.md with
architecture guidance for future Claude Code instances.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Consolidate renovate-deps generation into the linter script to support unified
fix workflows. When AUTOFIX=true, all linters either apply fixes (super-linter,
renovate-deps) or run normally (link checkers).

- Merge tasks/generate/renovate-tracked-deps.py into tasks/lint/renovate-deps.py
- Add AUTOFIX support to renovate-deps.py to regenerate tracked deps file
- Document AUTOFIX behavior in all link linter scripts
- Update README and CLAUDE.md with comprehensive AUTOFIX documentation
- Add CHANGELOG.md for version history
- Emphasize version pinning to avoid breaking changes
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Set up complete linting infrastructure using flint's own task scripts to
validate the repository (dogfooding). All linters now pass with autofix support.

Configuration:
- mise.toml: Define tools (lychee, node, renovate) and wire up lint tasks to
  local scripts in tasks/lint/
- .github/config/super-linter.env: Super-Linter config with FIX_* variables for
  autofix support; disabled Black (use Ruff instead), Checkov, and JSCPD
- .github/config/lychee.toml: Link checker config with GitHub blob URL remap
- .github/renovate.json5: Renovate config for dependency tracking
- .github/renovate-tracked-deps.json: Initial empty dependency snapshot
- .markdownlint.json: Disable MD060 (table alignment) for long table cells

Linter fixes applied:
- Terminology: repo→repository, git→Git, docker→Docker, Regex→Regular
  expression, auto-fix→autofix
- Markdown table formatting and proper spacing
- Python formatting with Ruff
- JSON trailing newlines
- Pylint and Flake8 line length exceptions where needed
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
- Add renovate-tracked-deps.json with actual dependencies detected from mise.toml
- Add comprehensive README section explaining the renovate-tracked-deps linter
- Update CLAUDE.md with renovate-tracked-deps documentation
- Enable FIX_JSONC_PRETTIER in super-linter config
- Disable VALIDATE_JSON_PRETTIER to avoid conflict with Biome formatter
- Format renovate.json5 with prettier
- Add GitHub Actions workflow for running linters on pull requests

The renovate-tracked-deps linter now detects:
- lychee, node, npm:renovate (from mise tools)
- ghcr.io/super-linter/super-linter (from regex custom manager)
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
- Remove FIX_JSON_PRETTIER since VALIDATE_JSON_PRETTIER is disabled
- Remove FIX_JSON (not needed, Biome handles JSON formatting)
- Update renovate-tracked-deps.json with GitHub Actions dependencies from lint.yml
- Apply Biome formatting (tabs) to renovate-tracked-deps.json

All linters now pass correctly without configuration conflicts.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
The FILTER_REGEX_EXCLUDE pattern was not properly matching the file path,
causing super-linter to format the auto-generated renovate-tracked-deps.json
file. Updated the pattern to use proper regex syntax (.*renovate-tracked-deps\.json)
to exclude the file from all linters. Also regenerated the tracked deps file and
added RENOVATE_TRACKED_DEPS_EXCLUDE env var to exclude github-actions.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Biome doesn't respect super-linter's FILTER_REGEX_EXCLUDE variable, so we need
to use Biome's own configuration file. This excludes:
- .github/renovate-tracked-deps.json (auto-generated by renovate-deps.py)
- .claude/ directory (local user settings)
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@zeitlinger zeitlinger changed the title Add Biome configuration to exclude auto-generated files Initial commit Feb 14, 2026
Remove references to v0.1.0 tag that doesn't exist yet, which was causing
link checker failures in CI. Update [Unreleased] link to point to commits
page instead of a tag comparison.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Copilot AI review requested due to automatic review settings February 14, 2026 15:45
@zeitlinger zeitlinger merged commit a09d75a into main Feb 14, 2026
11 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces "flint", a collection of reusable mise task scripts for linting workflows. The project provides standardized lint task scripts that can be consumed by other repositories via HTTP remote tasks, focusing on Super-Linter integration, lychee link checking, and Renovate dependency tracking verification.

Changes:

  • Added task scripts for Super-Linter (with Docker/Podman auto-detection), lychee link checking (all files, local files, and modified files), and Renovate tracked-deps verification
  • Implemented unified AUTOFIX environment variable pattern across all lint tasks
  • Included comprehensive documentation (README, CLAUDE.md, CHANGELOG) and configuration files for the repository itself

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tasks/lint/super-linter.sh Bash script to run Super-Linter with container runtime auto-detection and AUTOFIX support
tasks/lint/renovate-deps.py Python script to verify Renovate tracked dependencies are up to date
tasks/lint/local-links.sh Bash script to check local file links using lychee
tasks/lint/links.sh Bash script to check all links using lychee
tasks/lint/links-in-modified-files.sh Bash script to optimize link checking by only scanning modified files
mise.toml Mise configuration defining tools, environment variables, and task definitions
biome.json Biome configuration excluding specific files from formatting
README.md Comprehensive documentation for using the flint task scripts
CLAUDE.md AI assistant guidance document explaining repository structure and conventions
CHANGELOG.md Version history following Keep a Changelog format
.markdownlint.json Markdown linter configuration
.github/workflows/lint.yml GitHub Actions workflow for running lint tasks on pull requests
.github/renovate.json5 Renovate configuration with custom regex manager for mise.toml
.github/renovate-tracked-deps.json Committed snapshot of Renovate-tracked dependencies
.github/config/super-linter.env Super-Linter configuration with enabled validators and fix flags
.github/config/lychee.toml Lychee link checker configuration with remapping and exclusions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +10 to +18
VALIDATE_JSON_PRETTIER=false
# Use Ruff instead of Black for Python formatting
VALIDATE_PYTHON_BLACK=false

# Enable auto-fix for relevant linters
FIX_BIOME_FORMAT=true
FIX_ENV=true
FIX_JSONC=true
FIX_JSONC_PRETTIER=true
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

Line 10 disables VALIDATE_JSON_PRETTIER (with the comment explaining to use Biome instead), but line 18 enables FIX_JSONC_PRETTIER=true. This seems inconsistent - if Prettier is disabled for JSON validation, the FIX_JSONC_PRETTIER flag likely won't have any effect since the validator is disabled. Consider either removing FIX_JSONC_PRETTIER or clarifying whether JSONC is different from JSON in Super-Linter's context.

Copilot uses AI. Check for mistakes.
with tempfile.TemporaryDirectory() as tmpdir:
log_path = run_renovate(tmpdir)
generated_data = extract_deps(log_path)

Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

If the committed file .github/renovate-tracked-deps.json doesn't exist, COMMITTED.read_text() will raise a FileNotFoundError, which will cause an unhandled exception. Consider adding explicit error handling with a helpful message, such as:

if not COMMITTED.exists():
    print(f"ERROR: {COMMITTED} does not exist.", file=sys.stderr)
    sys.exit(1)
committed_data = json.loads(COMMITTED.read_text())

This will provide a clearer error message to users who haven't yet created the tracked deps file.

Suggested change
if not COMMITTED.exists():
print(f"ERROR: {COMMITTED} does not exist.", file=sys.stderr)
print(
"Run 'mise run lint:renovate-deps' with AUTOFIX=true to create it.",
file=sys.stderr,
)
sys.exit(1)

Copilot uses AI. Check for mistakes.
REPO_ROOT = Path(_repo_root_env)
COMMITTED = REPO_ROOT / ".github" / "renovate-tracked-deps.json"

EXCLUDED_MANAGERS = {m.strip() for m in os.environ.get("RENOVATE_TRACKED_DEPS_EXCLUDE", "").split(",") if m.strip()} # pylint: disable=line-too-long # noqa: E501
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

Line 25 is excessively long (over 120 characters) and requires both pylint and flake8 suppressions. Consider splitting this into multiple lines for better readability, for example:

EXCLUDED_MANAGERS = {
    m.strip()
    for m in os.environ.get("RENOVATE_TRACKED_DEPS_EXCLUDE", "").split(",")
    if m.strip()
}

This would eliminate the need for line-too-long suppressions and improve code maintainability.

Suggested change
EXCLUDED_MANAGERS = {m.strip() for m in os.environ.get("RENOVATE_TRACKED_DEPS_EXCLUDE", "").split(",") if m.strip()} # pylint: disable=line-too-long # noqa: E501
EXCLUDED_MANAGERS = {
m.strip()
for m in os.environ.get("RENOVATE_TRACKED_DEPS_EXCLUDE", "").split(",")
if m.strip()
}

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +20 to +33
file = "https://raw.githubusercontent.com/grafana/flint/v0.1.0/tasks/lint/super-linter.sh"
[tasks."lint:links"]
description = "Lint links in all files"
file = "https://raw.githubusercontent.com/grafana/flint/v0.1.0/tasks/lint/links.sh"
[tasks."lint:local-links"]
description = "Lint links in local files"
file = "https://raw.githubusercontent.com/grafana/flint/v0.1.0/tasks/lint/local-links.sh"
[tasks."lint:links-in-modified-files"]
description = "Lint links in modified files"
hide = true
file = "https://raw.githubusercontent.com/grafana/flint/v0.1.0/tasks/lint/links-in-modified-files.sh"
[tasks."lint:renovate-deps"]
description = "Verify renovate-tracked-deps.json is up to date"
file = "https://raw.githubusercontent.com/grafana/flint/v0.1.0/tasks/lint/renovate-deps.py"
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The documentation references version "v0.1.0" which doesn't exist yet (this is the initial commit). For the initial release, consider either changing these examples to use a placeholder version like "vX.Y.Z" or "VERSION", or ensure that version v0.1.0 will be tagged immediately after merging. As written, users following this README before v0.1.0 is tagged will encounter 404 errors.

Copilot uses AI. Check for mistakes.
Comment thread README.md
| ------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `SUPER_LINTER_ENV_FILE` | `.github/config/super-linter.env` | Path to the Super-Linter env file |
| `LYCHEE_CONFIG` | `.github/config/lychee.toml` | Path to the lychee config file |
| `LYCHEE_CONFIG_CHANGE_PATTERN` | `^(\.github/config/lychee\.toml\|\.mise/tasks/lint/.*\|mise\.toml)$` | Regular expression for files whose change triggers a full link check |
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The default value for LYCHEE_CONFIG_CHANGE_PATTERN in the table shows \| (escaped pipe) but the actual code uses unescaped | because grep -E uses extended regex syntax. In the markdown table, the pipe character | is a special character that needs escaping with backslash. However, the way it's written suggests users should copy this exact string including the backslashes, which would be incorrect. Consider wrapping the regex in backticks and using a different approach, or adding a note that this is the regex pattern (not the escaped markdown version).

Suggested change
| `LYCHEE_CONFIG_CHANGE_PATTERN` | `^(\.github/config/lychee\.toml\|\.mise/tasks/lint/.*\|mise\.toml)$` | Regular expression for files whose change triggers a full link check |
| `LYCHEE_CONFIG_CHANGE_PATTERN` | `^(\.github/config/lychee\.toml|\.mise/tasks/lint/.*|mise\.toml)$` | Regular expression for files whose change triggers a full link check |

Copilot uses AI. Check for mistakes.
zeitlinger added a commit that referenced this pull request Feb 14, 2026
- Remove FIX_JSONC_PRETTIER flag from super-linter.env to fix inconsistency with disabled VALIDATE_JSON_PRETTIER
- Add error handling in renovate-deps.py for missing renovate-tracked-deps.json file
- Split long EXCLUDED_MANAGERS line in renovate-deps.py into multiple lines for readability
- Update CHANGELOG.md to document v0.1.0 release
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger mentioned this pull request Feb 14, 2026
4 tasks
zeitlinger added a commit that referenced this pull request Feb 14, 2026
* Address PR #1 review comments

- Remove FIX_JSONC_PRETTIER flag from super-linter.env to fix inconsistency with disabled VALIDATE_JSON_PRETTIER
- Add error handling in renovate-deps.py for missing renovate-tracked-deps.json file
- Split long EXCLUDED_MANAGERS line in renovate-deps.py into multiple lines for readability
- Update CHANGELOG.md to document v0.1.0 release
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* Fix AUTOFIX handling for missing file

- Add logic to create renovate-tracked-deps.json when AUTOFIX=true and file doesn't exist
- Keep EXCLUDED_MANAGERS on single line per Ruff formatter preference, with linter suppressions
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

---------

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
zeitlinger added a commit that referenced this pull request Feb 14, 2026
* Address PR #1 review comments

- Remove FIX_JSONC_PRETTIER flag from super-linter.env to fix inconsistency with disabled VALIDATE_JSON_PRETTIER
- Add error handling in renovate-deps.py for missing renovate-tracked-deps.json file
- Split long EXCLUDED_MANAGERS line in renovate-deps.py into multiple lines for readability
- Update CHANGELOG.md to document v0.1.0 release
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* Fix AUTOFIX handling for missing file

- Add logic to create renovate-tracked-deps.json when AUTOFIX=true and file doesn't exist
- Keep EXCLUDED_MANAGERS on single line per Ruff formatter preference, with linter suppressions
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* Add Renovate custom manager docs for automatic version updates
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* Format README Renovate snippet
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

---------

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger deleted the exclude-auto-generated-files branch February 16, 2026 06:01
This was referenced Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants