Home

Awesome

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:

# foo.py
class Foo:
    def foo(self) -> None: # TODO: AB#12345
        pass # ab 12345
>> flake8 --ado-access-token=<TOKEN> --ado_organization_url=<URL>
./foo.py:2:36: ADO001 Missing ADO item

Installation

pip install flake8 flake8-ado

Arguments

Errors

CodeMessage
ADO001Missing ADO item
ADO002Malformed item reference
ADO003Wrong capitalization (ADO and AB must be capital)
ADO004TODO needs the ADO item reference

Contribution

Feel free to modify the code. To start with the development you need poetry.

poetry install --with=dev