bandit/tests
Jamie Finnigan 36e28b331a Address multiline node lineno inaccuracies
This change addresses the bug where inaccurate line numbers / ranges
are displayed when an issue is detected in a multiline statement.

There's been a Python issue open since 2012 about this:
http://bugs.python.org/issue16806

Two main parts to the commit:
 - Modify StatementBuffer so get_next() will allow lookahead without
   popping the item off the buffer.
 - Add cleverness to visit() so if it does come across a multiline
   statement, it updates the context linerange based on information
   pulled out of the StatementBuffer.

Also of note, the commit includes several new tests for fix
verification. Seemingly non-deterministic test results were driving
me batty until the need to move the BanditResultStore 'resstore =
OrderedDict()' call from class-level to object instantion became
obvious.

Change-Id: I7dd4c563f6b2f8a103224854f0709068af093a73
Closes-Bug: 1467636
2015-06-29 12:56:40 -07:00
..
__init__.py Adding a basic test for the gate (need at least one to pass) 2014-10-27 17:36:52 +00:00
test_basic.py Adding a basic test for the gate (need at least one to pass) 2014-10-27 17:36:52 +00:00
test_functional.py Address multiline node lineno inaccuracies 2015-06-29 12:56:40 -07:00
test_node_visitor.py Address multiline node lineno inaccuracies 2015-06-29 12:56:40 -07:00
test_util.py Add Python 3.4 compatibility to bandit 2015-06-03 11:19:03 -05:00