Skip to content

Commit

Permalink
Make the allow of clippy::similar_names more tightly scoped (#462)
Browse files Browse the repository at this point in the history
Previously the lint was disabled for the whole `libcnb` crate, when
it's only one file for which warnings are generated,

If future usages come up in other files that we don't want to fix, then
I would rather the lint highlight them, allowing the author of the change
to decide whether they too should be excluded, or whether they should
be fixed.
  • Loading branch information
edmorley authored Jul 8, 2022
1 parent 1af1eae commit ca9dabd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions libcnb/src/layer/handling.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This lint triggers when both layer_dir and layers_dir are present which are quite common.
#![allow(clippy::similar_names)]

use crate::build::BuildContext;
use crate::data::layer::LayerName;
use crate::data::layer_content_metadata::LayerContentMetadata;
Expand Down
2 changes: 0 additions & 2 deletions libcnb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#![allow(clippy::missing_errors_doc)]
// This lint is too noisy and enforces a style that reduces readability in many cases.
#![allow(clippy::module_name_repetitions)]
// This lint triggers when both layer_dir and layers_dir are present which are quite common.
#![allow(clippy::similar_names)]

pub mod build;
pub mod detect;
Expand Down

0 comments on commit ca9dabd

Please sign in to comment.