Skip to content

Commit 7946de2

Browse files
committed
feat: Implement extra_lints
ink_linting was splitted up to two libraries in use-ink/ink#2032
1 parent ddabef6 commit 7946de2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/build/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ fn exec_cargo_clippy(crate_metadata: &CrateMetadata, verbosity: Verbosity) -> Re
515515
/// We create a temporary folder, extract the linting driver there and run
516516
/// `cargo dylint` with it.
517517
fn exec_cargo_dylint(
518-
_extra_lints: bool,
518+
extra_lints: bool,
519519
crate_metadata: &CrateMetadata,
520520
verbosity: Verbosity,
521521
) -> Result<()> {
@@ -528,7 +528,10 @@ fn exec_cargo_dylint(
528528
};
529529

530530
let target_dir = &crate_metadata.target_directory.to_string_lossy();
531-
let args = vec!["--lib=ink_linting"];
531+
let mut args = vec!["--lib=ink_linting_mandatory"];
532+
if extra_lints {
533+
args.push("--lib=ink_linting");
534+
}
532535
let env = vec![
533536
// We need to set the `CARGO_TARGET_DIR` environment variable in
534537
// case `cargo dylint` is invoked.

0 commit comments

Comments
 (0)