summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorFlorian Bartels <Florian.Bartels@elektrobit.com>2022-10-28 10:13:08 +0200
committerFlorian Bartels <Florian.Bartels@elektrobit.com>2022-10-28 10:18:13 +0200
commit31693b7e8704f9a9f289eda7d5da82acc538f3d7 (patch)
treeed8b534a386193c219b0d8b21b2cd83a20b55936 /ci
parent7d615f03bcd82eda71944fd2b8dd14c23a568614 (diff)
downloadrust-libc-31693b7e8704f9a9f289eda7d5da82acc538f3d7.tar.gz
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.
Diffstat (limited to 'ci')
-rw-r--r--ci/style.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/style.rs b/ci/style.rs
index 07b2a754bc..31adeae4fb 100644
--- a/ci/style.rs
+++ b/ci/style.rs
@@ -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