Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ChimeraTK Mirror
ApplicationCore
Commits
565b549d
Commit
565b549d
authored
2 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'project-template/master' into update-project-template
parents
daa3094d
d35adb88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.clang-format
+5
-0
5 additions, 0 deletions
.clang-format
cmake/check-coding-style.sh
+9
-3
9 additions, 3 deletions
cmake/check-coding-style.sh
cmake/enable_code_style_check.cmake
+1
-1
1 addition, 1 deletion
cmake/enable_code_style_check.cmake
with
15 additions
and
4 deletions
.clang-format
+
5
−
0
View file @
565b549d
#
# ChimeraTK clang-format definition.
#
# Use with clang-format-14. Please refer to https://apt.llvm.org/ for installation instructions on older Ubuntu versions.
#
---
BasedOnStyle: LLVM
AccessModifierOffset: '-1'
...
...
This diff is collapsed.
Click to expand it.
cmake/check-coding-style.sh
+
9
−
3
View file @
565b549d
...
...
@@ -4,9 +4,15 @@ ERRFILE=`mktemp`
export
ERRFILE
echo
0
>
"
${
ERRFILE
}
"
# This is necessary to get the two paths to match up, since we get a full path from cmake
mypath
=
$(
pwd
)
mypath
=
$(
realpath
$mypath
)
exclude_path
=
${
1
:-
justignoreme
}
exclude_pattern
=
"
$exclude_path
/*"
# check clang-format formatting
if
which clang-format-14
>
/dev/null
;
then
find
\(
-name
*
.cc
-o
-name
*
.cpp
-o
-name
*
.h
\)
-exec
clang-format-14
--output-replacements-xml
\{\}
\;
|
grep
"^<replacement "
>
/dev/null
find
$mypath
\(
-name
*
.cc
-o
-name
*
.cpp
-o
-name
*
.h
\)
-not
-path
"
$exclude_pattern
"
-exec
clang-format-14
--output-replacements-xml
\{\}
\;
|
grep
"^<replacement "
>
/dev/null
if
[
$?
-ne
1
]
;
then
echo
1
>
"
${
ERRFILE
}
"
echo
"Code formatting incorrect!"
...
...
@@ -30,7 +36,7 @@ checkCopyrightComment() {
fi
}
export
-f
checkCopyrightComment
find
\(
-name
*
.cc
-o
-name
*
.cpp
-o
-name
*
.h
\)
-exec
bash
-c
'checkCopyrightComment {}'
\;
find
$mypath
\(
-name
*
.cc
-o
-name
*
.cpp
-o
-name
*
.h
\)
-not
-path
"
$exclude_pattern
"
-exec
bash
-c
'checkCopyrightComment {}'
\;
# check all header files for "#pragma once" in 3rd line
checkPramgaOnce
()
{
...
...
@@ -40,7 +46,7 @@ checkPramgaOnce() {
fi
}
export
-f
checkPramgaOnce
find
-name
*
.h
-exec
bash
-c
'checkPramgaOnce {}'
\;
find
$mypath
-name
*
.h
-not
-path
"
$exclude_pattern
"
-exec
bash
-c
'checkPramgaOnce {}'
\;
ERROR
=
`
cat
"
${
ERRFILE
}
"
`
rm
-f
"
${
ERRFILE
}
"
...
...
This diff is collapsed.
Click to expand it.
cmake/enable_code_style_check.cmake
+
1
−
1
View file @
565b549d
...
...
@@ -18,5 +18,5 @@
#######################################################################################################################
enable_testing
()
add_test
(
NAME coding_style COMMAND
${
CMAKE_SOURCE_DIR
}
/cmake/check-coding-style.sh
add_test
(
NAME coding_style COMMAND
${
CMAKE_SOURCE_DIR
}
/cmake/check-coding-style.sh
${
CMAKE_BINARY_DIR
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
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