Skip to content

Commit 7b9945b

Browse files
committed
ModernSharedLibTemplate
0 parents  commit 7b9945b

34 files changed

+2299
-0
lines changed

.clang-format

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
2+
---
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: None
6+
AlignConsecutiveDeclarations: None
7+
AlignEscapedNewlines: Right
8+
AlignOperands: true
9+
AlignTrailingComments: false
10+
AllowAllParametersOfDeclarationOnNextLine: true
11+
AllowShortBlocksOnASingleLine: Never
12+
AllowShortCaseLabelsOnASingleLine: true
13+
AllowShortLambdasOnASingleLine: All
14+
AllowShortEnumsOnASingleLine: true
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortIfStatementsOnASingleLine: false
17+
AllowShortLoopsOnASingleLine: true
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: false
21+
AlwaysBreakTemplateDeclarations: Yes
22+
BasedOnStyle: LLVM
23+
BinPackArguments: true
24+
BinPackParameters: true
25+
BraceWrapping:
26+
AfterCaseLabel: false
27+
AfterClass: true
28+
AfterControlStatement: true
29+
AfterEnum: false
30+
AfterFunction: false
31+
AfterNamespace: false
32+
AfterObjCDeclaration: false
33+
AfterStruct: false
34+
AfterUnion: false
35+
AfterExternBlock: true
36+
BeforeCatch: true
37+
BeforeElse: true
38+
IndentBraces: false
39+
SplitEmptyFunction: true
40+
SplitEmptyRecord: true
41+
SplitEmptyNamespace: true
42+
BeforeLambdaBody: false
43+
BeforeWhile: false
44+
BreakBeforeBinaryOperators: None
45+
BreakBeforeBraces: Custom
46+
BreakBeforeInheritanceComma: false
47+
BreakBeforeConceptDeclarations: true
48+
BreakBeforeTernaryOperators: true
49+
BreakConstructorInitializers: BeforeComma
50+
BreakAfterJavaFieldAnnotations: false
51+
BreakStringLiterals: true
52+
ColumnLimit: 180
53+
CommentPragmas: '(^ !)|(^ TODO)'
54+
CompactNamespaces: false
55+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
56+
ConstructorInitializerIndentWidth : 2
57+
ContinuationIndentWidth: 2
58+
Cpp11BracedListStyle: true
59+
DeriveLineEnding: false
60+
DerivePointerAlignment: false
61+
EmptyLineBeforeAccessModifier: Leave
62+
ExperimentalAutoDetectBinPacking: false
63+
FixNamespaceComments: true
64+
ForEachMacros:
65+
- foreach
66+
- Q_FOREACH
67+
- BOOST_FOREACH
68+
- TEST_CLASS
69+
- TEST_METHOD
70+
IncludeBlocks: Preserve
71+
IncludeCategories:
72+
- Regex: '^("stdafx.h"|"pch.h")$'
73+
Priority: -4
74+
- Regex: '^".*api.h"$'
75+
Priority: -3
76+
- Regex: '^"resource.h"'
77+
Priority: -2
78+
- Regex: '^".*res.h"$'
79+
Priority: -1
80+
- Regex: '^<.*[^\.h]>'
81+
Priority: 2
82+
- Regex: '^<.*\.(h)>'
83+
Priority: 3
84+
- Regex: '^<.*>'
85+
Priority: 4
86+
- Regex: '.*'
87+
Priority: 5
88+
IncludeIsMainRegex: (Test)?$
89+
IndentCaseBlocks: false
90+
IndentCaseLabels: true
91+
IndentGotoLabels: true
92+
IndentPPDirectives: AfterHash
93+
IndentWidth: 4
94+
IndentWrappedFunctionNames: true
95+
JavaScriptQuotes: Leave
96+
JavaScriptWrapImports: true
97+
KeepEmptyLinesAtTheStartOfBlocks: true
98+
Language: Cpp
99+
MacroBlockBegin: '^BEGIN_MESSAGE_MAP'
100+
MacroBlockEnd: '^END_MESSAGE_MAP'
101+
MaxEmptyLinesToKeep: 2
102+
NamespaceIndentation: None
103+
PenaltyBreakAssignment: 2
104+
PenaltyBreakBeforeFirstCallParameter: 19
105+
PenaltyBreakComment: 300
106+
PenaltyBreakFirstLessLess: 120
107+
PenaltyBreakString: 1000
108+
PenaltyExcessCharacter: 1000000
109+
PenaltyReturnTypeOnItsOwnLine: 60
110+
PointerAlignment: Left
111+
ReflowComments: true
112+
SortIncludes: true
113+
SortUsingDeclarations: true
114+
SpaceAfterCStyleCast: false
115+
SpaceAfterTemplateKeyword: false
116+
SpaceAroundPointerQualifiers: Default
117+
SpaceBeforeAssignmentOperators: true
118+
SpaceBeforeCaseColon: false
119+
SpaceBeforeCpp11BracedList: false
120+
SpaceBeforeCtorInitializerColon: false
121+
SpaceBeforeInheritanceColon: false
122+
SpaceBeforeParens: Never
123+
SpaceBeforeRangeBasedForLoopColon: false
124+
SpaceBeforeSquareBrackets: false
125+
SpaceInEmptyBlock: false
126+
SpaceInEmptyParentheses: false
127+
SpacesBeforeTrailingComments: 1
128+
SpacesInAngles: false
129+
SpacesInContainerLiterals: false
130+
SpacesInCStyleCastParentheses: false
131+
SpacesInConditionalStatement: false
132+
SpacesInParentheses: false
133+
SpacesInSquareBrackets: false
134+
Standard: c++17
135+
TabWidth: 4
136+
UseTab: Never
137+
...

.cmake-format.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# -----------------------------
2+
# Options affecting formatting.
3+
# -----------------------------
4+
format:
5+
6+
# How wide to allow formatted cmake files
7+
line_width: 120
8+
9+
# How many spaces to tab for indent
10+
tab_size: 2
11+
12+
# If true, lines are indented using tab characters (utf-8 0x09) instead of
13+
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
14+
# require a fractional tab character, the behavior of the fractional
15+
# indentation is governed by <fractional_tab_policy>
16+
use_tabchars: False
17+
18+
# If an argument group contains more than this many sub-groups (parg or kwarg
19+
# groups) then force it to a vertical layout.
20+
max_subgroups_hwrap: 2
21+
22+
# If a positional argument group contains more than this many arguments, then
23+
# force it to a vertical layout.
24+
max_pargs_hwrap: 6
25+
26+
# If true, separate flow control names from their parentheses with a space
27+
separate_ctrl_name_with_space: False
28+
29+
# If true, separate function names from parentheses with a space
30+
separate_fn_name_with_space: False
31+
32+
# If a statement is wrapped to more than one line, than dangle the closing
33+
# parenthesis on its own line.
34+
dangle_parens: true
35+
36+
# If the trailing parenthesis must be 'dangled' on its on line, then align it
37+
# to this reference: `prefix`: the start of the statement, `prefix-indent`:
38+
# the start of the statement, plus one indentation level, `child`: align to
39+
# the column of the arguments
40+
dangle_align: 'prefix'
41+
42+
43+
44+
# -------------------------------------
45+
# Additional commands
46+
# -------------------------------------
47+
parse:
48+
additional_commands:
49+
CPMAddPackage:
50+
pargs:
51+
nargs: '*'
52+
flags: []
53+
spelling: CPMAddPackage
54+
kwargs:
55+
NAME: 1
56+
FORCE: 1
57+
VERSION: 1
58+
GIT_TAG: 1
59+
DOWNLOAD_ONLY: 1
60+
GITHUB_REPOSITORY: 1
61+
GITLAB_REPOSITORY: 1
62+
GIT_REPOSITORY: 1
63+
SVN_REPOSITORY: 1
64+
SVN_REVISION: 1
65+
SOURCE_DIR: 1
66+
DOWNLOAD_COMMAND: 1
67+
FIND_PACKAGE_ARGUMENTS: 1
68+
NO_CACHE: 1
69+
GIT_SHALLOW: 1
70+
URL: 1
71+
URL_HASH: 1
72+
URL_MD5: 1
73+
DOWNLOAD_NAME: 1
74+
DOWNLOAD_NO_EXTRACT: 1
75+
HTTP_USERNAME: 1
76+
HTTP_PASSWORD: 1
77+
OPTIONS: +
78+
ProjectMeta:
79+
pargs:
80+
nargs: '*'
81+
flags: []
82+
spelling: ProjectMeta
83+
kwargs:
84+
PROJECT_ID: 1
85+
PROJECT_ID_LOWER: 1
86+
PROJECT_NAME: 1
87+
PROJECT_NAME_LOWER: 1
88+
PROJECT_DESCRIPTION: 1
89+
PROJECT_NAMESPACE: 1
90+
PROJECT_COPYRIGHT: 1
91+
PROJECT_URL: 1
92+
AUTHOR_ORGANIZATION: 1
93+
AUTHOR_DOMAIN: 1
94+
AUTHOR_MAINTAINER: 1
95+
VERSION_MAJOR: 1
96+
VERSION_MINOR: 1
97+
VERSION_PATCH: 1
98+
VERSION_REVISION: 1
99+
VERSION: 1
100+
VERSION_NAME: 1
101+
generate_export_header:
102+
pargs:
103+
nargs: '*'
104+
flags: []
105+
spelling: generate_export_header
106+
kwargs:
107+
BASE_NAME: 1
108+
EXPORT_FILE_NAME: 1

.codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ignore:
2+
- "test"
3+
4+
comment:
5+
require_changes: true

.editorconfig

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# common settings
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
9+
# C++ source files
10+
[*.{cpp,h,hpp}]
11+
indent_style = space
12+
indent_size = 4
13+
max_line_length = 120
14+
insert_final_newline = true
15+
trim_trailing_whitespace = true
16+
17+
# CMake configuration files
18+
[{CMakeLists.txt,CMakeSettings.json,*.cmake}]
19+
indent_size = 2
20+
indent_style = space
21+
trim_trailing_whitespace = true
22+
23+
# Makefile file
24+
[Makefile]
25+
indent_style = tab
26+
27+
# CI configuration files
28+
[{.travis.yml,appveyor.yml,Vagrantfile}]
29+
indent_size = 2
30+
indent_style = space
31+
trim_trailing_whitespace = true
32+
33+
# Markdown/reStructuredText documentation files
34+
[*.{md,markdown,rst}]
35+
indent_size = 2
36+
indent_style = space
37+
trim_trailing_whitespace = true
38+
max_line_length = 120
39+
40+
# Windows shell scripts
41+
[*.{cmd,bat,ps1}]
42+
end_of_line = crlf
43+
indent_size = 4
44+
indent_style = space
45+
insert_final_newline = false
46+
trim_trailing_whitespace = true
47+
48+
# Unix shell scripts
49+
[*.sh]
50+
end_of_line = lf
51+
indent_size = 4
52+
indent_style = space
53+
insert_final_newline = false
54+
trim_trailing_whitespace = true
55+
56+
# Python scripts
57+
[*.py]
58+
indent_size = 4
59+
indent_style = space
60+
61+
# Yaml files
62+
[*.yml]
63+
indent_size = 2
64+
indent_style = space
65+
66+
# Visual studio property sheets
67+
[*.{props,targets}]
68+
indent_size = 2
69+
indent_style = space
70+
71+
[LICENSE]
72+
end_of_line = lf

.gitattributes

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.git* export-ignore
2+
.hooks* export-ignore
3+
.editorconfig export-ignore
4+
5+
# Custom attribute to mark sources as using our C code style.
6+
[attr]our-c-style whitespace=tab-in-indent format.clang-format-6.0
7+
8+
# Custom attribute to mark sources as generated.
9+
# Do not perform whitespace checks. Do not format.
10+
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format-6.0
11+
12+
*.[1-9] eol=lf
13+
*.bash eol=lf
14+
*.sh eol=lf
15+
*.sh.in eol=lf
16+
17+
*.bat eol=crlf
18+
*.bat.in eol=crlf
19+
*.sln eol=crlf
20+
*.vcproj eol=crlf
21+
*.vcxproj eol=crlf
22+
23+
*.png -text
24+
*.png.in -text
25+
*.svg -text
26+
*.svg.in -text
27+
28+
*.c our-c-style
29+
*.cc our-c-style
30+
*.cpp our-c-style
31+
*.cu our-c-style
32+
*.cxx our-c-style
33+
*.h our-c-style
34+
*.hh our-c-style
35+
*.hpp our-c-style
36+
*.hxx our-c-style
37+
38+
*.cmake whitespace=tab-in-indent
39+
*.rst whitespace=tab-in-indent conflict-marker-size=79
40+
*.txt whitespace=tab-in-indent

0 commit comments

Comments
 (0)