teor
1619f14a04
python: Add __future__ imports for python 3 compatibility
...
Except for src/ext, which we may not want to modify.
Closes ticket 32732.
2019-12-12 15:58:51 +10:00
Nick Mathewson
9abbde2c24
Update pre-commit hook to find checkIncludes in its new location
...
Also add a temporary script to redirect the hook, if people don't
upgrade for a bit.
2019-08-05 14:12:39 -04:00
Nick Mathewson
6fb74753c2
Move checkIncludes inside practracker
...
Update the makefile accordingly.
2019-08-05 14:10:40 -04:00
Nick Mathewson
9eb12dde18
checkIncludes: add a real main function and CLI
2019-08-05 13:40:59 -04:00
Nick Mathewson
3f4e89a7ab
checkIncludes: refactor to use error-iteration style
...
This makes checkIncludes match practracker more closely, and lets us
eliminate a global.
2019-08-05 13:40:59 -04:00
Nick Mathewson
47d9bcfef8
checkIncludes: Separate file-handling from rule-handling
...
This is our shift from directory-at-a-time processing to
file-at-a-time processing.
2019-08-05 13:40:59 -04:00
Nick Mathewson
65a69f861e
checkIncludes.py: extract topological sort code
...
Our topological sort code really deserves a function of its own.
Additionally, don't print from inside the topological sort code:
instead, return a result, and let the caller print it.
2019-08-05 13:40:59 -04:00
Nick Mathewson
3f35ac772b
checkIncludes: introduce rules-file caching.
...
We'll want this so that we can have each file evaluated
independently, rather than a directory at a time.
2019-08-05 11:35:13 -04:00
Nick Mathewson
475749351d
Move the executable part of checkIncludes.py inside an if block.
...
I'll want to make this block into a series of functions in a
subsequent commit, but I'm doing this separately to get the
indentation change out of the way.
This branch will end up with making checkIncludes.py an integrated
part of practracker, for ticket 31176.
2019-08-05 11:30:22 -04:00
teor
a10d4adc25
Stop assuming that /usr/bin/python3 exists
...
For scripts that work with python2, use /usr/bin/python.
Otherwise, use /usr/bin/env python3.
Fixes bug 29913; bugfix on 0.2.5.3-alpha.
2019-03-27 11:07:55 +10:00
Nick Mathewson
fae29f7b42
Make the topological-sort output off by default
2018-11-14 16:07:36 -05:00
Nick Mathewson
c3c8c926bf
Update the check-includes script to enforce some naming and no-circularity rules
2018-11-14 16:07:36 -05:00
Nick Mathewson
b4b8fa4899
Set the file encoding in checkIncludes.py with Python3
2018-08-28 16:25:54 -04:00
Nick Mathewson
ee12286222
Add a little documentation to checkIncludes.py.
...
Someday people might be glad I did.
2018-07-09 16:02:34 -04:00
Nick Mathewson
294f580f04
Re-wrap the error message emitted by checkIncludes.py
2018-07-09 15:48:55 -04:00
Nick Mathewson
3145e469d8
Make checkIncludes work on python 2.7
2018-07-09 15:46:39 -04:00
Nick Mathewson
83a4946e7b
Prune the .may_include files a bit; detect unused lines in them
2018-07-01 18:14:28 -04:00
Nick Mathewson
860b9a9918
Remove some accidentally committed code in checkIncludes.py
2018-06-26 12:04:24 -04:00
Nick Mathewson
405fa42e8a
Another windows include
2018-06-22 13:52:30 -04:00
Nick Mathewson
eb784aa9ea
add license statement to checkincludes, and have it return an error code
2018-06-21 14:29:00 -04:00
Nick Mathewson
999f7984e1
New script to check includes for modularity violations
...
Includes configuration files to enforce these rules on lib and
common. Of course, "common" *is* a modularity violation right now,
so these rules aren't as strict as I would like them to be.
2018-06-21 14:05:33 -04:00