Skip to content

Commit

Permalink
Merge pull request #54 from moia-oss/use-pedantic-lints
Browse files Browse the repository at this point in the history
enable strict linting and fix lints
  • Loading branch information
rinde authored Feb 15, 2024
2 parents 6908592 + 42f09cc commit b45414a
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 56 deletions.
42 changes: 42 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,45 @@ thiserror = "1.0.50"
[dev-dependencies]
serde_test = "1.0.176"
serde_json = "1.0.108"

[lints.rust]
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "allow" # TODO
single_use_lifetimes = "warn"
unreachable_pub = "warn"
unsafe_code = "deny"
unstable_features = "deny"
unused_crate_dependencies = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
unused_results = "warn"
unused_tuple_struct_fields = "warn"
unused = "warn"

[lints.rustdoc]
broken_intra_doc_links = "deny"
missing_crate_level_docs = "warn"

[lints.clippy]
cargo = "allow" # TODO
complexity = "warn"
correctness = "deny"
perf = "warn"
style = "warn"
suspicious = "deny"
todo = "warn"

### Pedantic
pedantic = { level = "warn", priority = -1 }
missing_errors_doc = "allow" # TODO
cast_precision_loss = "allow"
cast_possible_truncation = "allow"
cast_lossless = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
34 changes: 1 addition & 33 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,7 @@ lint:
cargo clippy \
--workspace \
--tests \
--benches \
-- \
-D clippy::complexity \
-D clippy::correctness \
-D clippy::perf \
-D clippy::style \
-D clippy::suspicious \
-D clippy::todo \
-D clippy::doc_link_with_quotes \
-D clippy::doc_markdown \
-D clippy::cloned_instead_of_copied \
-D clippy::checked_conversions \
-D clippy::filter_map_next \
-D clippy::manual_instant_elapsed \
-D clippy::cast_possible_wrap \
-D clippy::cast_lossless \
-D clippy::cast_possible_truncation \
-D clippy::cast_sign_loss \
-D clippy::dbg_macro \
-D clippy::expect_used \
-D clippy::format_push_string \
-D clippy::get_unwrap \
-D clippy::if_then_some_else_none \
-D clippy::panic \
-D clippy::panic_in_result_fn \
-D clippy::print_stderr \
-D clippy::print_stdout \
-D clippy::try_err \
-D clippy::unimplemented \
-D clippy::unnecessary_self_imports \
-D clippy::unneeded_field_pattern \
-D clippy::unreachable \
-D clippy::use_debug
--benches
cargo doc \
--all \
--no-deps \
Expand Down
Loading

0 comments on commit b45414a

Please sign in to comment.