Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
33ce4e80
authored
Oct 21, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts: added return code in run_cpplint
parent
0d048299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
scripts/run_cpplint.sh
+13
-6
No files found.
scripts/run_cpplint.sh
View file @
33ce4e80
...
@@ -75,6 +75,8 @@ PARENTHESIS_RULE=",-whitespace/parens"
...
@@ -75,6 +75,8 @@ PARENTHESIS_RULE=",-whitespace/parens"
C_CAST_RULE
=
",-readability/casting"
C_CAST_RULE
=
",-readability/casting"
LONG_LINES_RULE
=
",-whitespace/line_length"
LONG_LINES_RULE
=
",-whitespace/line_length"
retval
=
true
##Excluded files
##Excluded files
RAND_FILES
=(
embb_mtapi_test_group.cc embb_mtapi_test_queue.cc embb_mtapi_test_task.cc queue_test-inl.h
)
RAND_FILES
=(
embb_mtapi_test_group.cc embb_mtapi_test_queue.cc embb_mtapi_test_task.cc queue_test-inl.h
)
for
project
in
base_c mtapi_c base_cpp mtapi_cpp algorithms_cpp containers_cpp dataflow_cpp
for
project
in
base_c mtapi_c base_cpp mtapi_cpp algorithms_cpp containers_cpp dataflow_cpp
...
@@ -90,7 +92,7 @@ do
...
@@ -90,7 +92,7 @@ do
do
do
echo
"--> Run cpplint on file
$file
"
echo
"--> Run cpplint on file
$file
"
current_rules
=
$EXCLUDED_RULES
current_rules
=
$EXCLUDED_RULES
if
[[
$file
=
~
\.
h
$
]]
;
then
if
[[
$file
=
~
\.
h
$
]]
;
then
current_rules+
=
$PARENTHESIS_RULE
current_rules+
=
$PARENTHESIS_RULE
fi
fi
if
[[
$file
=
~
\.
c
$
]]
||
[[
$file
=
~
\m
tapi.h
$
]]
;
then
if
[[
$file
=
~
\.
c
$
]]
||
[[
$file
=
~
\m
tapi.h
$
]]
;
then
...
@@ -101,23 +103,28 @@ do
...
@@ -101,23 +103,28 @@ do
fi
fi
############
############
#Per file exclusion rules
#Per file exclusion rules
if
[[
$file
==
*
generate_atomic_implementation_template.h
]]
;
then
if
[[
$file
==
*
generate_atomic_implementation_template.h
]]
;
then
current_rules+
=
",-build/header_guard"
# This file needs to be included multiple times
current_rules+
=
",-build/header_guard"
# This file needs to be included multiple times
fi
fi
if
[[
$file
==
*
atomic.h
]]
;
then
if
[[
$file
==
*
atomic.h
]]
;
then
current_rules+
=
",-whitespace/indent"
# indention is misinterpreted for this file
current_rules+
=
",-whitespace/indent"
# indention is misinterpreted for this file
fi
fi
if
[[
$file
==
*
atomic_arithmetic.h
]]
;
then
if
[[
$file
==
*
atomic_arithmetic.h
]]
;
then
current_rules+
=
",-readability/function"
# All parameters should be named in a function
current_rules+
=
",-readability/function"
# All parameters should be named in a function
fi
fi
if
[[
$file
==
*
object_pool-inl.h
]]
;
then
if
[[
$file
==
*
object_pool-inl.h
]]
;
then
current_rules+
=
",-readability/function"
# All parameters should be named in a function (triggers error with clang if named...)
current_rules+
=
",-readability/function"
# All parameters should be named in a function (triggers error with clang if named...)
fi
fi
for
filename
in
"
${
RAND_FILES
[@]
}
"
;
do
for
filename
in
"
${
RAND_FILES
[@]
}
"
;
do
if
[[
$file
=
~
$filename
]]
;
then
if
[[
$file
=
~
$filename
]]
;
then
current_rules+
=
",-runtime/threadsafe_fn"
# These tests are allowed to use the thread unsafe rand()
current_rules+
=
",-runtime/threadsafe_fn"
# These tests are allowed to use the thread unsafe rand()
fi
fi
done
done
python
${
c
}
--filter
=
$current_rules
--root
=
"
$project
/include"
--output
=
vs7
$file
python
${
c
}
--filter
=
$current_rules
--root
=
"
$project
/include"
--output
=
vs7
$file
if
[
$?
!=
$0
]
;
then
retval
=
false
fi
done
done
done
done
$retval
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