diff --git a/.github/config/super-linter.env b/.github/config/super-linter.env index 818a713..c8cfe5c 100644 --- a/.github/config/super-linter.env +++ b/.github/config/super-linter.env @@ -15,7 +15,6 @@ VALIDATE_PYTHON_BLACK=false FIX_BIOME_FORMAT=true FIX_ENV=true FIX_JSONC=true -FIX_JSONC_PRETTIER=true FIX_MARKDOWN=true FIX_MARKDOWN_PRETTIER=true FIX_NATURAL_LANGUAGE=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 4907ec9..3101bf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.0] - 2026-02-14 + ### Added - Initial release of flint lint task scripts @@ -15,4 +17,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Renovate tracked-deps verification and generation - Unified AUTOFIX environment variable pattern across all linters -[Unreleased]: https://github.com/grafana/flint/commits/main +[Unreleased]: https://github.com/grafana/flint/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/grafana/flint/releases/tag/v0.1.0 diff --git a/README.md b/README.md index f2870a9..f5c1bff 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,30 @@ The `lint:renovate-deps` task runs Renovate locally in `--platform=local` mode, - **Routine regeneration** → After any change to `renovate.json5`, Dockerfiles, `go.mod`, `package.json`, or other files Renovate scans, the linter will detect the change and require regeneration. +## Automatic version updates with Renovate + +To let Renovate automatically update the pinned flint version in your +`mise.toml`, add this custom manager to your `renovate.json5`: + +```json5 +{ + customManagers: [ + { + customType: "regex", + description: "Update raw.githubusercontent.com version tags in mise.toml", + managerFilePatterns: ["/^mise\\.toml$/"], + matchStrings: [ + "https://raw\\.githubusercontent\\.com/(?[^/]+/[^/]+)/(?v[^/]+)/", + ], + datasourceTemplate: "github-tags", + }, + ], +} +``` + +This matches all `raw.githubusercontent.com` URLs in `mise.toml` and updates +the version tag (e.g., `v0.1.0`) when a new release is published. + ## Per-repo configuration (not included) Each consuming repository must provide its own: diff --git a/tasks/lint/renovate-deps.py b/tasks/lint/renovate-deps.py index a8c9da6..67b3e7c 100755 --- a/tasks/lint/renovate-deps.py +++ b/tasks/lint/renovate-deps.py @@ -112,7 +112,23 @@ def main(): log_path = run_renovate(tmpdir) generated_data = extract_deps(log_path) - committed_data = json.loads(COMMITTED.read_text()) + if not COMMITTED.exists(): + if autofix: + print("AUTOFIX=true: Creating renovate-tracked-deps.json...") + with open(COMMITTED, "w", encoding="utf-8") as f: + json.dump(generated_data, f, indent=2) + f.write("\n") + print("renovate-tracked-deps.json has been created.") + committed_data = generated_data + else: + 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) + else: + committed_data = json.loads(COMMITTED.read_text()) if committed_data == generated_data: print("renovate-tracked-deps.json is up to date.")