Skip to content

feat: add safe dotenv linting - #436

Merged
zeitlinger merged 4 commits into
mainfrom
agent/dotenv-linter-support
Jul 27, 2026
Merged

feat: add safe dotenv linting#436
zeitlinger merged 4 commits into
mainfrom
agent/dotenv-linter-support

Conversation

@zeitlinger

Copy link
Copy Markdown
Member

Summary

  • add dotenv-linter checking for explicit .env-style files
  • add serialized fixing without backup files or secret-bearing output
  • add generated documentation, tool pins, and focused end-to-end cases

Split from #430 so the dotenv-linter integration can be reviewed independently.

Validation

  • mise run generate
  • mise run lint:fix
  • mise exec -- cargo test

@zeitlinger

Copy link
Copy Markdown
Member Author

Pre-release consumer validation is running in open-telemetry/opentelemetry-java-examples#1226. The real dotenv-linter run found and fixed an ordering issue in otlp/docker/.env; the focused lint, full Flint lint, and Gradle assemble pass locally.

@zeitlinger
zeitlinger marked this pull request as ready for review July 24, 2026 18:40
@zeitlinger
zeitlinger requested a review from a team as a code owner July 24, 2026 18:40
Copilot AI review requested due to automatic review settings July 24, 2026 18:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class dotenv-linter integration to Flint so explicit .env-style files can be linted (and optionally fixed) without scanning unrelated config files, and wires the new tool through generated docs, pins, Renovate tracking, and end-to-end cases.

Changes:

  • Register a new built-in dotenv-linter check scoped to .env, .env.*, and *.env, including --fix support.
  • Add focused e2e cases for clean and auto-fix behavior.
  • Update generated docs/overview tables and add tool pin + Renovate tracking for dotenv-linter.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/cases/dotenv-linter/clean/test.toml Adds a clean e2e case for running dotenv-linter.
tests/cases/dotenv-linter/clean/files/mise.toml Pins dotenv-linter in the clean case fixture.
tests/cases/dotenv-linter/clean/files/.env Provides a sample valid .env file for the clean case.
tests/cases/dotenv-linter/auto-fix/test.toml Adds an auto-fix e2e case using a fake dotenv-linter binary.
tests/cases/dotenv-linter/auto-fix/files/mise.toml Pins dotenv-linter in the auto-fix case fixture.
tests/cases/dotenv-linter/auto-fix/files/.env Provides an invalid .env input to be fixed in the auto-fix case.
src/registry/checks.rs Registers the new dotenv-linter check (patterns, commands, docs links).
src/main.rs Updates the linters table fixture to include the new check entry.
README.md Updates the generated Files/Formats table to include Dotenv.
mise.toml Pins dotenv-linter for contributor tooling via mise.
docs/linters.md Adds generated documentation for dotenv-linter and updates the Files/Formats table.
default.json Includes dotenv-linter in the default tracked tools list.
.github/renovate.json5 Adds dotenv-linter to Renovate-managed dependencies.
.github/renovate-tracked-deps.json Tracks dotenv-linter releases via GitHub releases datasource.

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

Comment thread src/registry/checks.rs Outdated
Comment thread src/registry/checks.rs Outdated
matt-hensley
matt-hensley previously approved these changes Jul 24, 2026
@matt-hensley
matt-hensley self-requested a review July 24, 2026 19:30
@zeitlinger
zeitlinger marked this pull request as draft July 25, 2026 10:50
@zeitlinger
zeitlinger changed the base branch from main to agent/dedicated-linter-docs July 26, 2026 10:04
Base automatically changed from agent/dedicated-linter-docs to main July 27, 2026 09:24
@zeitlinger
zeitlinger dismissed matt-hensley’s stale review July 27, 2026 09:24

The base branch was changed.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger force-pushed the agent/dotenv-linter-support branch from d090ebc to 8a3bc31 Compare July 27, 2026 09:31
@zeitlinger
zeitlinger marked this pull request as ready for review July 27, 2026 09:39
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Comment thread docs/linters/dotenv-linter.md Outdated
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Comment thread docs/linters/dotenv-linter.md Outdated
Co-authored-by: Martin Costello <martin@martincostello.com>
@zeitlinger
zeitlinger enabled auto-merge (squash) July 27, 2026 16:15
@zeitlinger
zeitlinger merged commit 28b8d5f into main Jul 27, 2026
17 checks passed
@zeitlinger
zeitlinger deleted the agent/dotenv-linter-support branch July 27, 2026 16:31
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
zeitlinger pushed a commit that referenced this pull request Jul 27, 2026
## 🤖 New release

* `flint`: 0.22.9 -> 0.22.10

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.22.10](v0.22.9...v0.22.10) -
2026-07-27

### Added

- add safe dotenv linting
([#436](#436))
- add native Java formatting and regex replacements
([#407](#407))
- add scoped Kubernetes manifest linting
([#437](#437))
- add standalone Checkstyle linting
([#435](#435))
- improve Flint init and setup migrations
([#428](#428))
- define registry and execution contracts
([#427](#427))

### Fixed

- *(renovate)* avoid overlapping mise managers
([#446](#446))

### Other

- *(deps)* update dependency jdx/mise-action to v4.2.2
([#448](#448))
- make Windows aube installs cacheable
([#447](#447))
- *(deps)* update mise to v2026.7.12
([#444](#444))
- *(deps)* update linters
([#443](#443))
- move linter reference to dedicated pages
([#440](#440))
- *(deps)* lock file maintenance
([#445](#445))
- *(deps)* update taiki-e/install-action action to v2.85.0
([#442](#442))
- *(deps)* update taiki-e/install-action action to v2.84.1
([#441](#441))
- require silent happy paths for checks
([#439](#439))
- *(deps)* update grafana/shared-workflows/lint-pr-title action to
v1.2.4 ([#438](#438))
- add Linux musl release artifacts
([#421](#421))
- validate curated mise registry backends
([#429](#429))
- *(deps)* update rust crate tokio to v1.53.1
([#434](#434))
- *(deps)* update taiki-e/install-action action to v2.84.0
([#433](#433))
- *(deps)* update rust crate clap to v4.6.3
([#432](#432))
- *(deps)* update rust crate serde_json to v1.0.151
([#431](#431))
- record Flint v2 architecture decisions
([#426](#426))
- *(deps)* update taiki-e/install-action action to v2.83.4
([#423](#423))
- *(deps)* update actions/checkout digest to 3d3c42e
([#422](#422))
- *(deps)* update rust crate regex to v1.13.1
([#412](#412))
- document semantic PR title guidance
([#420](#420))
- *(deps)* update linters
([#418](#418))
- *(deps)* update dependency mise to v2026.7.7
([#417](#417))
- *(deps)* lock file maintenance
([#419](#419))
- *(deps)* update taiki-e/install-action action to v2.83.3
([#415](#415))
- *(deps)* update rust crate tokio to v1.52.4
([#414](#414))
- *(deps)* update dependency jdx/mise-action to v4.2.1
([#416](#416))
- *(deps)* update dependency rust to v1.97.1
([#413](#413))
- *(deps)* update rust crate clap to v4.6.2
([#411](#411))
- *(deps)* update rust crate globset to v0.4.19
([#410](#410))
- *(deps)* update rust crate toml_edit to v0.25.13
([#409](#409))
- *(deps)* update rust crate toml to v1.1.3
([#408](#408))
- document signed commit requirement
([#406](#406))
- batch rumdl file checks
([#404](#404))
- *(deps)* update taiki-e/install-action action to v2.83.2
([#405](#405))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants