Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add additional clippy lints #965

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# TODO: Use stable once workspace lints are available
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
Expand Down
60 changes: 60 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,63 @@ tracing-subscriber = "0.3.17"
url = { version = "2.4.1", default-features = false }
walkdir = "2.4.0"
wiremock = "0.5.19"

[workspace.lints.clippy]
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
cast_lossless = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
decimal_literal_representation = "warn"
default_trait_access = "warn"
doc_markdown = "warn"
exit = "warn"
expl_impl_clone_on_copy = "warn"
explicit_into_iter_loop = "warn"
filetype_is_file = "warn"
filter_map_next = "warn"
float_cmp_const = "warn"
fn_params_excessive_bools = "warn"
get_unwrap = "warn"
implicit_clone = "warn"
large_digit_groups = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
let_underscore_must_use = "warn"
let_unit_value = "warn"
linkedlist = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
manual_ok_or = "warn"
manual_let_else = "warn"
map_err_ignore = "warn"
map_flatten = "warn"
match_bool = "warn"
match_on_vec_items = "warn"
match_same_arms = "warn"
match_wildcard_for_single_variants = "warn"
mem_forget = "warn"
mut_mut = "warn"
needless_continue = "warn"
option_option = "warn"
ptr_as_ptr = "warn"
range_minus_one = "warn"
range_plus_one = "warn"
rc_buffer = "warn"
ref_option_ref = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_functions_in_if_condition = "warn"
string_to_string = "warn"
trait_duplication_in_bounds = "warn"
trivially_copy_pass_by_ref = "warn"
type_repetition_in_bounds = "warn"
unicode_not_nfc = "warn"
unneeded_field_pattern = "warn"
unreadable_literal = "warn"
unsafe_derive_deserialize = "warn"
unseparated_literal_suffix = "warn"
unused_self = "warn"
used_underscore_binding = "warn"
verbose_file_reads = "warn"
zero_sized_map_values = "warn"
3 changes: 2 additions & 1 deletion crates/cargo_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ license = "MIT OR Apache-2.0"
keywords = ["cargo", "utilities", "utils", "workspace"]
categories = ["development-tools"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/fake_package/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ edition = "2021"
publish = false
license = "MIT OR Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
cargo_metadata.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/git_cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ categories = ["development-tools", "filesystem"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lints]
workspace = true

[features]
test_fixture = []

Expand Down
3 changes: 2 additions & 1 deletion crates/next_version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ repository = "https://github.com/MarcoIeni/release-plz/tree/main/crates/next_ver
keywords = ["semver", "semantic", "versioning", "conventional", "commits"]
categories = ["development-tools", "parsing"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
semver.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/release_plz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ readme = "../../README.md"
keywords = ["release", "please", "semver", "conventional", "commits"]
categories = ["command-line-utilities", "development-tools"]

[lints]
workspace = true

[features]
default = ["docker-tests"]
# Run tests that need a docker runtime to be executed
Expand Down
3 changes: 2 additions & 1 deletion crates/release_plz_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ license = "MIT OR Apache-2.0"
keywords = ["release", "please", "semver", "conventional", "commits"]
categories = ["development-tools"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
cargo_utils = { path = "../cargo_utils", version = "0.1.29" }
Expand Down
3 changes: 2 additions & 1 deletion crates/test_logs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ repository = "https://github.com/MarcoIeni/release-plz/tree/main/crates/test_log
keywords = ["test", "logs", "tracing"]
categories = ["development-tools", "development-tools::testing"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
once_cell.workspace = true
Expand Down