Skip to main content

Flake8 plugin to check comments against AzureDevOps ticket references.

Project description

flake8-ado

Flake8 extension to check comments against Azure DevOps tickets. The plugin checks that:

  1. Every comment with a reference to an ADO item (AB#12345) has a corresponding item.
  2. ADO items are references 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

  • --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 AOD item reference

Contribution

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

poetry install --with=dev

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_ado-0.3.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

flake8_ado-0.3-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page