Skip to content

Commit

Permalink
Merge pull request #39 from sdroege/master
Browse files Browse the repository at this point in the history
check_init_asserts: Skip over autogenerated code if there is none
  • Loading branch information
GuillaumeGomez authored Oct 27, 2023
2 parents 5d10c47 + d2d8d0c commit e30a558
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion check_init_asserts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh

FILES="$1/src/*.rs"
if test -d $1/src/auto; then
FILES="$FILES $1/src/auto/*.rs"
fi

perl -0777 -ne '
BEGIN { $e = 0 }
while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) {
Expand All @@ -16,4 +21,4 @@ while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) {
$e = 1
}
}
END { exit $e }' $1/src/*.rs $1/src/auto/*.rs
END { exit $e }' $FILES

0 comments on commit e30a558

Please sign in to comment.