slop/dumping-ground-files
No utils or helpers dumping grounds
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.6.0 |
| Selected by | fleetlint-slop@v0.6.0 |
Requirement
No source file is named utils, helpers, common or misc; a function lives in the module that owns its concept. Configuration, build and documentation files with these names are not read.
Why
A file named after nothing collects everything, and everything then depends on it.
Check
For each item in:
tracked().filter(p, p.matches(r'(^|/)(utils?|helpers?|common|misc|stuff|shared_utils)\.(go|py|rs|ts|tsx|js|jsx|mjs|cjs|kt|kts|java|dart|swift|sh|rb|php|cs|fs|c|cc|cpp|h|hpp|vue|svelte|scala)$'))falseFix
Move each function to the module it belongs to.
Agent instruction: Report the file with its functions grouped by concept; move them only as a separate, behaviour-neutral change.
Sources
- https://go.dev/blog/package-names (guidance, Bad package names)
- https://fleetlint.org/baseline/#slop (convention)
- https://fleetlint.org/slop/#code-structure
Generated by fleetlint docs from catalog v0.6.0.