Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DanielKusyDev/flake8-ado
Flake8 plugin to check comments against AzureDevOps ticket references.
https://github.com/DanielKusyDev/flake8-ado
Last synced: 3 months ago
JSON representation
Flake8 plugin to check comments against AzureDevOps ticket references.
- Host: GitHub
- URL: https://github.com/DanielKusyDev/flake8-ado
- Owner: DanielKusyDev
- License: mit
- Created: 2022-09-01T17:20:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-03T07:58:13.000Z (about 2 years ago)
- Last Synced: 2024-07-11T21:06:53.467Z (4 months ago)
- Language: Python
- Size: 54.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flake8-extensions - flake8-ado - Check that all Azure DevOps IDs mentioned in the comments are in the correct format and have the corresponding ADO item. (Comments)
README
# flake8-ado
Flake8 extension to check comments against Azure DevOps tickets. The plugin checks that:
1. For every comment with a reference to an ADO item (`AB#12345`), there is an actual ticket in place.
2. ADO items are referenced in a proper format (`ADO: AB#12345`)
3. TODO items with ADO annotation have assigned item (`TODO: AB#12345`).Example:
```python
# foo.py
class Foo:
def foo(self) -> None: # TODO: AB#12345
pass # ab 12345
```
```shell
>> flake8 --ado-access-token= --ado_organization_url=
./foo.py:2:36: ADO001 Missing ADO item
```## Installation
```shell
pip install flake8 flake8-ado
```## Arguments
- `--ado-access-token` - Valid AzureDevOps token.
- `--ado_organization_url` - AzureDevOps organization url e.g. https://dev.azure.com/foo.## Errors
| Code | Message |
|--------|---------------------------------------------------|
| ADO001 | Missing ADO item |
| ADO002 | Malformed item reference |
| ADO003 | Wrong capitalization (ADO and AB must be capital) |
| ADO004 | TODO needs the ADO item reference |## Contribution
Feel free to modify the code. To start with the development you need poetry.
```shell
poetry install --with=dev
```