Skip to content
Snippets Groups Projects
Commit 810c0880 authored by Dinyar Rabady's avatar Dinyar Rabady
Browse files

Add instructions on how to format code

[skip ci]
parent a9a1ebd9
No related branches found
No related tags found
No related merge requests found
Pipeline #5176731 skipped
...@@ -4,7 +4,7 @@ check_formatting: ...@@ -4,7 +4,7 @@ check_formatting:
stage: check stage: check
image: gitlab-registry.cern.ch/scouting-demonstrator/scouting-docker-images/scouting-devtools:1.0.0 image: gitlab-registry.cern.ch/scouting-demonstrator/scouting-docker-images/scouting-devtools:1.0.0
script: script:
- find src/ -iname '*.h' -o -iname '*.cc' | xargs clang-format --style=file --dry-run -Werror - find src/ -iname '*.h' -o -iname '*.cc' | xargs clang-format --style=file --dry-run -Werror || printf "Please reformat your code using the command\ngit clang-format\n\nafter staging your files with \`git add\` or\n\nclang-format -i [your files]\n"
build_rpm_tag: build_rpm_tag:
stage: build stage: build
......
# SCDAQ # SCDAQ
Rudimentary data taking application for the CMS L1 scouting demonstrator Rudimentary data taking application for the CMS L1 scouting demonstrator
An RPM is built automatically by the CI pipeline and is stored as artifact of the build stage. **Important:** Once installed, the SCDAQ config file needs to be modified as described in the section below. An RPM is built automatically by the CI pipeline and is stored as artifact of the "build" stage. **Important:** Once installed, the SCDAQ config file needs to be modified as described in the section below.
The RPM installs a systemd service that can be started with The RPM installs a systemd service that can be started with
...@@ -15,6 +15,16 @@ if SCDAQ should be automatically started at boot it can be enabled with ...@@ -15,6 +15,16 @@ if SCDAQ should be automatically started at boot it can be enabled with
$ sudo systemctl enable runSCdaq $ sudo systemctl enable runSCdaq
``` ```
## Developing
We try to adhere to the [Google C++ style guide](https://google.github.io/styleguide/cppguide.html).
### Code formatting
The C++ code needs to follow the directives set forth in the `.clang-format` file placed in the repository root. This is enforced by the "check" stage of the CI.
You can format your code either with `clang-format -i [modified file]`, or (in particular for multiple changed files) with `git clang-format` after you have staged the modified files.
## Manual operation ## Manual operation
### Build manually ### Build manually
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment