jamescooke/flake8-aaa

Add command line functionality

Closed this issue · 0 comments

  • Call from command line to allow for debugging and test function annotation.

  • Call might look like python -m flake8_aaa test_file.py

  • Return value is the number of errors found - this means that failure can be detected easily when calling.

  • Opens the door for plugin to be called directly on test files by a linting script, without needing Flake8.

Annotation output might look like...

$ python -m flake8_aaa test.py
-------+-----------------------------------------------------------------------
 1  A01|def test_a():
 2  ???|    response = get_response()
 3     |
 4  ???|    assert response.is_good()
 ERROR = AAA01 no Act block found in test
-------+-----------------------------------------------------------------------
 7     |def test_b():
 8  arr|    x = 1
 9  arr|    y = 1
10     |
11  act|    result = x + y
12     |
13  ass|    assert result == 2
-------+-----------------------------------------------------------------------