Docs / Project
Contributing
How the repository is laid out, how to add a rule, and what the tests check.
Repository layout
| Path | What’s in it |
|---|---|
packages/core |
The finding schema, rules, knowledge base, scan, config reader and report writer |
packages/cli |
The lintsure command |
packages/mcp |
The MCP server |
fixtures/sample-app |
A small app with one planted problem per rule |
fixtures/clean-app |
Near misses that must not be flagged |
fixtures/config-app |
A lintsure.config.yaml used by the config test |
Develop
npm install
npm test # build all packages, then run the tests
npm run scan:sample # run the CLI on the sample app
Add a rule
Rules live in packages/core/src/rules/index.ts. A rule needs:
id,title,severitystatus:gaporpartial. Nevermet; only the Checker sets Met.controls: every framework control it maps tofixandnote, in plain wordsextensions: which files it readstest(line)for a line rule, orfileTest(lines)for a file rule. Both must be pure.mappedByandreviewedAt, so an auditor review can be tracked
Then:
- Plant one example of the problem in
fixtures/sample-app. - Add a near miss to
fixtures/clean-appthat looks similar but is fine. - Link the rule from at least one obligation in
packages/core/src/knowledge/. - Run
npm test.
What the tests check
- The same input gives the same report.
- Every rule fires on its planted example.
- No rule fires on the clean app.
- Every rule fills every required field and can’t return Met.
- Knowledge points only at rules that exist, and every rule is linked from some obligation.
- The config file is read correctly.
- The engine contains no network code.
Writing about frameworks
The knowledge base must be in our own words. Don’t paste text from laws, standards or guides. ISO/IEC and AICPA texts are licensed: reference control and criterion IDs only.
License and sign-off
Apache-2.0. Sign off each commit with git commit -s to certify the Developer Certificate of Origin.
Lintsure is a readiness tool, not an audit or legal advice. Results cover code only; a qualified person should review them. Disclaimer