Skip to content

Commit

Permalink
lint: warn panics, expects and unwraps (#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
carneiro-cw authored Dec 27, 2024
1 parent d4d7315 commit 57ff938
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
allow-unwrap-in-tests = true
disallowed-names = ["lock"]
allow-expect-in-tests = true
allow-panic-in-tests = true
disallowed-names = ["lock"]
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,5 @@ unused_self = "warn"
used_underscore_binding = "warn"
wildcard_imports = "warn"
unwrap_used = "allow"
expect_used = "warn"
panic = "warn"
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ lint:
@just _lint

# Stratus: Lint and check code formatting
lint-check nightly-version="":
@just _lint "{{nightly-version}}" --check "-D warnings"
lint-check nightly-version="" clippy-flags="-D warnings -A clippy::unwrap_used -A clippy::expect_used -A clippy::panic":
@just _lint "{{nightly-version}}" --check "{{ clippy-flags }}"

# Stratus: Check for dependencies major updates
outdated:
Expand Down

0 comments on commit 57ff938

Please sign in to comment.