Skip to content

Commit 57dce1b

Browse files
committedFeb 16, 2024
Import Geant4 11.2.1 source tree
1 parent 860a2b9 commit 57dce1b

File tree

331 files changed

+41997
-44239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+41997
-44239
lines changed
 

‎.clang-format

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# requires clang-format version 13.0+
2+
---
3+
AlignAfterOpenBracket: Align
4+
# Instead ContinuationIndentWidth is used
5+
AlignConsecutiveAssignments: false
6+
AlignConsecutiveDeclarations: false
7+
# Aligns \ symbols on the left; other options DontAlign, Left
8+
AlignEscapedNewlines: Left
9+
AlignOperands: Align
10+
AlignTrailingComments: false
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
# When declaring a function, parameters continue on the same line
13+
AllowShortBlocksOnASingleLine: Empty
14+
AllowShortCaseLabelsOnASingleLine: false
15+
AllowShortFunctionsOnASingleLine: Inline
16+
# while (true) {} allowed
17+
# if (a) return; is allowed
18+
AllowShortIfStatementsOnASingleLine: WithoutElse
19+
AllowShortLambdasOnASingleLine: Inline
20+
AllowShortLoopsOnASingleLine: false
21+
AlwaysBreakAfterDefinitionReturnType: None
22+
AlwaysBreakAfterReturnType: None
23+
AlwaysBreakBeforeMultilineStrings: true
24+
AlwaysBreakTemplateDeclarations: Yes
25+
BinPackArguments: true
26+
BinPackParameters: true
27+
BraceWrapping:
28+
AfterClass: true
29+
AfterControlStatement: MultiLine
30+
AfterEnum: true
31+
AfterFunction: true
32+
AfterNamespace: true
33+
AfterStruct: true
34+
AfterUnion: true
35+
AfterExternBlock: true
36+
BeforeCatch: true
37+
BeforeElse: true
38+
IndentBraces: false
39+
SplitEmptyFunction: false
40+
SplitEmptyRecord: false
41+
SplitEmptyNamespace: false
42+
BreakBeforeBraces: Custom
43+
BreakBeforeBinaryOperators: NonAssignment
44+
BreakBeforeTernaryOperators: true
45+
BreakInheritanceList: BeforeColon
46+
BreakConstructorInitializers: BeforeColon
47+
BreakStringLiterals: true
48+
ColumnLimit: 100
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 2
52+
ContinuationIndentWidth: 2
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
FixNamespaceComments: true
56+
IncludeBlocks: Regroup
57+
# Priority is:
58+
# 1. Geant4 headers in ""
59+
# 1. Geant4 headers in "" that don't start with 'G4'
60+
# 2. External package headers with extension in "" or <> (but _should_ be <>)
61+
# 3. System headers (not exhaustive)
62+
# Note order of regexes is important as they are matched in order
63+
IncludeCategories:
64+
- Regex: '^"G4.*\.hh"'
65+
Priority: 1
66+
- Regex: '^"(Randomize|globals)\.hh"'
67+
Priority: 1
68+
- Regex: '^"[[:alnum:]\/\-_.]+"'
69+
Priority: 2
70+
- Regex: '^<[a-z_]+>'
71+
Priority: 3
72+
- Regex: '^<[[:alnum:]\/.]+>'
73+
Priority: 2
74+
# Provides an extra indent level for public/protected/private sections
75+
# without requiring excess indention and use of AccessModifierOffset
76+
IndentAccessModifiers: true
77+
IndentCaseLabels: true
78+
IndentPPDirectives: AfterHash
79+
IndentWidth: 2
80+
KeepEmptyLinesAtTheStartOfBlocks: false
81+
Language: Cpp
82+
MaxEmptyLinesToKeep: 1
83+
NamespaceIndentation: None
84+
PointerAlignment: Left
85+
ReflowComments: true
86+
SortIncludes: true
87+
SortUsingDeclarations: true
88+
SpaceAfterCStyleCast: false
89+
SpaceAfterLogicalNot: false
90+
SpaceAfterTemplateKeyword: false
91+
SpaceBeforeAssignmentOperators: true
92+
SpaceBeforeCpp11BracedList: false
93+
SpaceBeforeCtorInitializerColon: true
94+
SpaceBeforeInheritanceColon: true
95+
SpaceBeforeParens: ControlStatements
96+
SpaceBeforeRangeBasedForLoopColon: true
97+
SpaceInEmptyBlock: false
98+
SpaceInEmptyParentheses: false
99+
SpacesBeforeTrailingComments: 2
100+
SpacesInAngles: false
101+
SpacesInConditionalStatement: false
102+
SpacesInContainerLiterals: true
103+
SpacesInParentheses: false
104+
SpacesInSquareBrackets: false
105+
Standard: Cpp11
106+
TabWidth: 2
107+
UseTab: Never
108+
...

‎.clang-tidy

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
# Minimal set of checks for Geant4
3+
# - See CODING_GUIDELINES.rst for guidelines and instructions for use
4+
# - Full list at https://clang.llvm.org/extra/clang-tidy/checks/list.html
5+
Checks: "-*, \
6+
modernize-deprecated-headers, \
7+
modernize-make-shared, \
8+
modernize-make-unique, \
9+
modernize-redundant-void-arg, \
10+
modernize-use-auto, \
11+
modernize-use-equals-default, \
12+
modernize-use-nullptr, \
13+
modernize-use-override, \
14+
modernize-use-using, \
15+
performance-faster-string-find, \
16+
performance-for-range-copy, \
17+
performance-inefficient-string-concatenation, \
18+
performance-trivially-destructible, \
19+
readability-delete-null-pointer, \
20+
readability-duplicate-include, \
21+
readability-string-compare"
22+
WarningsAsErrors: ''
23+
HeaderFilterRegex: ''
24+
AnalyzeTemporaryDtors: false
25+
FormatStyle: file
26+
CheckOptions:
27+
- key: modernize-use-auto.RemoveStars
28+
value: 'true'
29+
- key: performance-faster-string-find.StringLikeClasses
30+
value: 'G4String;::std::basic_string;::std::basic_string_view'
31+
...

0 commit comments

Comments
 (0)