Nick Mathewson
e4ca2459db
add_warnings: ignore clippy::result_large_err
...
This is a temporary workaround for #587 until we get it fixed for
real.
2022-11-03 11:05:14 -04:00
Nick Mathewson
0cb886a098
add_warnings: work with more non-GNU finds.
...
We were doing `find -name '*.rs'`, but `find . -name '*.rs'` (with the .)
is more standard.
2022-11-03 11:03:43 -04:00
Ian Jackson
82ad9eea5f
Allow "clippy::single_char_pattern" in tests.
...
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
2022-10-12 13:50:29 +01:00
FAMASoon
4cfdeca0f1
format python script in maint
2022-08-17 02:15:35 +09:00
Ian Jackson
b7c03943f1
maint/add_warning: Fix parsing of --check
...
Previously this would eat the first filename!
2022-06-24 14:23:38 +01:00
Ian Jackson
23c352b96b
clippy: Consolidate many lints in maint/add_warning
...
Found these by disabling the nightly dbg macro special case. Now, we
have a mechanism for globally adding suppressions to tests, we can use
that instead.
2022-06-24 14:23:38 +01:00
Ian Jackson
bebf013bef
maint/add_warning: Add two lints via add_warning as a test case
2022-06-24 14:23:38 +01:00
Ian Jackson
72515abf91
maint/add_warning: Add ability maintain test lint blocks
2022-06-24 14:23:38 +01:00
Ian Jackson
76ff330610
maint/add_warning: Scan all files by default, but insist only in some
...
This will allow us to have add_warning manage test lint blocks.
We have to stop printing all the filenames because there are too
many. Filenames still come out on error of course.
2022-06-24 14:23:34 +01:00
Ian Jackson
13e27919c5
clippy: Supresss clippy::significant_drop_in_scrutinee
...
As per the linked discussion.
2022-06-23 19:14:54 +01:00
Ian Jackson
28dea73523
lints: Scheme for allowing us to name nightly lints
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/501
2022-06-23 19:14:11 +01:00
Ian Jackson
2730bed5bd
maint/add_warning: Convert remaining asserts
2022-05-31 19:16:09 +01:00
Ian Jackson
6c52fa675b
maint/add_warning: Introduce ImproperFile and convert one assert
2022-05-31 19:14:19 +01:00
Ian Jackson
7e96664140
maint/add_warning: Use python3 argparse
2022-05-31 19:03:38 +01:00
Ian Jackson
47a10fa84c
maint/add_warning: Add "how to fix" to error message
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/557#note_2808879
2022-05-31 18:54:08 +01:00
Ian Jackson
89b4a59048
maint/add_warning: Provide --check mode
2022-05-31 18:54:08 +01:00
Ian Jackson
c2939b5f74
maint/add_warning: Change shebang to python3
...
"python" sometimes means Python 2.
2022-05-31 18:53:49 +01:00
Ian Jackson
00f82a7f4d
maint/add_warning: Use .tmp~ for temp filename, not .bak
...
"bak" ought to be a backup file, with the old contents, which this
most definitely isn't.
2022-05-31 18:53:47 +01:00
Ian Jackson
2814fd99c1
lints: Add let_unit_value allow to add_warning
...
add_warning can now add allows. This one was agreed in some other MR
for one crate. Allow it everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson
a8f3423107
lints: Add two missing ones to add_warning
...
These were in some crates, but not all. Put them in add_warning
where they will propagate everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson
47a209fb31
lints: maint/add_warning: New marker-based mode
...
We don't process the in-script lint block, just paste it in, now.
This is less complicated.
This reverts/replaces
"maint/add_warnings: Make it add the markers for its future self"
2022-05-31 13:00:31 +01:00
Ian Jackson
3ae7244f91
maint/add_warnings: Make it add the markers for its future self
...
We'll run this in a moment. Then we'll revert it.
2022-05-31 13:00:31 +01:00
Ian Jackson
ea5caf9ac2
lints: maint/add_warning: Improve ordering
...
The crates we have aren't consistent. But changing this means the
deltas resulting from the script are smaller.
2022-05-31 13:00:31 +01:00
Ian Jackson
a8331c588e
maint/add_warnings: Tidy up, and add some commentary
...
This puts the actually-used lint list at the top.
No functional change.
2022-05-31 13:00:31 +01:00
Nick Mathewson
f7009e238a
add_warning: remove clone_on_ref_ptr
...
See !352
2022-03-01 15:38:46 -05:00
Ian Jackson
d3ab2bb636
maint/add_warning: Remove duplicate argv0 from usage message
2022-02-18 11:46:06 +00:00
Ian Jackson
1c301230e4
rename *.py scripts to bare name
...
Update all references. There are three remaining hits for
git-grep '\.py\b'
all of which are scripts in "little-t-tor", not here in arti.
2022-02-18 11:46:06 +00:00