Skip to content

Commit 26c011c

Browse files
committed
rust: run Clippy on tests and fix existing errors
Summary: We run Clippy to catch common errors, but by default Clippy only runs on non-test code. We noticed this in #4487, when Clippy would have caught a real error (test doing nothing due to `unit_cmp`). This patch adds the `--tests` flag to our Clippy invocation and fixes all existing warnings. Test Plan: The first draft of this PR will include only the workflow change, and so should fail… wchargin-branch: rust-clippy-tests wchargin-source: 3be9bc4b9c2084a9f9dda2b0082227f061989811
1 parent 77cf61f commit 26c011c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ jobs:
243243
uses: actions-rs/clippy-check@v1
244244
with:
245245
token: ${{ secrets.GITHUB_TOKEN }}
246-
args: --manifest-path tensorboard/data/server/Cargo.toml
246+
args: --tests --manifest-path tensorboard/data/server/Cargo.toml
247247
- name: 'Check cargo-raze freshness'
248248
run: |
249249
rm -rf third_party/rust/

0 commit comments

Comments
 (0)