trunk upgrade --apply-to=plugin.yaml to apply upgrades. After making a public GitHub release with your plugin changes, other dependent repos will pick up these changes automatically when running trunk upgrade.
Get started
Let’s walk through how to create a simple linter that warns about TODOs in your codebase. We’ll start by creating a new Git repository:grep and sed:
trunk set up:
trunk check some files where we know we have TODOs:
Organizing your code
In the example we gave above, we put the linter’s source code inplugin.yaml, which is fine for an example, but not really great for anything more than that. We can take the sed command from the plugin we created earlier and push that into the shell script:
Tip: Remember to runand also point the definition ofchmod u+x todo-finder-parser.shso thattrunkcan run it!
todo-finder at it: