Skip to content

Commit 67ea1f2

Browse files
committed
docs: add small note about override
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent 9816076 commit 67ea1f2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,36 @@ Available functions:
340340

341341
## Configuration
342342

343+
### Override Default Linter Configs
344+
345+
Linters use sensible defaults (e.g., excluding `target/`, `node_modules/`, `generated-sources/`). Override by adding config files to your project:
346+
347+
| Linter | Project config file | Default exclusions |
348+
|--------|--------------------|--------------------|
349+
| yamlfmt | `.yamlfmt` | `target/`, `node_modules/`, `generated-sources/`, `dist/`, `build/` |
350+
| spotbugs | `development/spotbugs-exclude.xml` or `.spotbugs-exclude.xml` | `*generated-sources*` |
351+
| gitleaks | `.gitleaks.toml` | none |
352+
| rumdl | `.rumdl.toml` | `CHANGELOG.md` |
353+
354+
Example `.yamlfmt`:
355+
356+
```yaml
357+
exclude:
358+
- target/
359+
- my-custom-dir/
360+
formatter:
361+
type: basic
362+
retain_line_breaks_single: true
363+
```
364+
365+
Example `development/spotbugs-exclude.xml`:
366+
367+
```xml
368+
<FindBugsFilter>
369+
<Match><Package name="~com\.example\.generated.*"/></Match>
370+
</FindBugsFilter>
371+
```
372+
343373
### Custom Repository Location
344374

345375
Override the default repository URL via environment variable:
@@ -365,7 +395,11 @@ devtools_repo := env("DEVBASE_JUSTKIT_REPO", "https://github.com/diggsweden/devb
365395
```text
366396
devbase-justkit/
367397
├── linters/
398+
│ ├── config/
399+
│ │ └── .yamlfmt # Default yamlfmt config
368400
│ ├── java/
401+
│ │ ├── config/
402+
│ │ │ └── spotbugs-exclude.xml # Default spotbugs exclusions
369403
│ │ ├── checkstyle.sh
370404
│ │ ├── format.sh
371405
│ │ ├── lint.sh

0 commit comments

Comments
 (0)