TODO-Checker
Plugin to verify TODO and FIXME comments reference open issues.
TODO-Checker
Fails the pipeline if any TODO/FIXME lacks a valid open issue reference. Currently supports Forgejo and Gitea.
v1.x.x (shell-based, unmaintained) is deprecated. v2.x.x it is a complete Rust rewrite.
Settings
| Settings Name | Default | Description |
|---|---|---|
prefix_regex |
(TODO|FIXME) |
prefix that a comment should start with to check for an associated issue number |
main_regex |
?\(#?(?P<ISSUE_NUMBER>\d+)\) |
main regex to check how the issue number should be defined. IMPORTANT: custom regex must include a capturing group named "ISSUE_NUMBER" that extracts only the issue regex |
closing_keyword_regex |
(?i)(?:closes|closing)\s+#?(?P<ISSUE_NUMBER>\d+) |
(since v2.3.0) for forges using keywords other than "Closes" or "Closing"; custom regex accepted |
page_size |
default |
page size which is provided by the forge (default and max are available with forgejo) |
working_directory |
. |
the working directory where the checker should run. (only ignore-files in this specification directory are recognized) |
repository_token |
`` | token if the repository to be checked is private |
single_issue_check |
false |
make a request for each issue found (may increase or decrease API requests depending on TODO/FIXME count vs. issue list pagination) |
use_table |
false |
(since v2.2.0) prints tables instead of the new format. Tables were the default output before v2.2.0, but may display incorrectly on too small screens |
debug |
false |
enable debug output |
Building custom regex
This plugin is built in Rust, so it uses the regex crate under the hood. For custom regexes, refer to rust regex syntax
Ignoring files
Supported ignore files: .ignore and .gitignore (for excluding files with
invalid TODOs/FIXMEs).
Examples
- name: 'Check TODOs/FIXMEs'
image codeberg.org/epsilon_02/todo-checker
settings:
debug: true
single_issue_check: true
working_directory: ./only_check_this_folder
With token:
- name: 'Check TODOs/FIXMEs'
image: codeberg.org/epsilon_02/todo-checker
settings:
repository_token
from_secret: todo_checker_token
Advanced
Following chapters should only relevant if you know what you are doing
Building custom regex
This plugin is built in Rust, so it uses the regex crate under the hood. For custom regexes, refer to rust regex syntax
TLS certificates
(since v2.5.0) HTTPS trust uses a bundled Mozilla root store. Forges with certificates from public CAs work out of the box. Forges behind a private or internal CA are not supported. The container's system trust store is no longer consulted, so mounting a CA bundle into the plugin container has no effect. Open an issue (or preferable a PR) if you need this.