Skip to content

Commit 31693b7

Browse files
committed
style: Enforce order of any s_*! macro call
Before this change, only the order of `s!` was checked. After, it also checks `s_no_extra_traits!` and `s_paren!`. Only the order is checked, not the number of calls. This is required because multiple calls have to be allowed.
1 parent 7d615f0 commit 31693b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/style.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
142142
} else if line.starts_with("s! {") {
143143
s_macros += 1;
144144
State::Structs
145+
} else if line.starts_with("s_no_extra_traits! {") {
146+
// multiple macros of this type are allowed
147+
State::Structs
148+
} else if line.starts_with("s_paren! {") {
149+
// multiple macros of this type are allowed
150+
State::Structs
145151
} else if line.starts_with("f! {") {
146152
f_macros += 1;
147153
State::FunctionDefinitions

0 commit comments

Comments
 (0)