Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@ required-features = ["rand", "std"]
[workspace]
members = ["secp256k1-sys"]
exclude = ["no_std_test"]

[lints.clippy]
# Exclude lints we don't think are valuable.
large_enum_variant = "allow" # docs say "measure before paying attention to this"; why is it on by default??
similar_names = "allow" # Too many (subjectively) false positives.
uninlined_format_args = "allow" # This is a subjective style choice.
indexing_slicing = "allow" # Too many false positives ... would be cool though
match_bool = "allow" # Adds extra indentation and LOC.
match_same_arms = "allow" # Collapses things that are conceptually unrelated to each other.
must_use_candidate = "allow" # Useful for audit but many false positives.
Comment on lines +77 to +85
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this lints be whitelisted in the modules as needed rather than globally here.
Also if whitelisting locally (either in modules or specific code) I would advocate to using expect than allow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lints are bad and I would rather not use clippy than deal with them. Global whitelisting is the right approach.

Using expect would require I know whether or not they trigger.

10 changes: 10 additions & 0 deletions secp256k1-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ alloc = []

[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(secp256k1_fuzz)', 'cfg(rust_secp_no_symbol_renaming)'] }

[lints.clippy]
# Exclude lints we don't think are valuable.
large_enum_variant = "allow" # docs say "measure before paying attention to this"; why is it on by default??
similar_names = "allow" # Too many (subjectively) false positives.
uninlined_format_args = "allow" # This is a subjective style choice.
indexing_slicing = "allow" # Too many false positives ... would be cool though
match_bool = "allow" # Adds extra indentation and LOC.
match_same_arms = "allow" # Collapses things that are conceptually unrelated to each other.
must_use_candidate = "allow" # Useful for audit but many false positives.
Comment on lines +41 to +47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this lints be whitelisted in the modules as needed rather than globally here.
Also if whitelisting locally (either in modules or specific code) I would advocate to using expect than allow.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there no newline?