Skip to content

Commit bfc1d4f

Browse files
committed
refactor(lint): use a shared lint config for the workspace
1 parent 8178c9b commit bfc1d4f

File tree

4 files changed

+29
-24
lines changed

4 files changed

+29
-24
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,34 +93,12 @@ jobs:
9393
uses: actions-rs/cargo@v1
9494
with:
9595
command: clippy
96-
args: >
97-
--tests --verbose --
98-
-D warnings
99-
-A clippy::literal_string_with_formatting_args
100-
-A clippy::tabs_in_doc_comments
96+
args: --tests --verbose -- -D warnings
10197
- name: Check the pedantic lints
10298
uses: actions-rs/cargo@v1
10399
with:
104100
command: clippy
105-
args: >
106-
--all-targets --verbose -- -W clippy::pedantic
107-
-A clippy::needless_raw_string_hashes
108-
-A clippy::unreadable_literal
109-
-A clippy::redundant_else
110-
-A clippy::items_after_statements
111-
-A clippy::missing_errors_doc
112-
-A clippy::module_name_repetitions
113-
-A clippy::uninlined_format_args
114-
-A clippy::manual_string_new
115-
-A clippy::must_use_candidate
116-
-A clippy::too_many_lines
117-
-A clippy::wildcard_imports
118-
-A clippy::missing_panics_doc
119-
-A clippy::inefficient_to_string
120-
-A clippy::redundant_closure_for_method_calls
121-
-A clippy::map_unwrap_or
122-
-A clippy::struct_excessive_bools
123-
-A clippy::unnecessary_wraps
101+
args: --all-targets --verbose -- -W clippy::pedantic
124102

125103
rustfmt:
126104
name: Formatting

Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,24 @@ strip = true
3232
opt-level = 3
3333
debug = true # used by the profiler
3434
strip = false # keep symbols for the profiler
35+
36+
[workspace.lints.clippy]
37+
literal_string_with_formatting_args = "allow"
38+
tabs_in_doc_comments = "allow"
39+
needless_raw_string_hashes = "allow"
40+
unreadable_literal = "allow"
41+
redundant_else = "allow"
42+
items_after_statements = "allow"
43+
missing_errors_doc = "allow"
44+
module_name_repetitions = "allow"
45+
uninlined_format_args = "allow"
46+
manual_string_new = "allow"
47+
must_use_candidate = "allow"
48+
too_many_lines = "allow"
49+
wildcard_imports = "allow"
50+
missing_panics_doc = "allow"
51+
inefficient_to_string = "allow"
52+
redundant_closure_for_method_calls = "allow"
53+
map_unwrap_or = "allow"
54+
struct_excessive_bools = "allow"
55+
unnecessary_wraps = "allow"

git-cliff-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ temp-dir = "0.1.14"
106106
[package.metadata.docs.rs]
107107
all-features = true
108108
rustdoc-args = ["--cfg", "docsrs"]
109+
110+
[lints]
111+
workspace = true

git-cliff/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ path = "../git-cliff-core"
6666
[dev-dependencies]
6767
pretty_assertions = "1.4.1"
6868

69+
[lints]
70+
workspace = true
71+
6972
# metadata for cargo-binstall to get the right artifacts
7073
[package.metadata.binstall]
7174
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ version }-{ target }{ archive-suffix }"

0 commit comments

Comments
 (0)