Skip to content

Commit 3efad81

Browse files
zeitlingerjaydeluca
authored andcommitted
chore: add Zizmor (#2157)
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com> Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
1 parent 834209d commit 3efad81

8 files changed

Lines changed: 26 additions & 49 deletions

File tree

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CHANGELOG.md linguist-generated
2+
**/src/main/generated/** linguist-generated
3+
docs/** linguist-documentation

.github/config/flint.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[settings]
2-
# These paths are generated, vendored, or handled by other checks.
3-
exclude = ["CHANGELOG.md", "**/src/main/generated/**", "docs/themes/**", "mvnw", "simpleclient-archive/**"]
4-
setup_migration_version = 2
2+
exclude = ["docs/themes/**", "mvnw", "simpleclient-archive/**"]
53

64
[checks.renovate-deps]
75
exclude_managers = ["github-actions", "github-runners", "maven"]

.github/renovate-tracked-deps.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
"mise"
3737
]
3838
},
39-
".github/workflows/micrometer-compatibility.yml": {
39+
".github/workflows/lint.yml": {
4040
"regex": [
4141
"mise"
4242
]
4343
},
44-
".github/workflows/lint.yml": {
44+
".github/workflows/micrometer-compatibility.yml": {
4545
"regex": [
4646
"mise"
4747
]
@@ -138,7 +138,8 @@
138138
"shellcheck",
139139
"shfmt",
140140
"taplo",
141-
"typos"
141+
"typos",
142+
"zizmor"
142143
]
143144
},
144145
"mvnw": {

.github/renovate.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3-
extends: ["config:best-practices", "config:recommended", "github>grafana/flint#v0.22.2"],
3+
extends: ["config:best-practices", "config:recommended", "github>grafana/flint#v0.22.4"],
44
platformCommit: "enabled",
55
automerge: true,
66
ignorePaths: [

.github/workflows/micrometer-compatibility.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ jobs:
3535
restore-keys: |
3636
${{ runner.os }}-maven-
3737
- name: Run Micrometer compatibility tests
38-
run: |
39-
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
40-
export MICROMETER_REPOSITORY="${{ github.event.inputs.micrometer-repository }}"
41-
export MICROMETER_REF="${{ github.event.inputs.micrometer-ref }}"
42-
fi
43-
mise run micrometer:test
38+
env:
39+
MICROMETER_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.micrometer-repository || 'micrometer-metrics/micrometer' }}
40+
MICROMETER_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.micrometer-ref || 'main' }}
41+
run: mise run micrometer:test

.github/workflows/release-please.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
if: ${{ steps.release-please.outputs.releases_created == 'true' }}
2929
env:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
TAG_NAME: ${{ steps.release-please.outputs.tag_name }}
3132
run: >
3233
gh workflow run release.yml --repo "${GITHUB_REPOSITORY}"
33-
-f tag=${{ steps.release-please.outputs.tag_name }}
34+
-f "tag=${TAG_NAME}"

AGENTS.md

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,15 @@ Pre-built instrumentations:
102102
- Do not prefix PR titles with `[codex]`.
103103
- Match the PR title type to the primary user-facing change.
104104

105-
## Linting and Validation
105+
## Linting
106+
107+
Run `mise run lint:fix` before committing changes.
108+
If output includes `fixed`, keep those changes.
109+
If output includes `partial` or `review`, address the remaining issues and
110+
run `mise run lint:fix` again.
111+
112+
Example output:
113+
flint: fixed: gofmt — commit before pushing | partial: cargo-clippy
106114

107115
**CRITICAL**: These checks MUST be run before creating any
108116
commits. CI will fail if these checks fail.
@@ -117,39 +125,6 @@ commits. CI will fail if these checks fail.
117125
- Build succeeds (tests are skipped;
118126
run `mise run test` or `mise run test-all` for tests)
119127

120-
### Non-Java Files (Markdown, YAML, JSON, shell scripts)
121-
122-
- **ALWAYS** run `mise run lint` after modifying non-Java
123-
files (runs super-linter + link checking + BOM check)
124-
- `mise run lint:fix` autofixes linting issues
125-
- Super-linter will **autofix** many issues
126-
(formatting, trailing whitespace, etc.)
127-
- It only reports ERROR-level issues
128-
(configured via `LOG_LEVEL=ERROR` in
129-
`.github/super-linter.env`)
130-
- Common issues caught:
131-
- Lines exceeding 100 characters in Markdown files
132-
- Missing language tags in fenced code blocks
133-
- Table formatting issues
134-
- YAML/JSON syntax errors
135-
136-
### Running Linters
137-
138-
```bash
139-
# After modifying Java files (run BEFORE committing)
140-
mise run build
141-
142-
# After modifying non-Java files (run BEFORE committing)
143-
mise run lint
144-
# or to autofix: mise run lint:fix
145-
```
146-
147-
### Before Pushing
148-
149-
**ALWAYS** run `mise run lint` before pushing to verify
150-
all lints pass. CI runs the same checks and will fail
151-
if any lint is violated.
152-
153128
## Testing
154129

155130
- JUnit 5 (Jupiter) with `@Test` annotations

mise.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ protoc = "35.0"
77

88
# Linters
99
actionlint = "1.7.12"
10-
"aqua:grafana/flint" = "0.22.2"
10+
"aqua:grafana/flint" = "0.22.4"
1111
"aqua:jonwiggins/xmloxide" = "v0.4.3"
1212
"aqua:owenlamont/ryl" = "0.10.0"
1313
biome = "2.4.12"
@@ -21,6 +21,7 @@ shellcheck = "v0.11.0"
2121
shfmt = "3.13.1"
2222
taplo = "0.10.0"
2323
typos = "1.46.3"
24+
zizmor = "1.25.2"
2425

2526
[env]
2627
FLINT_CONFIG_DIR = ".github/config"

0 commit comments

Comments
 (0)