Commit 004a48c9 authored by Raphael Defosseux's avatar Raphael Defosseux 🌴

Adding astyle formatting options/check

Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 223d6b0f
Pipeline #8803 passed with stage
in 0 seconds
......@@ -28,6 +28,7 @@ pipeline {
// Doing it manually --> it may have merge conflicts
sh "git merge --ff origin/${env.gitlabTargetBranch}"
sh "git log -n1"
sh "./scripts/checkCodingFormattingRules.sh"
}
}
}
......
# OAI is using a style that is similar to the Google style
--style=google
# long options can be written without the preceding '--'
# Convert tabs to spaces
convert-tabs
# Indentation is 2 spaces
indent=spaces=2
# Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block.
indent-switches
# Indent C++ comments beginning in column one.
indent-col1-comments
# Pad empty lines around header blocks
break-blocks
delete-empty-lines
# Attach a pointer or reference operator (*, &, or ^) to the variable name (right)
align-pointer=name
# The code line length is 200 characters/columns
max-code-length=200
break-after-logical
lineend=linux
#!/bin/bash
NB_FILES_TO_FORMAT=`astyle --dry-run --options=scripts/astyle-options.txt src/*.* | grep -c Formatted `
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment