Skip to content

Commit 72d6b39

Browse files
committed
move lints to toml and out of templates
1 parent f16e3e8 commit 72d6b39

File tree

7 files changed

+77
-435
lines changed

7 files changed

+77
-435
lines changed

Cargo.toml

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ edition = "2024"
1313
license = "MIT"
1414
repository = ""
1515

16-
[workspace.lints.rust]
17-
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
18-
1916
[workspace.dependencies]
2017
# API
2118
ash = "0.38"
@@ -35,3 +32,80 @@ raw-window-handle = "0.6.2"
3532
winit = "0.30.0"
3633
env_logger = "0.11.8"
3734
anyhow = "1.0.98"
35+
36+
37+
38+
[workspace.lints.rust]
39+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'], priority = 1 }
40+
# copied from rust-gpu
41+
future_incompatible = "warn"
42+
nonstandard_style = "warn"
43+
rust_2018_idioms = "warn"
44+
45+
[workspace.lints.clippy]
46+
# copied from rust-gpu
47+
all = { level = "warn", priority = -1 }
48+
await_holding_lock = "warn"
49+
char_lit_as_u8 = "warn"
50+
checked_conversions = "warn"
51+
dbg_macro = "warn"
52+
debug_assert_with_mut_call = "warn"
53+
doc_markdown = "warn"
54+
empty_enums = "warn"
55+
enum_glob_use = "warn"
56+
#exit = "warn"
57+
expl_impl_clone_on_copy = "warn"
58+
explicit_deref_methods = "warn"
59+
explicit_into_iter_loop = "warn"
60+
fallible_impl_from = "warn"
61+
filter_map_next = "warn"
62+
flat_map_option = "warn"
63+
float_cmp_const = "warn"
64+
fn_params_excessive_bools = "warn"
65+
from_iter_instead_of_collect = "warn"
66+
if_let_mutex = "warn"
67+
implicit_clone = "warn"
68+
imprecise_flops = "warn"
69+
inefficient_to_string = "warn"
70+
invalid_upcast_comparisons = "warn"
71+
large_digit_groups = "warn"
72+
large_stack_arrays = "warn"
73+
large_types_passed_by_value = "warn"
74+
let_unit_value = "warn"
75+
linkedlist = "warn"
76+
lossy_float_literal = "warn"
77+
macro_use_imports = "warn"
78+
manual_ok_or = "warn"
79+
map_err_ignore = "warn"
80+
map_flatten = "warn"
81+
map_unwrap_or = "warn"
82+
match_same_arms = "warn"
83+
match_wild_err_arm = "warn"
84+
match_wildcard_for_single_variants = "warn"
85+
mem_forget = "warn"
86+
missing_enforced_import_renames = "warn"
87+
mut_mut = "warn"
88+
mutex_integer = "warn"
89+
needless_borrow = "warn"
90+
needless_continue = "warn"
91+
needless_for_each = "warn"
92+
option_option = "warn"
93+
path_buf_push_overwrite = "warn"
94+
ptr_as_ptr = "warn"
95+
rc_mutex = "warn"
96+
ref_option_ref = "warn"
97+
rest_pat_in_fully_bound_structs = "warn"
98+
same_functions_in_if_condition = "warn"
99+
semicolon_if_nothing_returned = "warn"
100+
single_match_else = "warn"
101+
string_add_assign = "warn"
102+
string_add = "warn"
103+
string_lit_as_bytes = "warn"
104+
todo = "warn"
105+
trait_duplication_in_bounds = "warn"
106+
unimplemented = "warn"
107+
unnested_or_patterns = "warn"
108+
unused_self = "warn"
109+
useless_transmute = "warn"
110+
verbose_file_reads = "warn"
111+
zero_sized_map_values = "warn"
Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,2 @@
1-
// FIXME(eddyb) update/review these lints.
2-
//
3-
// BEGIN - Embark standard lints v0.4
4-
// do not change or add/remove here, but one can add exceptions after this section
5-
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6-
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7-
#![warn(
8-
clippy::all,
9-
clippy::await_holding_lock,
10-
clippy::char_lit_as_u8,
11-
clippy::checked_conversions,
12-
clippy::dbg_macro,
13-
clippy::debug_assert_with_mut_call,
14-
clippy::doc_markdown,
15-
clippy::empty_enum,
16-
clippy::enum_glob_use,
17-
clippy::exit,
18-
clippy::expl_impl_clone_on_copy,
19-
clippy::explicit_deref_methods,
20-
clippy::explicit_into_iter_loop,
21-
clippy::fallible_impl_from,
22-
clippy::filter_map_next,
23-
clippy::float_cmp_const,
24-
clippy::fn_params_excessive_bools,
25-
clippy::if_let_mutex,
26-
clippy::implicit_clone,
27-
clippy::imprecise_flops,
28-
clippy::inefficient_to_string,
29-
clippy::invalid_upcast_comparisons,
30-
clippy::large_types_passed_by_value,
31-
clippy::let_unit_value,
32-
clippy::linkedlist,
33-
clippy::lossy_float_literal,
34-
clippy::macro_use_imports,
35-
clippy::manual_ok_or,
36-
clippy::map_err_ignore,
37-
clippy::map_flatten,
38-
clippy::map_unwrap_or,
39-
clippy::match_same_arms,
40-
clippy::match_wildcard_for_single_variants,
41-
clippy::mem_forget,
42-
clippy::mut_mut,
43-
clippy::mutex_integer,
44-
clippy::needless_borrow,
45-
clippy::needless_continue,
46-
clippy::option_option,
47-
clippy::path_buf_push_overwrite,
48-
clippy::ptr_as_ptr,
49-
clippy::ref_option_ref,
50-
clippy::rest_pat_in_fully_bound_structs,
51-
clippy::same_functions_in_if_condition,
52-
clippy::semicolon_if_nothing_returned,
53-
clippy::string_add_assign,
54-
clippy::string_add,
55-
clippy::string_lit_as_bytes,
56-
clippy::string_to_string,
57-
clippy::todo,
58-
clippy::trait_duplication_in_bounds,
59-
clippy::unimplemented,
60-
clippy::unnested_or_patterns,
61-
clippy::unused_self,
62-
clippy::useless_transmute,
63-
clippy::verbose_file_reads,
64-
clippy::zero_sized_map_values,
65-
future_incompatible,
66-
nonstandard_style,
67-
rust_2018_idioms
68-
)]
69-
// END - Embark standard lints v0.4
70-
// crate-specific exceptions:
71-
// #![allow()]
72-
731
pub mod ash_renderer;
742
pub mod util;
Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,2 @@
1-
// FIXME(eddyb) update/review these lints.
2-
//
3-
// BEGIN - Embark standard lints v0.4
4-
// do not change or add/remove here, but one can add exceptions after this section
5-
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6-
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7-
#![warn(
8-
clippy::all,
9-
clippy::await_holding_lock,
10-
clippy::char_lit_as_u8,
11-
clippy::checked_conversions,
12-
clippy::dbg_macro,
13-
clippy::debug_assert_with_mut_call,
14-
clippy::doc_markdown,
15-
clippy::empty_enum,
16-
clippy::enum_glob_use,
17-
clippy::exit,
18-
clippy::expl_impl_clone_on_copy,
19-
clippy::explicit_deref_methods,
20-
clippy::explicit_into_iter_loop,
21-
clippy::fallible_impl_from,
22-
clippy::filter_map_next,
23-
clippy::float_cmp_const,
24-
clippy::fn_params_excessive_bools,
25-
clippy::if_let_mutex,
26-
clippy::implicit_clone,
27-
clippy::imprecise_flops,
28-
clippy::inefficient_to_string,
29-
clippy::invalid_upcast_comparisons,
30-
clippy::large_types_passed_by_value,
31-
clippy::let_unit_value,
32-
clippy::linkedlist,
33-
clippy::lossy_float_literal,
34-
clippy::macro_use_imports,
35-
clippy::manual_ok_or,
36-
clippy::map_err_ignore,
37-
clippy::map_flatten,
38-
clippy::map_unwrap_or,
39-
clippy::match_same_arms,
40-
clippy::match_wildcard_for_single_variants,
41-
clippy::mem_forget,
42-
clippy::mut_mut,
43-
clippy::mutex_integer,
44-
clippy::needless_borrow,
45-
clippy::needless_continue,
46-
clippy::option_option,
47-
clippy::path_buf_push_overwrite,
48-
clippy::ptr_as_ptr,
49-
clippy::ref_option_ref,
50-
clippy::rest_pat_in_fully_bound_structs,
51-
clippy::same_functions_in_if_condition,
52-
clippy::semicolon_if_nothing_returned,
53-
clippy::string_add_assign,
54-
clippy::string_add,
55-
clippy::string_lit_as_bytes,
56-
clippy::string_to_string,
57-
clippy::todo,
58-
clippy::trait_duplication_in_bounds,
59-
clippy::unimplemented,
60-
clippy::unnested_or_patterns,
61-
clippy::unused_self,
62-
clippy::useless_transmute,
63-
clippy::verbose_file_reads,
64-
clippy::zero_sized_map_values,
65-
future_incompatible,
66-
nonstandard_style,
67-
rust_2018_idioms
68-
)]
69-
// END - Embark standard lints v0.4
70-
// crate-specific exceptions:
71-
// #![allow()]
72-
731
pub mod ash_renderer;
742
pub mod util;
Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,2 @@
1-
// FIXME(eddyb) update/review these lints.
2-
//
3-
// BEGIN - Embark standard lints v0.4
4-
// do not change or add/remove here, but one can add exceptions after this section
5-
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6-
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7-
#![warn(
8-
clippy::all,
9-
clippy::await_holding_lock,
10-
clippy::char_lit_as_u8,
11-
clippy::checked_conversions,
12-
clippy::dbg_macro,
13-
clippy::debug_assert_with_mut_call,
14-
clippy::doc_markdown,
15-
clippy::empty_enum,
16-
clippy::enum_glob_use,
17-
clippy::exit,
18-
clippy::expl_impl_clone_on_copy,
19-
clippy::explicit_deref_methods,
20-
clippy::explicit_into_iter_loop,
21-
clippy::fallible_impl_from,
22-
clippy::filter_map_next,
23-
clippy::float_cmp_const,
24-
clippy::fn_params_excessive_bools,
25-
clippy::if_let_mutex,
26-
clippy::implicit_clone,
27-
clippy::imprecise_flops,
28-
clippy::inefficient_to_string,
29-
clippy::invalid_upcast_comparisons,
30-
clippy::large_types_passed_by_value,
31-
clippy::let_unit_value,
32-
clippy::linkedlist,
33-
clippy::lossy_float_literal,
34-
clippy::macro_use_imports,
35-
clippy::manual_ok_or,
36-
clippy::map_err_ignore,
37-
clippy::map_flatten,
38-
clippy::map_unwrap_or,
39-
clippy::match_same_arms,
40-
clippy::match_wildcard_for_single_variants,
41-
clippy::mem_forget,
42-
clippy::mut_mut,
43-
clippy::mutex_integer,
44-
clippy::needless_borrow,
45-
clippy::needless_continue,
46-
clippy::option_option,
47-
clippy::path_buf_push_overwrite,
48-
clippy::ptr_as_ptr,
49-
clippy::ref_option_ref,
50-
clippy::rest_pat_in_fully_bound_structs,
51-
clippy::same_functions_in_if_condition,
52-
clippy::semicolon_if_nothing_returned,
53-
clippy::string_add_assign,
54-
clippy::string_add,
55-
clippy::string_lit_as_bytes,
56-
clippy::string_to_string,
57-
clippy::todo,
58-
clippy::trait_duplication_in_bounds,
59-
clippy::unimplemented,
60-
clippy::unnested_or_patterns,
61-
clippy::unused_self,
62-
clippy::useless_transmute,
63-
clippy::verbose_file_reads,
64-
clippy::zero_sized_map_values,
65-
future_incompatible,
66-
nonstandard_style,
67-
rust_2018_idioms
68-
)]
69-
// END - Embark standard lints v0.4
70-
// crate-specific exceptions:
71-
// #![allow()]
72-
731
pub mod util;
742
pub mod wgpu_renderer;
Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,2 @@
1-
// FIXME(eddyb) update/review these lints.
2-
//
3-
// BEGIN - Embark standard lints v0.4
4-
// do not change or add/remove here, but one can add exceptions after this section
5-
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
6-
//#![deny(unsafe_code)] // impractical in this crate dealing with unsafe `ash`
7-
#![warn(
8-
clippy::all,
9-
clippy::await_holding_lock,
10-
clippy::char_lit_as_u8,
11-
clippy::checked_conversions,
12-
clippy::dbg_macro,
13-
clippy::debug_assert_with_mut_call,
14-
clippy::doc_markdown,
15-
clippy::empty_enum,
16-
clippy::enum_glob_use,
17-
clippy::exit,
18-
clippy::expl_impl_clone_on_copy,
19-
clippy::explicit_deref_methods,
20-
clippy::explicit_into_iter_loop,
21-
clippy::fallible_impl_from,
22-
clippy::filter_map_next,
23-
clippy::float_cmp_const,
24-
clippy::fn_params_excessive_bools,
25-
clippy::if_let_mutex,
26-
clippy::implicit_clone,
27-
clippy::imprecise_flops,
28-
clippy::inefficient_to_string,
29-
clippy::invalid_upcast_comparisons,
30-
clippy::large_types_passed_by_value,
31-
clippy::let_unit_value,
32-
clippy::linkedlist,
33-
clippy::lossy_float_literal,
34-
clippy::macro_use_imports,
35-
clippy::manual_ok_or,
36-
clippy::map_err_ignore,
37-
clippy::map_flatten,
38-
clippy::map_unwrap_or,
39-
clippy::match_same_arms,
40-
clippy::match_wildcard_for_single_variants,
41-
clippy::mem_forget,
42-
clippy::mut_mut,
43-
clippy::mutex_integer,
44-
clippy::needless_borrow,
45-
clippy::needless_continue,
46-
clippy::option_option,
47-
clippy::path_buf_push_overwrite,
48-
clippy::ptr_as_ptr,
49-
clippy::ref_option_ref,
50-
clippy::rest_pat_in_fully_bound_structs,
51-
clippy::same_functions_in_if_condition,
52-
clippy::semicolon_if_nothing_returned,
53-
clippy::string_add_assign,
54-
clippy::string_add,
55-
clippy::string_lit_as_bytes,
56-
clippy::string_to_string,
57-
clippy::todo,
58-
clippy::trait_duplication_in_bounds,
59-
clippy::unimplemented,
60-
clippy::unnested_or_patterns,
61-
clippy::unused_self,
62-
clippy::useless_transmute,
63-
clippy::verbose_file_reads,
64-
clippy::zero_sized_map_values,
65-
future_incompatible,
66-
nonstandard_style,
67-
rust_2018_idioms
68-
)]
69-
// END - Embark standard lints v0.4
70-
// crate-specific exceptions:
71-
// #![allow()]
72-
731
pub mod util;
742
pub mod wgpu_renderer;

0 commit comments

Comments
 (0)