Skip to content

Commit

Permalink
Enforce order of any s_*! macro call
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flba-eb committed Oct 28, 2022
1 parent 7d615f0 commit 011dd1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ci/style.rs
Expand Up @@ -142,6 +142,12 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
} else if line.starts_with("s! {") {
s_macros += 1;
State::Structs
} else if line.starts_with("s_no_extra_traits! {") {
// multiple macros of this type are allowed
State::Structs
} else if line.starts_with("s_paren! {") {
// multiple macros of this type are allowed
State::Structs
} else if line.starts_with("f! {") {
f_macros += 1;
State::FunctionDefinitions
Expand Down

0 comments on commit 011dd1a

Please sign in to comment.