Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .github/renovate-tracked-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"packageName": "rhysd/actionlint",
"datasource": "github-releases"
},
"aqua:dotenv-linter/dotenv-linter": {
"packageName": "dotenv-linter/dotenv-linter",
"datasource": "github-tags"
},
"aqua:jonwiggins/xmloxide": {
"packageName": "jonwiggins/xmloxide",
"datasource": "github-tags"
Expand All @@ -12,6 +16,10 @@
"packageName": "owenlamont/ryl",
"datasource": "github-tags"
},
"aqua:stackrox/kube-linter": {
"packageName": "stackrox/kube-linter",
"datasource": "github-tags"
},
"biome": {
"packageName": "biomejs/biome",
"datasource": "github-tags"
Expand Down Expand Up @@ -106,11 +114,14 @@
"mise.toml": {
"mise": [
"actionlint",
"aqua:dotenv-linter/dotenv-linter",
"aqua:jonwiggins/xmloxide",
"aqua:owenlamont/ryl",
"aqua:stackrox/kube-linter",
"biome",
"dotnet",
"editorconfig-checker",
"github:checkstyle/checkstyle",
"go",
"golangci-lint",
"google-java-format",
Expand Down
3 changes: 3 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
{
matchDepNames: [
"actionlint",
"aqua:dotenv-linter/dotenv-linter",
"aqua:jonwiggins/xmloxide",
"aqua:owenlamont/ryl",
"aqua:stackrox/kube-linter",
"biome",
"editorconfig-checker",
"github:checkstyle/checkstyle[matching=all.jar,rename_exe=checkstyle]",
"golangci-lint",
"google-java-format",
"hadolint",
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,29 +150,31 @@ For Flint contributor workflow and local testing tips, see
| ----------------------- | ------------------------------------------------ | ---------------------------------------------------------- |
| C# | — | [`dotnet-format`](docs/linters.md#dotnet-format) |
| Go | [`golangci-lint`](docs/linters.md#golangci-lint) | [`gofmt`](docs/linters.md#gofmt) |
| Java | | [`google-java-format`](docs/linters.md#google-java-format) |
| Java | [`checkstyle`](docs/linters.md#checkstyle) | [`google-java-format`](docs/linters.md#google-java-format) |
| JavaScript / TypeScript | [`biome`](docs/linters.md#biome) | [`biome-format`](docs/linters.md#biome-format) |
| Kotlin | [`ktlint`](docs/linters.md#ktlint) | [`ktlint`](docs/linters.md#ktlint) |
| Python | [`ruff`](docs/linters.md#ruff) | [`ruff-format`](docs/linters.md#ruff-format) |
| Rust | [`cargo-clippy`](docs/linters.md#cargo-clippy) | [`cargo-fmt`](docs/linters.md#cargo-fmt) |

### Files / Formats

| Name | Linter | Formatter |
| -------- | ------------------------------------------ | ---------------------------------------------- |
| JSON | [`biome`](docs/linters.md#biome) | [`biome-format`](docs/linters.md#biome-format) |
| Markdown | [`rumdl`](docs/linters.md#rumdl) | [`rumdl`](docs/linters.md#rumdl) |
| Shell | [`shellcheck`](docs/linters.md#shellcheck) | [`shfmt`](docs/linters.md#shfmt) |
| TOML | — | [`taplo`](docs/linters.md#taplo) |
| XML | [`xmllint`](docs/linters.md#xmllint) | — |
| YAML | [`ryl`](docs/linters.md#ryl) | [`ryl`](docs/linters.md#ryl) |
| Name | Linter | Formatter |
| -------- | ------------------------------------------------ | ------------------------------------------------ |
| Dotenv | [`dotenv-linter`](docs/linters.md#dotenv-linter) | [`dotenv-linter`](docs/linters.md#dotenv-linter) |
| JSON | [`biome`](docs/linters.md#biome) | [`biome-format`](docs/linters.md#biome-format) |
| Markdown | [`rumdl`](docs/linters.md#rumdl) | [`rumdl`](docs/linters.md#rumdl) |
| Shell | [`shellcheck`](docs/linters.md#shellcheck) | [`shfmt`](docs/linters.md#shfmt) |
| TOML | — | [`taplo`](docs/linters.md#taplo) |
| XML | [`xmllint`](docs/linters.md#xmllint) | — |
| YAML | [`ryl`](docs/linters.md#ryl) | [`ryl`](docs/linters.md#ryl) |

### Tooling / CI

| Name | Check |
| -------------- | ------------------------------------------------------------------------------- |
| Dockerfile | [`hadolint`](docs/linters.md#hadolint) |
| GitHub Actions | [`actionlint`](docs/linters.md#actionlint) / [`zizmor`](docs/linters.md#zizmor) |
| Name | Check |
| -------------------- | ------------------------------------------------------------------------------- |
| Dockerfile | [`hadolint`](docs/linters.md#hadolint) |
| GitHub Actions | [`actionlint`](docs/linters.md#actionlint) / [`zizmor`](docs/linters.md#zizmor) |
| Kubernetes manifests | [`kube-linter`](docs/linters.md#kube-linter) |

### General

Expand Down
3 changes: 3 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
{
"matchDepNames": [
"actionlint",
"aqua:dotenv-linter/dotenv-linter",
"aqua:jonwiggins/xmloxide",
"aqua:owenlamont/ryl",
"aqua:stackrox/kube-linter",
"biome",
"editorconfig-checker",
"github:checkstyle/checkstyle[matching=all.jar,rename_exe=checkstyle]",
"golangci-lint",
"google-java-format",
"hadolint",
Expand Down
1 change: 1 addition & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ use `--only`:

```bash
flint init --only rumdl
flint init --only checkstyle dotenv
```

Focused init preserves unrelated tools and configuration, rejects unknown
Expand Down
85 changes: 72 additions & 13 deletions docs/linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ links to the relevant upstream configuration docs.
| ----------------------- | --------------------------------- | ------------------------------------------- |
| C# | — | [`dotnet-format`](#dotnet-format) |
| Go | [`golangci-lint`](#golangci-lint) | [`gofmt`](#gofmt) |
| Java | | [`google-java-format`](#google-java-format) |
| Java | [`checkstyle`](#checkstyle) | [`google-java-format`](#google-java-format) |
| JavaScript / TypeScript | [`biome`](#biome) | [`biome-format`](#biome-format) |
| Kotlin | [`ktlint`](#ktlint) | [`ktlint`](#ktlint) |
| Python | [`ruff`](#ruff) | [`ruff-format`](#ruff-format) |
| Rust | [`cargo-clippy`](#cargo-clippy) | [`cargo-fmt`](#cargo-fmt) |

### Files / Formats

| Name | Linter | Formatter |
| -------- | --------------------------- | ------------------------------- |
| JSON | [`biome`](#biome) | [`biome-format`](#biome-format) |
| Markdown | [`rumdl`](#rumdl) | [`rumdl`](#rumdl) |
| Shell | [`shellcheck`](#shellcheck) | [`shfmt`](#shfmt) |
| TOML | — | [`taplo`](#taplo) |
| XML | [`xmllint`](#xmllint) | — |
| YAML | [`ryl`](#ryl) | [`ryl`](#ryl) |
| Name | Linter | Formatter |
| -------- | --------------------------------- | --------------------------------- |
| Dotenv | [`dotenv-linter`](#dotenv-linter) | [`dotenv-linter`](#dotenv-linter) |
| JSON | [`biome`](#biome) | [`biome-format`](#biome-format) |
| Markdown | [`rumdl`](#rumdl) | [`rumdl`](#rumdl) |
| Shell | [`shellcheck`](#shellcheck) | [`shfmt`](#shfmt) |
| TOML | — | [`taplo`](#taplo) |
| XML | [`xmllint`](#xmllint) | — |
| YAML | [`ryl`](#ryl) | [`ryl`](#ryl) |

### Tooling / CI

| Name | Check |
| -------------- | ------------------------------------------------- |
| Dockerfile | [`hadolint`](#hadolint) |
| GitHub Actions | [`actionlint`](#actionlint) / [`zizmor`](#zizmor) |
| Name | Check |
| -------------------- | ------------------------------------------------- |
| Dockerfile | [`hadolint`](#hadolint) |
| GitHub Actions | [`actionlint`](#actionlint) / [`zizmor`](#zizmor) |
| Kubernetes manifests | [`kube-linter`](#kube-linter) |

### General

Expand Down Expand Up @@ -115,6 +117,44 @@ Lint Rust code; runs on all .rs files, not just changed

Format Rust code; runs on all .rs files, not just changed

### [`checkstyle`](https://github.com/checkstyle/checkstyle)

| | |
| -------- | ------------------------------------------------------ |
| Fix | no |
| Binary | `checkstyle` |
| Scope | [files](#scope-files) |
| Patterns | `*.java` |
| Config | [`checkstyle.xml`](https://checkstyle.org/config.html) |

Check Java source against a repository-owned Checkstyle configuration

Runs the standalone Checkstyle CLI against selected Java files.
A Java runtime must be available on PATH because the curated
Checkstyle distribution is a JAR.
The repository must provide checkstyle.xml at its root; a root-level
checkstyle-suppressions.xml is also supported by Checkstyle's normal
property default. Flint does not infer Maven or Gradle source roots,
and Checkstyle is report-only: use a formatter such as
google-java-format for safe formatting fixes.

### [`dotenv-linter`](https://github.com/dotenv-linter/dotenv-linter)

| | |
| -------- | --------------------- |
| Fix | yes |
| Binary | `dotenv-linter` |
| Scope | [files](#scope-files) |
| Patterns | `.env .env.* *.env` |

Lint dotenv environment files without printing their values

Checks only explicit .env-style files: .env, .env.* and files ending in .env.
Flint passes file paths rather than a directory, so an unrelated YAML, Compose,
or application config file is never scanned. Check mode is read-only; fix mode
uses dotenv-linter's no-backup option and remains serialized with other Flint
fixers. Do not commit secret-bearing .env files.

### [`dotnet-format`](https://learn.microsoft.com/dotnet/core/tools/dotnet-format)

| | |
Expand Down Expand Up @@ -234,6 +274,25 @@ Lint Dockerfiles

Lint and format Kotlin code

### [`kube-linter`](https://github.com/stackrox/kube-linter)

| | |
| -------- | ------------------------------------------------------------------------------------------ |
| Fix | no |
| Binary | `kube-linter` |
| Scope | [native](#scope-native) |
| Patterns | `k8s/*.yml k8s/*.yaml kubernetes/*.yml kubernetes/*.yaml manifests/*.yml manifests/*.yaml` |
| Config | [`kube-linter.yaml`](https://docs.kubelinter.io/) |

Lint explicitly selected Kubernetes resources

KubeLinter is report-only and only runs on files selected by
[checks.kube-linter].paths (or existing conventional k8s/,
kubernetes/, or manifests/ directories). Flint parses YAML documents
and passes only documents containing apiVersion and kind, so ordinary
YAML and Docker Compose files are not treated as Kubernetes resources.
Helm/Kustomize rendering remains an explicit separate workflow.

### `license-header`

| | |
Expand Down
3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ rust = { version = "1.97.1", components = "clippy,rustfmt" }

# Linters
actionlint = "1.7.12"
"aqua:dotenv-linter/dotenv-linter" = "4.0.0"
"aqua:jonwiggins/xmloxide" = "0.4.3"
"aqua:owenlamont/ryl" = "0.21.0"
"aqua:stackrox/kube-linter" = "0.8.3"
biome = "2.5.4"
editorconfig-checker = "3.8.0"
"github:checkstyle/checkstyle[matching=all.jar,rename_exe=checkstyle]" = "checkstyle-13.8.0"
golangci-lint = "2.12.2"
google-java-format = "1.35.0"
hadolint = "2.14.0"
Expand Down
17 changes: 17 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ impl Default for Settings {
#[serde(default)]
pub struct ChecksConfig {
pub lychee: LycheeConfig,
#[serde(rename = "kube-linter", alias = "kube_linter")]
pub kube_linter: KubeLinterConfig,
// The alias allows the underscore form used in env var keys alongside the
// hyphenated form used in flint.toml.
#[serde(rename = "renovate-deps", alias = "renovate_deps")]
Expand All @@ -44,6 +46,21 @@ pub struct ChecksConfig {
pub license_header: LicenseHeaderConfig,
}

/// Configuration for the report-only Kubernetes manifest check.
///
/// When `paths` is empty, Flint considers only conventional Kubernetes
/// directories that exist in the project. It deliberately does not discover
/// YAML files from the repository at large, which keeps Compose and unrelated
/// YAML out of kube-linter's input set.
#[derive(Debug, Default, Deserialize, Clone)]
#[serde(default)]
pub struct KubeLinterConfig {
/// Files or directories to inspect, relative to the project root.
pub paths: Vec<String>,
/// Optional kube-linter config filename, relative to `FLINT_CONFIG_DIR`.
pub config: Option<String>,
}

#[derive(Debug, Default, Deserialize, Clone)]
#[serde(default)]
pub struct LycheeConfig {
Expand Down
Loading
Loading