Astyle options can be written in a default options file (see astyle -h), an option is to write options in ~/.astylerc file with the following content:
# 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 spacesconvert-tabs# Indentation is 2 spacesindent=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 blocksbreak-blocksdelete-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=200break-after-logicallineend=linux
The OAI Continuous Integration process will perform a check based on these astyle options when a merge/pull request is created.
Non-conformance to OAI formatting guidelines could result in the merge request being rejected at first.