| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Due to precedence, both work the same, but the former is preferred.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Black" is an "opinionated" python formatter, whose opinionatedness
is somewhat in the spirit of rustfmt.
This MR runs black with default settings on all of our python code
in Arti. It was produced by the following commands
```
# Everything in python/
black python/
# Everything with a .py extension
fd '.py$' -X black
# Everything with a python shebang.
git grep -l '#! */usr/bin/env *python' | xargs black
```
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is the same as the TEST_LINTS exception list, plus the
nightly exception from our main lints list. It matches what
we have in crates/examples/*.rs.
|
| |
|
|
| |
This keeps our begin/end lines consistent, and lets us add new lists.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Sometimes we want to enforce different lints
depending on whether we're running CI.
Until now we've been using `#[cfg(not(ci_arti_FOO))]` for this,
but that approach now seems to be somewhat deprecated,
and to cause warnings on nightly. (See #1395.)
Instead, I'm tweaking the add_warning script
so that it can conditionally suppress lines depending on
a command-line argument that it receives.
|
| |
|
|
|
|
| |
This is a new warning on nightly. It triggers for every one of our
test blocks that starts with `#[cfg(test)]` and then goes on to
have an `#![allow(...)]` block at the start of the module.
|
| | |
|
| |
|
|
|
|
|
| |
Rationale: same as for useless_vec, as in 01cb7ee0a112.
Prompted by reading a commit where someone did makework to get rid of
an occurrence of this warning.
|
| |
|
|
| |
Part of #951. See comments for explanation of why this is important.
|
| |
|
|
|
|
|
|
|
| |
This is a perf issue, only. If tests are too slow, we will notice and
ca speed them up. We should optimise for clarity and convenience,
rather than speed.
Forbidding this can result in churn between vec![] and [] as tests are
updated and changed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rationale: no-one writes these by default without thinkinh. If they
are unnecessary, then either the string must have had " in it
before (in which case it might do again), or it is near other strings
which *do* need it.
And having it does no harm; indeed IMO it can increase clarity.
Alternative to !1388's
Fix new "needless_raw_string_hashes" lint from clippy +nightly
|
| |
|
|
|
|
|
| |
As of current nightly, this lint now includes expect()s,
which makes it trigger way more than we'd like.
See discussion on #950.
|
| |
|
|
|
|
|
|
| |
These are available in our MSRV now, so we don't need to handle
specially. We can just add them to the standard lint block.
(Lint block in every crate will be updated automatically in the next
commit.)
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748.
|
| |
|
|
|
|
|
|
|
|
| |
This commit changes the shebang in all shell scripts from absolute
paths (such as `/bin/bash` or `/usr/bin/python3`) to the `/usr/bin/env`
binary with the accompanying interpreter as it's argument.
The reason for this are as follows:
- NixOS cannot work with absolute paths
- BSD systems install their packages in /usr/local/bin
|
| |
|
|
|
| |
This is a temporary workaround for #587 until we get it fixed for
real.
|
| |
|
|
|
| |
We were doing `find -name '*.rs'`, but `find . -name '*.rs'` (with the .)
is more standard.
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| | |
|
| |
|
|
| |
Previously this would eat the first filename!
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
As per the linked discussion.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/501
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/557#note_2808879
|
| | |
|
| |
|
|
| |
"python" sometimes means Python 2.
|
| |
|
|
|
| |
"bak" ought to be a backup file, with the old contents, which this
most definitely isn't.
|
| |
|
|
|
| |
add_warning can now add allows. This one was agreed in some other MR
for one crate. Allow it everywhere.
|
| |
|
|
|
| |
These were in some crates, but not all. Put them in add_warning
where they will propagate everywhere.
|
| |
|
|
|
|
|
|
| |
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"
|
| |
|
|
| |
We'll run this in a moment. Then we'll revert it.
|
| |
|
|
|
| |
The crates we have aren't consistent. But changing this means the
deltas resulting from the script are smaller.
|
| |
|
|
|
|
| |
This puts the actually-used lint list at the top.
No functional change.
|
| |
|
|
| |
See !352
|
| | |
|
|
|
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.
|