Commit Graph

231 Commits

Author SHA1 Message Date
Nick Mathewson 69ebbedc3c Add Gabi to exclude_contributors.
(We don't include Tor employees in our "thanks" section.)
2023-03-31 07:30:09 -04:00
Dimitris Apostolou 629fa80674
Fix typos 2023-03-24 09:56:08 +02:00
Ian Jackson 3038c7520d maint/check_todos: Offer advice on workarounds, if tripped 2023-03-21 13:08:51 +00:00
Ian Jackson ac2c56f92d Obscure various literal uses of the todo marker
In each case, use a circumlocution.
2023-03-21 13:08:51 +00:00
Ian Jackson 541c5338af maint/check_todos: New script 2023-03-21 13:08:14 +00:00
Nick Mathewson 61096d61c3 fixup-features: Use write-and-rename pattern. 2023-03-20 13:29:33 -04:00
Nick Mathewson cd4895e525 fixup-features: Improve a comment. 2023-03-20 13:29:33 -04:00
Nick Mathewson 630d87f9c1 fixup-features: Simplify "optionality" detection. 2023-03-20 13:29:33 -04:00
Nick Mathewson 96cd970398 New "fixup-features" tool to enforce properties in Cargo.tomls
See top-level main.rs comment for an explanation.

Closes #771
2023-03-20 13:29:33 -04:00
Ian Jackson 333ce4118b Merge branch 'check_env' into 'main'
maint: add a full dependency check

See merge request tpo/core/arti!1030
2023-03-01 12:48:20 +00:00
Ian Jackson ce2fee9166 Merge branch 'zlib' into 'main'
Approve zlib licence

See merge request tpo/core/arti!1035
2023-02-27 13:34:05 +00:00
Emil Engler 20e40d79db
maint: remove the dependency check from coverage
This commit removes the dependency check introduced by b4b8d040, because
it's task is now done by the recently added `check_env` script.
2023-02-24 18:32:06 +01:00
Emil Engler 4b2b6e06da
maint: add a full dependency check
This commit adds a script that checks the environment for it's suitable
as an Arti development environment.

It follows an idea pitched by Ian Jackson and me in !1025.
2023-02-24 18:32:06 +01:00
Ian Jackson df79d407d9 maint/check_licensse: Placate shellcheck
There's nothing wrong with the previous idiom since it's a trusted
variable, but whatever.
2023-02-24 17:27:43 +00:00
Ian Jackson 4756ad6e57 maint/check_licensse: Approve Zlib licence
This is a very permissive BSD/MIT-like licence.  I have reviewed the
licence text and it is inoffensive.

I want this for slotmap, in !1034
2023-02-24 17:14:27 +00:00
Ian Jackson 7068f237f7 maint/check_licensse: Honour CARGO variable
Even if it contains spaces.
2023-02-24 17:14:27 +00:00
Ian Jackson 745336fac5 maint/check_licensse: Do not discard actual error
This confused me while I was debugging the interaction with nailing-cargo.
2023-02-24 17:14:27 +00:00
Ian Jackson bd920fc844 Merge branch 'fix-adhoc' into 'main'
maint: fix `adhoc-add-lint-blocks` script

See merge request tpo/core/arti!1031
2023-02-24 17:01:35 +00:00
Emil Engler d6a7ace662
git: add maint/.gitignore for __pycache__
The maint/ directory contains several python scripts, which will create
a __pycache__ directory.
2023-02-22 18:31:40 +01:00
Emil Engler 346ade6200
maint: fix `adhoc-add-lint-blocks` script
This commit fixes a bug in maint/adhoc-add-lint-blocks, which made it
impossible to execute, because `/usr/bin/env` looked at Perl's command
line arguments to be a part of the binary name.
2023-02-22 18:30:33 +01:00
Ian Jackson ed5857fab1 Merge branch 'coverage-dep-check' into 'main'
maint: add a dependency check to coverage

Closes #776

See merge request tpo/core/arti!1025
2023-02-22 12:00:28 +00:00
Emil Engler b4b8d040a0
maint: add a dependency check to coverage
This commit implements a dependency check to the `maint/coverage`
script, that checks for the rustup, python3, and grcov binaries in
$PATH; the bs4 and lxml python packages; and the llvm-tools Rust
component.

Fixes #776
2023-02-21 20:09:17 +01:00
Nick Mathewson be8f483acc Fix a bug in check_doc_features
In Python, str.find returns -1 if it doesn't find the target
character, and -1 is a true value.  So `if pos := foo.find('c')`
won't do what we want.
2023-02-21 15:17:28 +00:00
Emil Engler 66fd697a73
maint: forcefully remove files in coverage
When performing the initial run of `./maint/coverage`, it will report an
error message to stderr, that several files cannot be deleted, due to
their non-existence.

While the error is still ignored, I personally think that there is no
benefit in showing it either, thereby surpressing it with this commit.

Beside this, this syntax might be easier to understand from a semantical
point of view.
2023-02-16 15:14:08 +01:00
Nick Mathewson 7feda22444 tor-cell: documentation cleanups related to restricted_msg 2023-02-07 16:03:14 -05:00
Emil Engler 53bf3492e8
maint: add shebang
This commit adds a test called `shebang`, which checks if all shebangs
in scripts use relative paths through `#/usr/bin/env`, rather than
absolute paths, such as `#/bin/bash`.

See 833b10575b.
2023-01-26 21:04:34 +01:00
Emil Engler 54f549dd53
maint: replace llvm-tools-preview with llvm-tools
This commit replaces all occurrences of `llvm-tools-preview` with
`llvm-tools`, because it became a stable feature with Rust 1.60, thereby
making the `-preview` prefix obsolete. Beside this, `llvm-tools-preview`
is a redirection to the latter one anyway.

However, it does not work the other way around. At the moment, it is not
possible to execute the `maint/coverage` script on a NixOS system,
because the rustup component list only includes `llvm-tools`, but not
`llvm-tools-preview`, thereby making this change necessary.
2023-01-27 15:56:09 +01:00
Nick Mathewson a6dd92843e Allow clippy::unchecked_duration_subtraction in tests
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson bf04641c68 Disable clippy::unlinlined-format-args
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.
2023-01-27 08:27:47 -05:00
Emil Engler 833b10575b
maint: update shellcheck_all with /usr/bin/env
This commit updates the shellcheck_all script, in order to look for
/usr/bin/env, instead of /bin.
2023-01-25 18:43:14 +01:00
Emil Engler 79097484de
shell: use /usr/bin/env instead of absolute paths
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
2023-01-25 18:35:53 +01:00
Ian Jackson a8fda4b0cd test lint blocks: Add ad hoc script for adding them 2022-12-12 18:00:26 +00:00
Ian Jackson 879c4cdbf3 Merge branch 'shadow-bridge' into 'main'
Test vanilla bridge in shadow

See merge request tpo/core/arti!915
2022-12-12 11:41:05 +00:00
Dimitris Apostolou 7c1beb6171
Fix typos 2022-12-09 11:57:36 +02:00
trinity-1686a 18a12d3feb put ci log span magic strings in a dedicated script 2022-12-05 18:41:23 +01:00
Ian Jackson b6a4f2388d CI: test that we can compile, and test cfg, with/without bridges/PTs 2022-11-29 17:52:12 +00:00
trinity-1686a 3d5d4ada01 use newer version of zstd and lzma 2022-11-29 12:54:25 +01:00
Ian Jackson fbd4b88044 Merge branch 'test-config' into 'main'
tor-guardmgr: Fix visibility of TestConfig with no features enabled

See merge request tpo/core/arti!875
2022-11-23 17:51:05 +00:00
Nick Mathewson 4c5a88c925 Merge branch 'matrix-test' into 'main'
maint/matrix_test: Print what command we are running!

See merge request tpo/core/arti!879
2022-11-23 17:50:30 +00:00
Ian Jackson 639cc23da3 Ignore atty theoretical unaligned read for now 2022-11-22 12:54:21 +00:00
Ian Jackson a171f51c1a maint/matrix_test: Print what command we are running! 2022-11-21 15:47:08 +00:00
Ian Jackson d6f567b8ef fixup! tor-guardmgr: Fix visibility of TestConfig with no features enabled 2022-11-18 16:40:28 +00:00
trinity-1686a 614cf34284 Check more targets 2022-11-10 13:34:17 +00:00
Gabriel de Perthuis bc08ea48f7 Upgrade to clap 3 with minimal changes
This removes the last cargo audit override (for the unmaintained
ansi_term).

Don't mark options as required when they have default values:
see <https://github.com/clap-rs/clap/pull/3793>.
2022-11-04 19:28:38 +01:00
Ian Jackson 53905f3e1a docs features: Add a suppression for testing 2022-11-03 15:51:45 +00:00
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
trinity-1686a dd5aa3ea38 cleanup target dir on job completion 2022-10-21 18:10:39 +00:00
Nick Mathewson e0c1928ea0 Merge branch 'matrix-features' into 'main'
add checks for many feature combinations

Closes #303

See merge request tpo/core/arti!775
2022-10-21 12:57:36 +00:00
Nick Mathewson 938af98b8c Remove now-needless check_doc_features exception. 2022-10-20 12:37:41 -04:00