mirror of
https://github.com/ratatui/ratatui.git
synced 2025-10-02 07:21:24 +00:00
chore(lint): ensure lint config is correct (#1528)
- Move lints to workspace manifest - Add lint config to backend crates - Fix one small lint error
This commit is contained in:
parent
2892bddce6
commit
d3f01ebf6e
42
Cargo.toml
42
Cargo.toml
@ -53,3 +53,45 @@ termion = "4.0.0"
|
|||||||
[profile.bench]
|
[profile.bench]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
unsafe_code = "forbid"
|
||||||
|
|
||||||
|
[workspace.lints.clippy]
|
||||||
|
cargo = { level = "warn", priority = -1 }
|
||||||
|
pedantic = { level = "warn", priority = -1 }
|
||||||
|
cast_possible_truncation = "allow"
|
||||||
|
cast_possible_wrap = "allow"
|
||||||
|
cast_precision_loss = "allow"
|
||||||
|
cast_sign_loss = "allow"
|
||||||
|
missing_errors_doc = "allow"
|
||||||
|
missing_panics_doc = "allow"
|
||||||
|
module_name_repetitions = "allow"
|
||||||
|
must_use_candidate = "allow"
|
||||||
|
|
||||||
|
# we often split up a module into multiple files with the main type in a file named after the
|
||||||
|
# module, so we want to allow this pattern
|
||||||
|
module_inception = "allow"
|
||||||
|
|
||||||
|
# nursery or restricted
|
||||||
|
as_underscore = "warn"
|
||||||
|
deref_by_slicing = "warn"
|
||||||
|
else_if_without_else = "warn"
|
||||||
|
empty_line_after_doc_comments = "warn"
|
||||||
|
equatable_if_let = "warn"
|
||||||
|
fn_to_numeric_cast_any = "warn"
|
||||||
|
format_push_string = "warn"
|
||||||
|
map_err_ignore = "warn"
|
||||||
|
missing_const_for_fn = "warn"
|
||||||
|
mixed_read_write_in_expression = "warn"
|
||||||
|
mod_module_files = "warn"
|
||||||
|
needless_pass_by_ref_mut = "warn"
|
||||||
|
needless_raw_strings = "warn"
|
||||||
|
or_fun_call = "warn"
|
||||||
|
redundant_type_annotations = "warn"
|
||||||
|
rest_pat_in_fully_bound_structs = "warn"
|
||||||
|
string_lit_chars_any = "warn"
|
||||||
|
string_slice = "warn"
|
||||||
|
string_to_string = "warn"
|
||||||
|
unnecessary_self_imports = "warn"
|
||||||
|
use_self = "warn"
|
||||||
|
@ -64,7 +64,5 @@ serde_json.workspace = true
|
|||||||
[target.'cfg(not(windows))'.dev-dependencies]
|
[target.'cfg(not(windows))'.dev-dependencies]
|
||||||
ratatui = { workspace = true, features = ["termion"] }
|
ratatui = { workspace = true, features = ["termion"] }
|
||||||
|
|
||||||
[lints.clippy]
|
[lints]
|
||||||
# we often split up a module into multiple files with the main type in a file named after the
|
workspace = true
|
||||||
# module, so we want to allow this pattern
|
|
||||||
module_inception = "allow"
|
|
||||||
|
@ -730,7 +730,7 @@ impl fmt::Display for Text<'_> {
|
|||||||
|
|
||||||
impl Widget for Text<'_> {
|
impl Widget for Text<'_> {
|
||||||
fn render(self, area: Rect, buf: &mut Buffer) {
|
fn render(self, area: Rect, buf: &mut Buffer) {
|
||||||
Widget::render(&self, area, buf)
|
Widget::render(&self, area, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,3 +43,6 @@ ratatui-core = { workspace = true }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ratatui = { path = "../ratatui", features = ["crossterm"] }
|
ratatui = { path = "../ratatui", features = ["crossterm"] }
|
||||||
rstest.workspace = true
|
rstest.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -33,3 +33,6 @@ instability.workspace = true
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rstest.workspace = true
|
rstest.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -37,3 +37,6 @@ termwiz.workspace = true
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ratatui = { path = "../ratatui", features = ["termwiz"] }
|
ratatui = { path = "../ratatui", features = ["termwiz"] }
|
||||||
rstest.workspace = true
|
rstest.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -66,52 +66,5 @@ pretty_assertions.workspace = true
|
|||||||
ratatui = { path = "../ratatui" }
|
ratatui = { path = "../ratatui" }
|
||||||
rstest.workspace = true
|
rstest.workspace = true
|
||||||
|
|
||||||
[lints.rust]
|
[lints]
|
||||||
unsafe_code = "forbid"
|
workspace = true
|
||||||
|
|
||||||
[lints.clippy]
|
|
||||||
cargo = { level = "warn", priority = -1 }
|
|
||||||
pedantic = { level = "warn", priority = -1 }
|
|
||||||
cast_possible_truncation = "allow"
|
|
||||||
cast_possible_wrap = "allow"
|
|
||||||
cast_precision_loss = "allow"
|
|
||||||
cast_sign_loss = "allow"
|
|
||||||
missing_errors_doc = "allow"
|
|
||||||
missing_panics_doc = "allow"
|
|
||||||
module_name_repetitions = "allow"
|
|
||||||
must_use_candidate = "allow"
|
|
||||||
|
|
||||||
# we often split up a module into multiple files with the main type in a file named after the
|
|
||||||
# module, so we want to allow this pattern
|
|
||||||
module_inception = "allow"
|
|
||||||
|
|
||||||
# nursery or restricted
|
|
||||||
as_underscore = "warn"
|
|
||||||
deref_by_slicing = "warn"
|
|
||||||
else_if_without_else = "warn"
|
|
||||||
empty_line_after_doc_comments = "warn"
|
|
||||||
equatable_if_let = "warn"
|
|
||||||
fn_to_numeric_cast_any = "warn"
|
|
||||||
format_push_string = "warn"
|
|
||||||
map_err_ignore = "warn"
|
|
||||||
missing_const_for_fn = "warn"
|
|
||||||
mixed_read_write_in_expression = "warn"
|
|
||||||
mod_module_files = "warn"
|
|
||||||
needless_pass_by_ref_mut = "warn"
|
|
||||||
needless_raw_strings = "warn"
|
|
||||||
or_fun_call = "warn"
|
|
||||||
redundant_type_annotations = "warn"
|
|
||||||
rest_pat_in_fully_bound_structs = "warn"
|
|
||||||
string_lit_chars_any = "warn"
|
|
||||||
string_slice = "warn"
|
|
||||||
string_to_string = "warn"
|
|
||||||
unnecessary_self_imports = "warn"
|
|
||||||
use_self = "warn"
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "barchart"
|
|
||||||
doc-scrape-examples = true
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "block"
|
|
||||||
doc-scrape-examples = true
|
|
||||||
|
@ -131,47 +131,8 @@ tracing = "0.1.40"
|
|||||||
tracing-appender = "0.2.3"
|
tracing-appender = "0.2.3"
|
||||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
|
|
||||||
[lints.rust]
|
[lints]
|
||||||
unsafe_code = "forbid"
|
workspace = true
|
||||||
|
|
||||||
[lints.clippy]
|
|
||||||
cargo = { level = "warn", priority = -1 }
|
|
||||||
pedantic = { level = "warn", priority = -1 }
|
|
||||||
cast_possible_truncation = "allow"
|
|
||||||
cast_possible_wrap = "allow"
|
|
||||||
cast_precision_loss = "allow"
|
|
||||||
cast_sign_loss = "allow"
|
|
||||||
missing_errors_doc = "allow"
|
|
||||||
missing_panics_doc = "allow"
|
|
||||||
module_name_repetitions = "allow"
|
|
||||||
must_use_candidate = "allow"
|
|
||||||
|
|
||||||
# we often split up a module into multiple files with the main type in a file named after the
|
|
||||||
# module, so we want to allow this pattern
|
|
||||||
module_inception = "allow"
|
|
||||||
|
|
||||||
# nursery or restricted
|
|
||||||
as_underscore = "warn"
|
|
||||||
deref_by_slicing = "warn"
|
|
||||||
else_if_without_else = "warn"
|
|
||||||
empty_line_after_doc_comments = "warn"
|
|
||||||
equatable_if_let = "warn"
|
|
||||||
fn_to_numeric_cast_any = "warn"
|
|
||||||
format_push_string = "warn"
|
|
||||||
map_err_ignore = "warn"
|
|
||||||
missing_const_for_fn = "warn"
|
|
||||||
mixed_read_write_in_expression = "warn"
|
|
||||||
mod_module_files = "warn"
|
|
||||||
needless_pass_by_ref_mut = "warn"
|
|
||||||
needless_raw_strings = "warn"
|
|
||||||
or_fun_call = "warn"
|
|
||||||
redundant_type_annotations = "warn"
|
|
||||||
rest_pat_in_fully_bound_structs = "warn"
|
|
||||||
string_lit_chars_any = "warn"
|
|
||||||
string_slice = "warn"
|
|
||||||
string_to_string = "warn"
|
|
||||||
unnecessary_self_imports = "warn"
|
|
||||||
use_self = "warn"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user