8000 Merge pull request #15 from orange-cpp/u/orange-cpp/misc · orange-cpp/omath@c0efa35 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0efa35

Browse files
authored
Merge pull request #15 from orange-cpp/u/orange-cpp/misc
Global improvement
2 parents ea4e27b + ce9da76 commit c0efa35

Some content is hidden

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

49 files changed

+1037
-359
lines changed

.clang-format

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Generated from CLion C/C++ Code Style settings
2+
---
3+
Language: Cpp
4+
BasedOnStyle: LLVM
5+
AccessModifierOffset: -4
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignOperands: true
9+
AlignTrailingComments: false
10+
AllowShortBlocksOnASingleLine: false
11+
AllowShortFunctionsOnASingleLine: None
12+
AlwaysBreakTemplateDeclarations: Yes
13+
BraceWrapping:
14+
AfterCaseLabel: true
15+
AfterClass: true
16+
AfterControlStatement: true
17+
AfterEnum: true
18+
AfterFunction: true
19+
AfterNamespace: true
20+
AfterStruct: true
21+
AfterUnion: true
22+
AfterExternBlock: true
23+
BeforeCatch: false
24+
BeforeElse: false
25+
BeforeLambdaBody: true
26+
BeforeWhile: false
27+
IndentBraces: false
28+
SplitEmptyFunction: true
29+
SplitEmptyRecord: true
30+
SplitEmptyNamespace: true
31+
BreakBeforeBraces: Custom
32+
BreakConstructorInitializers: AfterColon
33+
BreakConstructorInitializersBeforeComma: false
34+
ColumnLimit: 120
35+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
36+
ContinuationIndentWidth: 8
37+
IncludeCategories:
38+
- Regex: '^<.*'
39+
Priority: 1
40+
- Regex: '^".*'
41+
Priority: 2
42+
- Regex: '.*'
43+
Priority: 3
44+
IncludeIsMainRegex: '([-_](test|unittest))?$'
45+
IndentCaseLabels: true
46+
IndentWidth: 4
47+
InsertNewlineAtEOF: true
48+
MacroBlockBegin: ''
49+
MacroBlockEnd: ''
50+
MaxEmptyLinesToKeep: 2
51+
NamespaceIndentation: All
52+
PointerAlignment: Left
53+
SpaceAfterCStyleCast: true
54+
SpaceAfterTemplateKeyword: false
55+
SpaceBeforeRangeBasedForLoopColon: false
56+
SpaceInEmptyParentheses: false
57+
SpacesInAngles: false
58+
SpacesInConditionalStatement: false
59+
SpacesInCStyleCastParentheses: false
60+
SpacesInParentheses: false
61+
TabWidth: 4
62+
...

.clang-tidy

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Generated from CLion Inspection settings
2+
---
3+
Checks: '-*,
4+
bugprone-argument-comment,
5+
bugprone-assert-side-effect,
6+
bugprone-bad-signal-to-kill-thread,
7+
bugprone-branch-clone,
8+
bugprone-copy-constructor-init,
9+
bugprone-dangling-handle,
10+
bugprone-dynamic-static-initializers,
11+
bugprone-fold-init-type,
12+
bugprone-forward-declaration-namespace,
13+
bugprone-forwarding-reference-overload,
14+
bugprone-inaccurate-erase,
15+
bugprone-incorrect-roundings,
16+
bugprone-integer-division,
17+
bugprone-lambda-function-name,
18+
bugprone-macro-parentheses,
19+
bugprone-macro-repeated-side-effects,
20+
bugprone-misplaced-operator-in-strlen-in-alloc,
21+
bugprone-misplaced-pointer-arithmetic-in-alloc,
22+
bugprone-misplaced-widening-cast,
23+
bugprone-move-forwarding-reference,
24+
bugprone-multiple-statement-macro,
25+
bugprone-no-escape,
26+
bugprone-parent-virtual-call,
27+
bugprone-posix-return,
28+
bugprone-reserved-identifier,
29+
bugprone-sizeof-container,
30+
bugprone-sizeof-expression,
31+
bugprone-spuriously-wake-up-functions,
32+
bugprone-string-constructor,
33+
bugprone-string-integer-assignment,
34+
bugprone-string-literal-with-embedded-nul,
35+
bugprone-suspicious-enum-usage,
36+
bugprone-suspicious-include,
37+
bugprone-suspicious-memset-usage,
38+
bugprone-suspicious-missing-comma,
39+
bugprone-suspicious-semicolon,
40+
bugprone-suspicious-string-compare,
41+
bugprone-suspicious-memory-comparison,
42+
bugprone-suspicious-realloc-usage,
43+
bugprone-swapped-arguments,
44+
bugprone-terminating-continue,
45+
bugprone-throw-keyword-missing,
46+
bugprone-too-small-loop-variable,
47+
bugprone-undefined-memory-manipulation,
48+
bugprone-undelegated-constructor,
49+
bugprone-unhandled-self-assignment,
50+
bugprone-unused-raii,
51+
bugprone-unused-return-value,
52+
bugprone-use-after-move,
53+
bugprone-virtual-near-miss,
54+
cert-dcl21-cpp,
55+
cert-dcl58-cpp,
56+
cert-err34-c,
57+
cert-err52-cpp,
58+
cert-err60-cpp,
59+
cert-flp30-c,
60+
cert-msc50-cpp,
61+
cert-msc51-cpp,
62+
cert-str34-c,
63+
cppcoreguidelines-interfaces-global-init,
64+
cppcoreguidelines-narrowing-conversions,
65+
cppcoreguidelines-pro-type-member-init,
66+
cppcoreguidelines-pro-type-static-cast-downcast,
67+
cppcoreguidelines-slicing,
68+
google-default-arguments,
69+
google-explicit-constructor,
70+
google-runtime-operator,
71+
hicpp-exception-baseclass,
72+
hicpp-multiway-paths-covered,
73+
misc-misplaced-const,
74+
misc-new-delete-overloads,
75+
misc-no-recursion,
76+
misc-non-copyable-objects,
77+
misc-throw-by-value-catch-by-reference,
78+
misc-unconventional-assign-operator,
79+
misc-uniqueptr-reset-release,
80+
modernize-avoid-bind,
81+
modernize-concat-nested-namespaces,
82+
modernize-deprecated-headers,
83+
modernize-deprecated-ios-base-aliases,
84+
modernize-loop-convert,
85+
modernize-make-shared,
86+
modernize-make-unique,
87+
modernize-pass-by-value,
88+
modernize-raw-string-literal,
89+
modernize-redundant-void-arg,
90+
modernize-replace-auto-ptr,
91+
modernize-replace-disallow-copy-and-assign-macro,
92+
modernize-replace-random-shuffle,
93+
modernize-return-braced-init-list,
94+
modernize-shrink-to-fit,
95+
modernize-unary-static-assert,
96+
modernize-use-auto,
97+
modernize-use-bool-literals,
98+
modernize-use-emplace,
99+
modernize-use-equals-default,
100+
modernize-use-equals-delete,
101+
modernize-use-nodiscard,
102+
modernize-use-noexcept,
103+
modernize-use-nullptr,
104+
modernize-use-override,
105+
modernize-use-transparent-functors,
106+
modernize-use-uncaught-exceptions,
107+
mpi-buffer-deref,
108+
mpi-type-mismatch,
109+
openmp-use-default-none,
110+
performance-faster-string-find,
111+
performance-for-range-copy,
112+
performance-implicit-conversion-in-loop,
113+
performance-inefficient-algorithm,
114+
performance-inefficient-string-concatenation,
115+
performance-inefficient-vector-operation,
116+
performance-move-const-arg,
117+
performance-move-constructor-init,
118+
performance-no-automatic-move,
119+
performance-noexcept-move-constructor,
120+
performance-trivially-destructible,
121+
performance-type-promotion-in-math-fn,
122+
performance-unnecessary-copy-initialization,
123+
performance-unnecessary-value-param,
124+
portability-simd-intrinsics,
125+
readability-avoid-const-params-in-decls,
126+
readability-const-return-type,
127+
readability-container-size-empty,
128+
readability-convert-member-functions-to-static,
129+
readability-delete-null-pointer,
130+
readability-deleted-default,
131+
readability-inconsistent-declaration-parameter-name,
132+
readability-make-member-function-const,
133+
readability-misleading-indentation,
134+
readability-misplaced-array-index,
135+
readability-non-const-parameter,
136+
readability-redundant-control-flow,
137+
readability-redundant-declaration,
138+
readability-redundant-function-ptr-dereference,
139+
readability-redundant-smartptr-get,
140+
readability-redundant-string-cstr,
141+
readability-redundant-string-init,
142+
readability-simplify-subscript-expr,
143+
readability-static-accessed-through-instance,
144+
readability-static-definition-in-anonymous-namespace,
145+
readability-string-compare,
146+
readability-uniqueptr-delete-release,
147+
readability-use-anyofallof'

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "extlibs/googletest"]
22
path = extlibs/googletest
3-
url = https://github.com/google/googletest.git
3+
url = https://github.com/google/googletest.git

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ project(omath VERSION 1.0.0)
66

77
set(CMAKE_CXX_STANDARD 26)
88

9+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
10+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
11+
912
option(OMATH_BUILD_TESTS "Build unit tests" ON)
1013
option(OMATH_THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to treat them as errors" ON)
1114
option(OMATH_BUILD_AS_SHARED_LIBRARY "Build Omath as .so or .dll" OFF)
@@ -23,10 +26,10 @@ if(OMATH_BUILD_TESTS)
2326
add_subdirectory(tests)
2427
endif()
2528

26-
if (WIN32 AND OMATH_THREAT_WARNING_AS_ERROR)
29+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND OMATH_THREAT_WARNING_AS_ERROR)
2730
target_compile_options(omath PRIVATE /W4 /WX)
28-
elseif(UNIX AND OMATH_THREAT_WARNING_AS_ERROR)
29-
target_compile_options(omath PRIVATE -Wall -Wextra -Wpedantic)
31+
elseif(OMATH_THREAT_WARNING_AS_ERROR)
32+
target_compile_options(omath PRIVATE -Wall -Wextra -Wpedantic -Werror)
3033
endif()
3134

3235
target_include_directories(omath

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Goal
1+
## 🎯 Goal
22

33
My goal is to provide a space where it is safe for everyone to contribute to,
44
and get support for, open-source software in a respectful and cooperative
@@ -10,7 +10,7 @@ surrounding community a place for everyone.
1010
As members, contributors, and everyone else who may participate in the
1111
development, I strive to keep the entire experience civil.
1212

13-
## Standards
13+
## 📜 Standards
1414

1515
Our community standards exist in order to make sure everyone feels comfortable
1616
contributing to the project(s) together.
@@ -27,14 +27,14 @@ Examples of breaking each rule respectively include:
2727
- Posting distasteful imagery, trolling, or posting things unrelated to the topic at hand.
2828
- Treating someone as worse because of their lack of understanding of an issue.
2929

30-
## Enforcement
30+
## Enforcement
3131

3232
Enforcement of this CoC is done by Orange++ and/or other core contributors.
3333

3434
I, as the core developer, will strive my best to keep this community civil and
3535
following the standards outlined above.
3636

37-
### Reporting incidents
37+
### 🚩 Reporting incidents
3838

3939
If you believe an incident of breaking these standards has occurred, but nobody has
4040
taken appropriate action, you can privately contact the people responsible for dealing
@@ -47,10 +47,11 @@ with such incidents in multiple ways:
4747
- `@orange_cpp`
4848

4949
***Telegram***
50-
- `@orange-cpp`
50+
- `@orange_cpp`
51+
5152
I guarantee your privacy and will not share those reports with anyone.
5253

53-
## Enforcement Strategy
54+
## ⚖️ Enforcement Strategy
5455

5556
Depending on the severity of the infraction, any action from the list below may be applied.
5657
Please keep in mind cases are reviewed on a per-case basis and members are the ultimate
@@ -63,27 +64,27 @@ to be taken is still up to the member.
6364
For example, if the matter at hand regards a representative of a marginalized group or minority,
6465
the member might ask for a first-hand opinion from another representative of such group.
6566

66-
### Correction/Edit
67+
### ✏️ Correction/Edit
6768

6869
If your message is found to be misleading or poorly worded, a member might
6970
edit your message.
7071

71-
### Warning/Deletion
72+
### ⚠️ Warning/Deletion
7273

7374
If your message is found inappropriate, a member might give you a public or private warning,
7475
and/or delete your message.
7576

76-
### Mute
77+
### 🔇 Mute
7778

7879
If your message is disruptive, or you have been repeatedly violating the standards,
7980
a member might mute (or temporarily ban) you.
8081

81-
### Ban
82+
### Ban
8283

8384
If your message is hateful, very disruptive, or other, less serious infractions are repeated
8485
ignoring previous punishments, a member might ban you permanently.
8586

86-
## Scope
87+
## 🔎 Scope
8788

8889
This CoC shall apply to all projects ran under the Orange++ lead and all _official_ communities
8990
outside of GitHub.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report security issues to `orange-cpp@yandex.com`
5+
Please report security issues to `orange-cpp@yandex.ru`

0 commit comments

Comments
 (0)
0