alint - a linter for repo shape/structure and hygiene

55 points asamarts 0 comments

Hello folks, my first open/public project and first submission here - after working on large monorepos (professionally), and a bunch of side projects utilizing AI in recent times, I noticed a common need for enforcing various repo structure/hygiene rules/conventions - which I've generally been doing via custom shell scripts - I decided to build a tool to aggregate/unify a bunch of these and put them on a more solid (and much faster) foundation, using Rust [0][1].

This is not a code linter - it does not analyze any code/ASTs other than JSONPath (RFC 9535), for validating yaml/json/toml config structure - it's meant to lint file/directory structure (max files per directory, 'each subdirectory under x/ must have asdf.yaml', max directory depth, etc.), file content/structure (max size, max lines, license/attribution headers, config structure, max line length), general hygiene (git merge/conflict markers in files, malicious/undesirable use of unicode, do not commit large binary files, etc), and many others [2] (and more coming).

This project aims to be very fast [3], extensible (custom rules, plugins/extensions, and integrations shell-outs to other checks/linters), and developer+agent friendly (clean/readable human output + structured json/yaml/sarif/etc output for agents, CI/automation). There is still a long roadmap of features/improvements in the plan to build, but some experimentation with public open source repos found it can already replace many custom validation scripts with a declarative config, and be much faster.

In the process I've discovered the repolinter project [4], which is fairly similar in goal/use-cases - however this project has been archived, and at this point alint is a lot faster and more full-featured.

Would love to hear what you all think - any issues/concerns/questions or suggestions for improvement or new features!

[0] https://github.com/asamarts/alint
[1] https://alint.org
[2] https://alint.org/docs/rules/
[3] https://alint.org/benchmarks/
[4] https://github.com/todogroup/repolinter