Skip to content

Commit 3a7b1a9

Browse files
Scott DixonScott Dixon
authored andcommitted
issue #108 progress
improving some coverage, cleaning up a few sonarlint issues, and steering vscode users to clangd. Consuming fixes in o1Heap and added o1heap example. Bump SonarSource/sonarqube-scan-action from 5.3.0 to 5.3.1 Bumps [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action) from 5.3.0 to 5.3.1. - [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases) - [Commits](SonarSource/sonarqube-scan-action@v5.3.0...v5.3.1) --- updated-dependencies: - dependency-name: SonarSource/sonarqube-scan-action dependency-version: 5.3.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump actions/upload-pages-artifact from 3 to 4 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](actions/upload-pages-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 6755811 commit 3a7b1a9

27 files changed

Lines changed: 256 additions & 393 deletions

.clang-tidy

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Checks: >-
2+
boost-*,
3+
bugprone-*,
4+
cert-*,
5+
clang-analyzer-*,
6+
cppcoreguidelines-*,
7+
google-*,
8+
hicpp-*,
9+
llvm-*,
10+
misc-*,
11+
modernize-*,
12+
performance-*,
13+
portability-*,
14+
readability-*,
15+
-boost-use-ranges,
16+
-clang-analyzer-core.uninitialized.Assign,
17+
-cppcoreguidelines-avoid-const-or-ref-data-members,
18+
-cppcoreguidelines-use-default-member-init,
19+
-google-readability-avoid-underscore-in-googletest-name,
20+
-google-readability-todo,
21+
-llvm-header-guard,
22+
-modernize-concat-nested-namespaces,
23+
-modernize-type-traits,
24+
-modernize-use-constraints,
25+
-modernize-use-default-member-init,
26+
-modernize-use-designated-initializers,
27+
-modernize-use-nodiscard,
28+
-modernize-use-ranges,
29+
-readability-avoid-const-params-in-decls,
30+
-readability-identifier-length,
31+
-*-use-trailing-return-type,
32+
-*-named-parameter,
33+
CheckOptions:
34+
- key: readability-function-cognitive-complexity.Threshold
35+
value: '90'
36+
- key: readability-magic-numbers.IgnoredIntegerValues
37+
value: '1;2;3;4;5;8;10;16;20;32;60;64;100;128;256;500;512;1000'
38+
WarningsAsErrors: '*'
39+
HeaderFilterRegex: 'include/cetl/.*\.hpp'
40+
FormatStyle: file

.github/workflows/cetlvast.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
uses: actions/configure-pages@v5
149149
- name: Upload docs
150150
if: ${{ github.event_name != 'pull_request' }}
151-
uses: actions/upload-pages-artifact@v3
151+
uses: actions/upload-pages-artifact@v4
152152
with:
153153
path: "cetlvast/build/suites/docs/html/"
154154

@@ -188,25 +188,8 @@ jobs:
188188
working-directory: cetlvast
189189
run: cmake --workflow --preset manual-coverage-gcc-native-cpp-14-offline
190190
- name: SonarQube Scan
191-
uses: SonarSource/sonarqube-scan-action@v5.3.0
191+
uses: SonarSource/sonarqube-scan-action@v5.3.1
192192
if: ${{ env.SONAR_TOKEN != '' }}
193-
with:
194-
args: >
195-
-Dsonar.organization=opencyphal
196-
-Dsonar.projectKey=OpenCyphal_CETL
197-
-Dsonar.projectName=CETLVaSt
198-
-Dsonar.verbose=true
199-
-Dsonar.cfamily.compile-commands=cetlvast/build/compile_commands.json
200-
-Dsonar.cfamily.cobertura.reportPaths=cetlvast/build/suites/unittest/coverage.xml
201-
-Dsonar.testExecutionReportPaths=cetlvast/build/suites/unittest/unittest-sonarqube.xml
202-
-Dsonar.sources="include,cetlvast/suites/unittest/sonar.cpp"
203-
-Dsonar.tests="cetlvast/suites/unittest"
204-
-Dsonar.test.inclusions="**/test_*.cpp"
205-
-Dsonar.cfamily.ignoreHeaderComments=false
206-
-Dsonar.coverage.exclusions="cetlvast/**/*,**/sonar.cpp"
207-
-Dsonar.cpd.exclusions="cetlvast/**/*,**/sonar.cpp"
208-
-Dsonar.cfamily.reportingCppStandardOverride=c++14
209-
210193
deploy-docs:
211194
if: >
212195
(github.event_name == 'release' && !github.event.release.prerelease) ||

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ Vagrantfile
5050
cmake-build-*/
5151

5252
*.gcov
53+
54+
# clangd
55+
.cache

.vscode/extensions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"xaver.clang-format",
88
"vadimcn.vscode-lldb",
99
"matepek.vscode-catch2-test-adapter",
10-
"ms-vscode.hexeditor",
11-
"Jme797.prettier-vscode-extension"
10+
"sonarsource.sonarlint-vscode",
11+
"llvm-vs-code-extensions.vscode-clangd"
1212
]
1313
}

.vscode/settings.json

Lines changed: 4 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"cmake.configureOnEdit": false,
44
"cmake.sourceDirectory": "${workspaceFolder}/cetlvast",
55
"cmake.buildBeforeRun": true,
6+
"C_Cpp.intelliSenseEngine": "disabled",
7+
"C_Cpp.autoAddFileAssociations": false,
68
"editor.wordWrapColumn": 120,
79
"files.insertFinalNewline": true,
810
"files.trimFinalNewlines": true,
@@ -30,7 +32,7 @@
3032
"pattern": "${workspaceFolder}/cetlvast/build/suites/benchmark/**/benchmark_*"
3133
}
3234
],
33-
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/compile_commands.json",
35+
"sonarlint.pathToCompileCommands": "${workspaceFolder}/cetlvast/build/compile_commands.json",
3436
"sonarlint.connectedMode.project": {
3537
"connectionId": "opencyphal",
3638
"projectKey": "OpenCyphal_CETL"
@@ -56,110 +58,6 @@
5658
},
5759
"files.associations": {
5860
"*.in": "cmake",
59-
"Config": "perl",
60-
"memory_resource": "cpp",
61-
"any": "cpp",
62-
"array": "cpp",
63-
"atomic": "cpp",
64-
"bit": "cpp",
65-
"*.tcc": "cpp",
66-
"bitset": "cpp",
67-
"cctype": "cpp",
68-
"chrono": "cpp",
69-
"clocale": "cpp",
70-
"cmath": "cpp",
71-
"codecvt": "cpp",
72-
"compare": "cpp",
73-
"concepts": "cpp",
74-
"condition_variable": "cpp",
75-
"cstdarg": "cpp",
76-
"cstddef": "cpp",
77-
"cstdint": "cpp",
78-
"cstdio": "cpp",
79-
"cstdlib": "cpp",
80-
"cstring": "cpp",
81-
"ctime": "cpp",
82-
"cwchar": "cpp",
83-
"cwctype": "cpp",
84-
"deque": "cpp",
85-
"forward_list": "cpp",
86-
"list": "cpp",
87-
"map": "cpp",
88-
"set": "cpp",
89-
"string": "cpp",
90-
"unordered_map": "cpp",
91-
"unordered_set": "cpp",
92-
"vector": "cpp",
93-
"exception": "cpp",
94-
"algorithm": "cpp",
95-
"functional": "cpp",
96-
"iterator": "cpp",
97-
"memory": "cpp",
98-
"numeric": "cpp",
99-
"optional": "cpp",
100-
"random": "cpp",
101-
"ratio": "cpp",
102-
"string_view": "cpp",
103-
"system_error": "cpp",
104-
"tuple": "cpp",
105-
"type_traits": "cpp",
106-
"utility": "cpp",
107-
"fstream": "cpp",
108-
"future": "cpp",
109-
"initializer_list": "cpp",
110-
"iomanip": "cpp",
111-
"iosfwd": "cpp",
112-
"iostream": "cpp",
113-
"istream": "cpp",
114-
"limits": "cpp",
115-
"mutex": "cpp",
116-
"new": "cpp",
117-
"numbers": "cpp",
118-
"ostream": "cpp",
119-
"regex": "cpp",
120-
"semaphore": "cpp",
121-
"shared_mutex": "cpp",
122-
"span": "cpp",
123-
"sstream": "cpp",
124-
"stdexcept": "cpp",
125-
"stop_token": "cpp",
126-
"streambuf": "cpp",
127-
"thread": "cpp",
128-
"cinttypes": "cpp",
129-
"typeinfo": "cpp",
130-
"variant": "cpp",
131-
"__bit_reference": "cpp",
132-
"__bits": "cpp",
133-
"__config": "cpp",
134-
"__debug": "cpp",
135-
"__errc": "cpp",
136-
"__hash_table": "cpp",
137-
"__locale": "cpp",
138-
"__mutex_base": "cpp",
139-
"__node_handle": "cpp",
140-
"__split_buffer": "cpp",
141-
"__threading_support": "cpp",
142-
"__tree": "cpp",
143-
"__tuple": "cpp",
144-
"__verbose_abort": "cpp",
145-
"ios": "cpp",
146-
"locale": "cpp",
147-
"queue": "cpp",
148-
"version": "cpp",
149-
"cassert": "cpp",
150-
"__memory": "cpp",
151-
"__nullptr": "cpp",
152-
"__string": "cpp",
153-
"ranges": "cpp",
154-
"complex": "cpp",
155-
"stack": "cpp",
156-
"strstream": "cpp",
157-
"typeindex": "cpp",
158-
"charconv": "cpp",
159-
"csignal": "cpp",
160-
"format": "cpp",
161-
"execution": "cpp",
162-
"filesystem": "cpp",
163-
"print": "cpp"
61+
"*.tcc": "cpp"
16462
}
16563
}

.vscode/words-cetl.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
arity
1+
arity
22
AUTOSAR
33
builddir
44
cetl
55
cetlpf
66
cetlvast
7+
cfamily
78
COMPILETEST_PRECHECK
89
copydoc
910
ctest
@@ -32,6 +33,7 @@ NOLINT
3233
NOLINTBEGIN
3334
NOLINTEND
3435
NOLINTNEXTLINE
36+
NOSONAR
3537
NOTFOUND
3638
opencyphal
3739
Pavel

cetlvast/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,16 @@ else()
206206
)
207207
endif()
208208

209-
add_custom_target(
210-
docs
211-
DEPENDS
212-
lint
213-
generate_CETL_docs
214-
)
209+
if(DEFINED Doxygen_FOUND)
210+
if(${Doxygen_FOUND})
211+
add_custom_target(
212+
docs
213+
DEPENDS
214+
lint
215+
generate_CETL_docs
216+
)
217+
endif()
218+
endif()
215219

216220
add_custom_target(
217221
build

cetlvast/CMakePresets.json

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -502,20 +502,6 @@
502502
"gcovr_sonarqube_report_for_examples"
503503
]
504504
},
505-
{
506-
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline",
507-
"configurePreset": "configure-gcc-native-cpp-14-offline",
508-
"configuration": "Coverage",
509-
"targets": [
510-
"build",
511-
"run_unittests",
512-
"gcovr_html_report_for_unittest",
513-
"gcovr_sonarqube_report_for_unittest",
514-
"run_examples",
515-
"gcovr_html_report_for_examples",
516-
"gcovr_sonarqube_report_for_examples"
517-
]
518-
},
519505
{
520506
"name": "build-Release-gcc-native-cpp-14-online",
521507
"configurePreset": "configure-gcc-native-cpp-14-online",
@@ -2112,21 +2098,6 @@
21122098
}
21132099
]
21142100
},
2115-
{
2116-
"name": "manual-sonar-scan-gcc-native-cpp-14-offline",
2117-
"displayName": "gcc native cpp 14 offline (Coverage only).",
2118-
"description": "Hand-managed workflow for generating coverage data for sonarqube scans.",
2119-
"steps": [
2120-
{
2121-
"type": "configure",
2122-
"name": "configure-gcc-native-cpp-14-offline"
2123-
},
2124-
{
2125-
"type": "build",
2126-
"name": "manual-Coverage-gcc-native-cpp-14-offline"
2127-
}
2128-
]
2129-
},
21302101
{
21312102
"name": "manual-coverage-gcc-native-cpp-14-offline",
21322103
"displayName": "gcc native cpp 14 offline (Coverage only).",
@@ -2138,7 +2109,7 @@
21382109
},
21392110
{
21402111
"type": "build",
2141-
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline"
2112+
"name": "manual-Coverage-gcc-native-cpp-14-offline"
21422113
}
21432114
]
21442115
},

cetlvast/cmake/modules/ExternalDependenciesGitHub.cmake.in

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

1414
set(GIT_TAG_benchmark "v1.9.1")
1515
set(GIT_TAG_googletest "v1.16.0")
16-
set(GIT_TAG_o1heap "aa3c253923db36eee7d73a4a5e30884a5fe7a6eb")
16+
set(GIT_TAG_o1heap "2.2.0")

0 commit comments

Comments
 (0)