The www.dwheeler.com site has long supported https, but I forgot
to change these URLs. Fix that, so that people will use https.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Change possible_levels to a tuple. Arrays are mutable,
but we never want to mutate this value, so changing it
to a tuple reduces the risk of accidentally mutating it.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This commit means that the output provides useful summary data,
even if the lower-level hits are suppressed.
Note that this does use a little more memory when some hits
are supressed, since the hitlist is fully created even
if only parts are displayed. However, modern systems have
lots of memory. Hopefully we'll never analyze software
with so many problems that this is a problem itself :-).
If someone ever has that problem, they can output everything
and filter it separately.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
My upload intended for pypitest appears to have gone to pypi instead.
To eliminate confusion, I'm bumping the version number so that
any single version number always refers to exactly one program version.
This was done with:
sed -i.bak -e 's/2\.0\.3/2.0.4/g' \
ChangeLog correct-results.* flawfinder makefile setup.py
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Test the saving and loading of hitlists.
This detected a Python3 problem, which was easily corrected by
saving and loading in binary "b" format instead of text format.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Add test_004. This tests options that are often used when sending
flawfinder output to other tools. In this case,
we test -m, -S, -D, -C, and --quiet.
This also begins a convention change, to name tests e.g., "test_001".
This ensures that the tests sort reasonably without special options.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
We formerly used a variable named "input". This is legal in Python,
but potentially confusing since there's a built-in named "input"
that this shadows in that scope. Rename the variable, to
avoid that confusion. This fixes the following pylint warning:
W:1440, 8: Redefining built-in 'input' (redefined-builtin)
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
We import os, so there's no need to import os.path.
This fixes the following pylint warning:
C: 53, 0: Imports from package os are not grouped (ungrouped-imports)
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Python 3 only accepts certain syntaxes for find & split.
Thankfully, it's possible to use them in Python 2, so rework
it so we can use the same syntax for both.
This is not detected or fixed by futurize, sadly
(a problem true for many other situations).
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>