Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
b8f6d254
Commit
b8f6d254
authored
Sep 26, 2018
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: proper notifications on the formatting rules
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
7d602d5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
ci-scripts/checkCodingFormattingRules.sh
ci-scripts/checkCodingFormattingRules.sh
+14
-1
ci-scripts/reportBuildLocally.sh
ci-scripts/reportBuildLocally.sh
+11
-3
No files found.
ci-scripts/checkCodingFormattingRules.sh
View file @
b8f6d254
...
...
@@ -120,21 +120,34 @@ echo "Source Branch is : $SOURCE_BRANCH"
echo
"Target Branch is :
$TARGET_BRANCH
"
echo
"Merged Commit is :
$MERGE_COMMMIT
"
echo
"Target Init is :
$TARGET_INIT_COMMIT
"
echo
""
echo
" ----------------------------------------------------------"
echo
""
# Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES
=
`
git log
$TARGET_INIT_COMMIT
..
$MERGE_COMMMIT
--oneline
--name-status
| egrep
"^M|^A"
|
sed
-e
"s@^M
\t
*@@"
-e
"s@^A
\t
*@@"
|
sort
|
uniq
`
NB_TO_FORMAT
=
0
if
[
-f
oai_rules_result_list.txt
]
then
rm
-f
oai_rules_result_list.txt
fi
for
FULLFILE
in
$MODIFIED_FILES
do
echo
$FULLFILE
filename
=
$(
basename
--
"
$FULLFILE
"
)
EXT
=
"
${
filename
##*.
}
"
if
[
$EXT
=
"c"
]
||
[
$EXT
=
"h"
]
||
[
$EXT
=
"cpp"
]
||
[
$EXT
=
"hpp"
]
then
TO_FORMAT
=
`
astyle
--dry-run
--options
=
ci-scripts/astyle-options.txt
$FULLFILE
|
grep
-c
Formatted
`
NB_TO_FORMAT
=
$((
NB_TO_FORMAT
+
TO_FORMAT
))
if
[
$TO_FORMAT
-ne
0
]
then
echo
$FULLFILE
echo
$FULLFILE
>>
./oai_rules_result_list.txt
fi
fi
done
echo
""
echo
" ----------------------------------------------------------"
echo
"Nb Files that do NOT follow OAI rules:
$NB_TO_FORMAT
"
echo
$NB_TO_FORMAT
>
./oai_rules_result.txt
...
...
ci-scripts/reportBuildLocally.sh
View file @
b8f6d254
...
...
@@ -260,7 +260,7 @@ function sca_summary_table_footer {
echo
" </tr>"
>>
./build_results.html
echo
" </table>"
>>
./build_results.html
echo
" <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>"
>>
./build_results.html
echo
" <p
>Graphical Interface tool : <code>cppcheck-gui -l cppcheck/cppcheck.xml</code>
</p>"
>>
./build_results.html
echo
" <p
style=
\"
margin-left: 30px
\"
>Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong>
</p>"
>>
./build_results.html
}
jb_checker
=
0
...
...
@@ -490,12 +490,20 @@ then
then
if
[
$PU_TRIG
-eq
1
]
;
then
echo
" <td bgcolor =
\"
green
\"
>All files in repository follow OAI rules. </td>"
>>
./build_results.html
;
fi
if
[
$MR_TRIG
-eq
1
]
;
then
echo
" <td bgcolor =
\"
green
\"
>All modified files in Merge-Request follow OAI rules.</td>"
>>
./build_results.html
;
fi
echo
" </tr>"
>>
./build_results.html
echo
" </table>"
>>
./build_results.html
else
if
[
$PU_TRIG
-eq
1
]
;
then
echo
" <td bgcolor =
\"
orange
\"
>
$NB_FILES
files in repository DO NOT follow OAI rules. </td>"
>>
./build_results.html
;
fi
if
[
$MR_TRIG
-eq
1
]
;
then
echo
" <td bgcolor =
\"
orange
\"
>
$NB_FILES
modified files in Merge-Request DO NOT follow OAI rules.</td>"
>>
./build_results.html
;
fi
fi
echo
" </tr>"
>>
./build_results.html
if
[
-f
./oai_rules_result_list.txt
]
then
awk
'{print " <tr><td></td><td>"$1"</td></tr>"}'
./oai_rules_result_list.txt
>>
./build_results.html
fi
echo
" </table>"
>>
./build_results.html
echo
" <p>Please apply the following command to this(ese) file(s): </p>"
>>
./build_results.html
echo
" <p style=
\"
margin-left: 30px
\"
><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>"
>>
./build_results.html
fi
fi
echo
" <h2>Ubuntu 16.04 LTS -- Summary</h2>"
>>
./build_results.html
...
...
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