An exploration of different ways to build a TODO linter, including:
Install Trunk and run trunk tools install
To import the todo rulesets automatically into any other repo, simply add the following to your .trunk/trunk.yaml
:
plugins:
sources:
- id: todo-linters
ref: v0.1.0
uri: https://github.com/trunk-io/todo-linter-demo
This markdownlint linter setup is dependent on:
.markdownlint.json
trunk check --filter=markdownlint test_data.md
To run outside Trunk, run:
.trunk/tools/markdownlint -r markdownlint-rule-search-replace test_data.md
This CSpell linter setup is dependent on:
cspell.yaml
trunk check --filter=cspell test_data.md
To run outside Trunk, run:
.trunk/tools/cspell --no-summary test_data.md
This codespell linter setup is dependent on:
.codespellrc
todo_dict.txt
trunk check --filter=codespell test_data.md
To run outside Trunk, run:
.trunk/tools/codespell test_data.md
This Vale linter setup is dependent on:
.vale.ini
styles/base/todo.yml
trunk check --filter=vale test_data.md
To run outside Trunk, run:
.trunk/tools/vale --output=line test_data.md
This Semgrep linter setup is dependent on:
.semgrep.yaml
trunk check --filter=semgrep test_data.md
To run outside Trunk, run:
.trunk/tools/semgrep --config=auto --config=.semgrep.yaml -q --include=test_data.md
This trunk-toolbox linter setup is dependent on:
toolbox.toml
To run with Trunk, run:
trunk check --filter=trunk-toolbox test_data.md
To run outside Trunk, run:
.trunk/tools/trunk-toolbox --output-format=text test_data.md
This grep linter setup is dependent on:
todo_grep.sh
To run with Trunk, run:
trunk check --filter=todo-grep-wrapped test_data.md
To run outside Trunk, run:
./todo_grep.sh test_data.md