Add astyle configuration for code formating

This commit is contained in:
Manolis Surligas 2019-09-12 02:28:51 +03:00
parent 7b7fb82adc
commit a5caed2ca9
2 changed files with 27 additions and 0 deletions

17
.astylerc Normal file
View File

@ -0,0 +1,17 @@
# gr-satnogs astyle parameters
--errors-to-stdout
--lineend=linux
--preserve-date
--suffix=none
--style=stroustrup
--convert-tabs
--indent=spaces=2
--align-pointer=name
--align-reference=name
--pad-header
--add-braces
--unpad-paren
--pad-oper
--pad-comma
--convert-tabs

View File

@ -1,10 +1,20 @@
variables:
GITLAB_CI_IMAGE_DEBIAN: 'debian:buster'
stages:
- style
- test
- build
- deploy
style:
stage: style
before_script:
- apt-get update -qq && apt-get install -y -qq astyle git
script:
- test $(astyle --dry-run --project --formatted lib/*.cc | wc -l) -ne 0 && exit 1
- test $(astyle --dry-run --project --formatted lib/*.h | wc -l) -ne 0 && exit 1
- test $(astyle --dry-run --project --formatted include/satnogs/*.h | wc -l) -ne 0 && exit 1
test:
stage: test
before_script: