summaryrefslogtreecommitdiff
path: root/scripts/maint/practracker/problem.py
AgeCommit message (Collapse)Author
2020-02-03practracker: add a --regen-overbroad option to remove overbroad exceptions.Nick Mathewson
Closes ticket 32372.
2019-12-12python: Add __future__ imports for python 3 compatibilityteor
Except for src/ext, which we may not want to modify. Closes ticket 32732.
2019-09-18practracker: An exception is "used" even when it is violated.Nick Mathewson
The purpose of tracking whether an exception is used is so that we can tell whether it is overbroad. This means that an _underbroad_ exception is still a used one. Fixes bug 31338.
2019-08-21Merge branch 'ticket31176' into ticket31176_mergedNick Mathewson
2019-08-05practracker: a violation of a .may_include rule is now a problem.Nick Mathewson
We treat "0" as the expected number, and warn about everything else. The problem type is "dependency-violation".
2019-08-05Teach practracker about .h filesNick Mathewson
I'm using 500 as a file size limit, and 15 as an include limit. This affects comparatively few files, but I think they are the worst ones. Closes ticket 31175.
2019-08-01practracker: replaces "overstrict" with "overbroad"Nick Mathewson
I had the logic reversed here.
2019-07-30practracker: better warning/regen handlingNick Mathewson
Now that there is only one toplevel place where we print problems, we can redirect just that one print to a file when we are regenerating the exceptions.txt file. Previously we redirected sys.stdout, which is naughty, and forced us to send warnings (and warnings alone) to stderr.
2019-07-30practracker: Move the warning/error distinction to a higher level.Nick Mathewson
Previously warnings were generated by magic inside ProblemVault; now they're printed on demand.
2019-07-30practracker: Refactor flow to use generatorsNick Mathewson
Instead of having "consider" functions that have to call a global ProblemVault, we can now generate all the metrics for the code separately from the decision about what to do for them.
2019-07-30practracker: Rename "Problem" to "Item".Nick Mathewson
I'm about to refactor the code into a set of iterators that yield *all* the metrics for the code, and then add a filter on top of that to return the problems.
2019-07-18Practracker: add tolerances for exceptionsNick Mathewson
When an exception is present, we can now violate the limit by a little bit and only produce a warning. The strict flag overrides this behavior. I've given file sizes a 2% tolerances and function sizes/include counts a 10% tolerance. Part of 30752
2019-07-18Practracker: add a --list-overstrict optionNick Mathewson
This option lists every exception that is stricter than it needs to be. Part of 30752
2019-03-25practracker: add ability to regenerate exceptions file.Nick Mathewson
Also add a useful argument parser.
2019-03-25practracker: allow comments in exceptions fileNick Mathewson
Also, distinguish between empty lines (which we should ignore) and incorrect lines (which we should warn about).
2019-03-14practracker: Be compatible with python2 which is used by travis/jenkins.George Kadianakis
2019-03-13practracker: Fix duplicate exceptions and handle them more "gracefully".George Kadianakis
2019-03-13practracker: Improvements based on last Nick's review.George Kadianakis
2019-03-13practracker: Normalize filesystem paths across Windows and Posix.George Kadianakis
This was causing issues because the exceptions file is written using Posix paths, whereas practracker in Windows was trying to match Windows paths ("\" instead of "/").
2019-03-13practracker: Improve documentation in problem.py .George Kadianakis
2019-03-13Call practracker as part of check-local.George Kadianakis
- Introduce 'make check-best-practices'. - Fix up Tor topdir etc to work with the way 'make check-local' gets called. - Make practracker less likely to print useless stuff.
2019-02-27Exit with 1 if new issues were found. Also work with python3.George Kadianakis
2019-02-27Add more intelligent problem tracking.George Kadianakis