Skip to content

An exploration of different ways to build a TODO linter

Notifications You must be signed in to change notification settings

trunk-io/todo-linter-demo

Repository files navigation

todo-linter-demo

An exploration of different ways to build a TODO linter, including:

Prerequisites

Install Trunk and run trunk tools install

Use it yourself!

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

markdownlint

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

CSpell

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

codespell

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

Vale

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

Semgrep

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

trunk-toolbox

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

grep linter

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

About

An exploration of different ways to build a TODO linter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages