Flake8 JIRA TODO Checker
Flake8 plugin to check that:
- Every
TODO,FIXME,QQetc comment has a JIRA ID next to it. - Every JIRA ID refers to a JIRA card which is not closed.
In other words, this is valid as long as the JIRA card ABC-123 is not closed:
def hacky_function():
# TODO ABC-123 Stop reticulating splines
...
However this would raise the new flake8 error JIR001:
def hacky_function():
# TODO Stop reticulating splines
...
Configuration
jira-project-ids
A list of valid JIRA project IDs can be provided via the flag --jira-project-ids or via the key jira-project-ids
in a flake8 configuration file, e.g.
jira-project-ids = ABC,DEF
If no project IDs are provided then all TODOs will be rejected.
todo-synonyms
A list of words which will be treated like TODO can be provided via the flags --allowed-todo-synonyms and
--disallowed-todo-synonyms or via the key allowed-todo-synonyms and disallowed-todo-synonyms in a flake8
configuration file.
disallowed-todo-synonyms will raise an error whenever found in the codebase, and allowed-todo-synonyms will raise an
error only if it's missing a JIRA card or that JIRA card is invalid.
Defaults to:
allowed-todo-synonyms = TODO
disallowed-todo-synonyms = FIXME,QQ
jira-server
The URL of the JIRA server, if unset the status of JIRA cards won't be checked.
disallowed-jira-statuses, disallowed-jira-resolutions, and disallow-all-jira-resolutions
If a TODO is attached to a JIRA issue whose status is in disallowed-jira-statuses then an error will be reported,
ditto if the JIRA card has a resolution in disallowed-jira-resolutions. If disallow-all-jira-resolutions is set to
True, then report an error if issue has any resolution.
Defaults to:
disallowed-jira-statuses = Done
disallow-all-jira-resolutions = True
JIRA Authentication
We support the same authentication methods as the jira-python library.
For cookie-based username/password authentication, use the following configuration parameters:
jira-cookie-usernamejira-cookie-password
For HTTP Basic username/password authentication, use the following configuration parameters:
jira-http-basic-usernamejira-http-basic-password
For OAuth authentication, use the following configuration parameters:
jira-oauth-access-tokenjira-oauth-access-token-secretjira-oauth-consumer-keyjira-oauth-key-cert-file
For kerberos authentication, set the jira-kerberos configuration parameter to True.
Alternatives
This project is heavily inspired by the Softwire TODO checker.
Releasing
poetry run bump2version minorgit push && git push --tagstox -e pypi
TODO
Test and add instructions for JIRA cloud.
Release files for flake8-jira-todo-checker 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8-jira-todo-checker-0.4.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_jira_todo_checker-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:13.0 kB
Release files / flake8-jira-todo-checker-0.4.0.tar.gz
| Download URL | flake8-jira-todo-checker-0.4.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e37a883de73e171e0c044e8cb947024af3f590769bfa556a78523f28539bcf89
|
|
BLAKE2b-256 checksum How to use checksums |
6b8787995ea90b44e153312cf9dc41bf9886fd616c7cb2d724e0b75d8b09cb53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-050712-generic
|
Release files / flake8_jira_todo_checker-0.4.0-py3-none-any.whl
| Download URL | flake8_jira_todo_checker-0.4.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a2da964e272f156eb26884f2112c2216f72afa098f94ecc956f560667629885
|
|
BLAKE2b-256 checksum How to use checksums |
2893736d0f08fd111f7f15fbe18067073dbb95a9e317339b49ac628bc7f53f40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-050712-generic
|