Skip to content

Commit

Permalink
Change defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Aug 2, 2024
1 parent f0e54cb commit 10d0e51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/src/checks/bans/cfg.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ If true, path dependencies will be included in the duplication check, otherwise

Determines what happens when a dependency in [`[workspace.dependencies]`](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table) is not used in the workspace.

* `deny` - Will emit an error for each dependency that is not actually used in the workspace.
* `deny` (default) - Will emit an error for each dependency that is not actually used in the workspace.
* `warn` - Will emit a warning for each dependency that is not actually used in the workspace, but does not fail the check.
* `allow` - (default) Ignores checking for unused workspace dependencies.
* `allow` - Ignores checking for unused workspace dependencies.

### The `highlight` field (optional)

Expand Down
5 changes: 2 additions & 3 deletions src/bans/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,8 @@ impl<'de> Deserialize<'de> for WorkspaceDepsConfig {
let mut th = TableHelper::new(value)?;

let duplicates = th.optional("duplicates").unwrap_or(LintLevel::Deny);
let include_path_dependencies =
th.optional("include-path-dependencies").unwrap_or_default();
let unused = th.optional("unused").unwrap_or(LintLevel::Allow);
let include_path_dependencies = th.optional("include-path-dependencies").unwrap_or(true);
let unused = th.optional("unused").unwrap_or(LintLevel::Deny);

th.finalize(None)?;

Expand Down

0 comments on commit 10d0e51

Please sign in to comment.