Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
dbc4bf68
Commit
dbc4bf68
authored
Aug 28, 2016
by
Jason Rhinelander
Browse files
check-style: also report no space in if(/for(/while(
parent
540ae61d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
tools/check-style.sh
tools/check-style.sh
+18
-4
No files found.
tools/check-style.sh
View file @
dbc4bf68
...
@@ -6,14 +6,28 @@
...
@@ -6,14 +6,28 @@
# Invoke as: tools/check-style.sh
# Invoke as: tools/check-style.sh
#
#
found
=
0
errors
=
0
for
f
in
`
grep
$'
\t
'
include/ tests/ docs/
*
.rst
-rl
`
;
do
IFS
=
$'
\n
'
if
[
"
$found
"
-eq
0
]
;
then
found
=
grep
$'
\t
'
include/ tests/ docs/
*
.rst
-rl
|
while
read
f
;
do
if
[
-z
"
$found
"
]
;
then
echo
-e
'\e[31m\e[01mError: found tabs instead of spaces in the following files:\e[0m'
echo
-e
'\e[31m\e[01mError: found tabs instead of spaces in the following files:\e[0m'
found
=
1
found
=
1
errors
=
1
fi
fi
echo
"
$f
"
echo
"
$f
"
done
done
exit
$found
found
=
grep
'\<\(if\|for\|while\)('
include/ tests/
*
-r
--color
=
always |
while
read
line
;
do
if
[
-z
"
$found
"
]
;
then
echo
-e
'\e[31m\e[01mError: found the following coding style problems:\e[0m'
found
=
1
errors
=
1
fi
echo
"
$line
"
done
exit
$errors
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment