Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bin He
openairinterface5G
Commits
b8f6d254
Commit
b8f6d254
authored
6 years ago
by
Raphael Defosseux
Browse files
Options
Downloads
Patches
Plain Diff
CI: proper notifications on the formatting rules
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
7d602d5c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci-scripts/checkCodingFormattingRules.sh
+14
-1
14 additions, 1 deletion
ci-scripts/checkCodingFormattingRules.sh
ci-scripts/reportBuildLocally.sh
+11
-3
11 additions, 3 deletions
ci-scripts/reportBuildLocally.sh
with
25 additions
and
4 deletions
ci-scripts/checkCodingFormattingRules.sh
+
14
−
1
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
...
...
This diff is collapsed.
Click to expand it.
ci-scripts/reportBuildLocally.sh
+
11
−
3
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
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
echo
" </tr>"
>>
./build_results.html
echo
" </table>"
>>
./build_results.html
fi
echo
" <h2>Ubuntu 16.04 LTS -- Summary</h2>"
>>
./build_results.html
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment