23 Commits

Author SHA1 Message Date
Alex Xu (Hello71) 9f731ac68c Use raw strings for regexs containing escapes
In Python 3.12, these invalid escape sequences emit SyntaxWarnings, and will
emit SyntaxErrors in a future release.

Found using: grep '[^r]["'\''].*\\[^rn\\x0t"]' $(grep -rl '^#!.*python')
2023-12-09 10:19:54 -05:00
David Goulet 17724a7cde Merge branch 'tor-github/pr/1743' 2020-02-18 09:06:13 -05:00
Nick Mathewson d3c23b079a lintChanges: Tolerate variants that sortChanges knows how to clean up. 2020-02-18 09:01:56 -05:00
Panagiotis Vasilopoulos 674a821fbb Stop assuming that /usr/bin/python exists
Fixes 33192
2020-02-16 21:58:01 +02:00
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 7e1f893460 lintChanges.py: Two python re usage fixes 2019-01-17 08:46:06 -05:00
teor 3eafa61f63 check-changes: Warn about bugfixes on future releases
Warn when bugfix changes files say that the bug is in a future release.

Closes ticket 27761.
2018-09-18 20:40:50 +10:00
teor 7e862c3ec0 check-changes: Check bugfix version formatting
Check that bugfix versions in changes files look like Tor versions
from the versions spec.

Part of ticket 27761.
2018-09-18 20:40:44 +10:00
Nick Mathewson f46cdb3ff8 lintchanges: Allow 'fixes bugs a, b, and c' 2017-11-05 14:41:39 -05:00
Nick Mathewson 9298749088 Add dirauth changes as a lintchanges category 2017-10-17 13:58:21 -04:00
Nick Mathewson 3c04c8317f Make check-spaces part of the standard "make check" process
To do this, we had to make sure it passes when the changes directory
is empty.  I also tried to improve the quality of the output, and
fix some false-positive cases.  Let's see how this goes!

Closes ticket 23564.
2017-09-21 16:25:24 -04:00
cypherpunks 99cbadf143 Warn on Tor versions with the 'tor-' prefix
Closes ticket 21096.
2017-01-11 09:16:20 -05:00
cypherpunks fa0792c3a8 Fix coding style issues in the changes file linter
Found using flake8 which gave the following output;

lintChanges.py:10:13: E225 missing whitespace around operator
lintChanges.py:25:1: E302 expected 2 blank lines, found 1
lintChanges.py:46:5: F841 local variable 'lines' is assigned to but never used
lintChanges.py:52:32: E228 missing whitespace around modulo operator
lintChanges.py:53:11: E201 whitespace after '('
lintChanges.py:56:41: E228 missing whitespace around modulo operator

Part of ticket 21096.
2017-01-11 09:16:19 -05:00
Nick Mathewson b64c224362 fix crash in lintChanges.py 2016-09-22 08:33:09 -04:00
Nick Mathewson 5aa6a19de5 Update lintChanges script to understand 'Minor features (debugging)'
Previously we would give a warning because we didn't say "Fixes bug
Foo" on these.
2016-08-02 11:40:08 -04:00
Nick Mathewson 52bc921402 Fix (most) lintChanges warnings on master. 2016-03-21 11:14:57 -04:00
Nick Mathewson deea08c13f Fix all the warnings from lintChanges.py 2016-02-01 16:46:29 -05:00
cypherpunks 034f51dd02 Be exact about the number of spaces in the header.
Also fixes changes files that warn on this.
2015-03-09 09:00:40 -04:00
cypherpunks 9dc90a5b7b Add check-changes rule for checking formatting of changes files.
Additional fixes to make the change work;
- fix Python 2 vs 3 issues
- fix some PEP 8 warnings
- handle paths with numbers correctly
- mention the make rule in doc/HACKING.
2015-03-09 09:00:12 -04:00
Nick Mathewson 94a877381d Check for # characters in lintchanges 2015-02-19 09:54:09 -05:00
Nick Mathewson 845d92295f have lintchanges check header format. 2014-12-22 10:00:34 -05:00
Nick Mathewson 441a481bb8 Resolve issues in changes files 2014-12-22 09:49:33 -05:00
Nick Mathewson 8b532a8c81 Short python script to lint the changes files 2014-12-22 09:34:55 -05:00