More style fixes.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12805 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-05-18 11:05:25 +00:00
parent a4a4057dd9
commit 3ecd2ae222
6 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,5 @@
#!/bin/bash #!/bin/bash
find ../../os/nil -name "*.[ch]" -exec perl stylecheck.pl "{}" \; find ../../os/nil -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/oslib -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/license -name "*.[ch]" -exec perl stylecheck.pl "{}" \;

View File

@ -1,3 +1,5 @@
#!/bin/bash #!/bin/bash
find ../../os/rt -name "*.[ch]" -exec perl stylecheck.pl "{}" \; find ../../os/rt -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/oslib -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/license -name "*.[ch]" -exec perl stylecheck.pl "{}" \;

View File

@ -167,6 +167,21 @@ foreach my $line (@c_source) {
style "detected glued right brace"; style "detected glued right brace";
} }
#****************************************************************************
# Check on (some) operators.
if ($line =~ /\S!=/) {
style "detected glued != operator";
}
if ($line =~ /!=\S/) {
style "detected glued != operator";
}
if ($line =~ /\S==/) {
style "detected glued == operator";
}
if ($line =~ /!==S/) {
style "detected glued == operator";
}
#**************************************************************************** #****************************************************************************
# Check function-call-like returns (not perfect so disabled). # Check function-call-like returns (not perfect so disabled).
if ($line =~ /return\s*\(/) { if ($line =~ /return\s*\(/) {