Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Checks: >-
boost-*,
bugprone-*,
cert-*,
clang-analyzer-*,
cppcoreguidelines-*,
google-*,
hicpp-*,
llvm-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-boost-use-ranges,
-clang-analyzer-core.uninitialized.Assign,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-use-default-member-init,
-google-readability-avoid-underscore-in-googletest-name,
-google-readability-todo,
-llvm-header-guard,
-modernize-concat-nested-namespaces,
-modernize-type-traits,
-modernize-use-constraints,
-modernize-use-default-member-init,
-modernize-use-designated-initializers,
-modernize-use-nodiscard,
-modernize-use-ranges,
-readability-avoid-const-params-in-decls,
-readability-identifier-length,
-*-use-trailing-return-type,
-*-named-parameter,
CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
value: '90'
- key: readability-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;5;8;10;16;20;32;60;64;100;128;256;500;512;1000'
WarningsAsErrors: '*'
HeaderFilterRegex: 'include/cetl/.*\.hpp'
FormatStyle: file
31 changes: 7 additions & 24 deletions .github/workflows/cetlvast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Cache ext modules
id: cetlvast-ext
uses: actions/cache@v4
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
toolchain: ["gcc-native-32", "clang-native"]
standard: ["cpp-14", "cpp-17", "cpp-20", "cpp-23"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Cache ext modules
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
toolchain: ["gcc-native", "clang-native"]
standard: ["cpp-14", "cpp-17", "cpp-20"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Cache ext modules
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
needs:
- cache-warmup
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Cache ext modules
uses: actions/cache@v4
with:
Expand All @@ -148,7 +148,7 @@ jobs:
uses: actions/configure-pages@v5
- name: Upload docs
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: "cetlvast/build/suites/docs/html/"

Expand All @@ -168,7 +168,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis by sonarqube.
- name: Cache ext modules
Expand All @@ -188,25 +188,8 @@ jobs:
working-directory: cetlvast
run: cmake --workflow --preset manual-coverage-gcc-native-cpp-14-offline
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.3.0
uses: SonarSource/sonarqube-scan-action@v5.3.1
if: ${{ env.SONAR_TOKEN != '' }}
with:
args: >
-Dsonar.organization=opencyphal
-Dsonar.projectKey=OpenCyphal_CETL
-Dsonar.projectName=CETLVaSt
-Dsonar.verbose=true
-Dsonar.cfamily.compile-commands=cetlvast/build/compile_commands.json
-Dsonar.cfamily.cobertura.reportPaths=cetlvast/build/suites/unittest/coverage.xml
-Dsonar.testExecutionReportPaths=cetlvast/build/suites/unittest/unittest-sonarqube.xml
-Dsonar.sources="include,cetlvast/suites/unittest/sonar.cpp"
-Dsonar.tests="cetlvast/suites/unittest"
-Dsonar.test.inclusions="**/test_*.cpp"
-Dsonar.cfamily.ignoreHeaderComments=false
-Dsonar.coverage.exclusions="cetlvast/**/*,**/sonar.cpp"
-Dsonar.cpd.exclusions="cetlvast/**/*,**/sonar.cpp"
-Dsonar.cfamily.reportingCppStandardOverride=c++14

deploy-docs:
if: >
(github.event_name == 'release' && !github.event.release.prerelease) ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ Vagrantfile
cmake-build-*/

*.gcov

# clangd
.cache
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"xaver.clang-format",
"vadimcn.vscode-lldb",
"matepek.vscode-catch2-test-adapter",
"ms-vscode.hexeditor",
"Jme797.prettier-vscode-extension"
"sonarsource.sonarlint-vscode",
"llvm-vs-code-extensions.vscode-clangd"
]
}
110 changes: 4 additions & 106 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"cmake.configureOnEdit": false,
"cmake.sourceDirectory": "${workspaceFolder}/cetlvast",
"cmake.buildBeforeRun": true,
"C_Cpp.intelliSenseEngine": "disabled",
"C_Cpp.autoAddFileAssociations": false,
"editor.wordWrapColumn": 120,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
Expand Down Expand Up @@ -30,7 +32,7 @@
"pattern": "${workspaceFolder}/cetlvast/build/suites/benchmark/**/benchmark_*"
}
],
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/compile_commands.json",
"sonarlint.pathToCompileCommands": "${workspaceFolder}/cetlvast/build/compile_commands.json",
"sonarlint.connectedMode.project": {
"connectionId": "opencyphal",
"projectKey": "OpenCyphal_CETL"
Expand All @@ -56,110 +58,6 @@
},
"files.associations": {
"*.in": "cmake",
"Config": "perl",
"memory_resource": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"regex": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp",
"variant": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"__verbose_abort": "cpp",
"ios": "cpp",
"locale": "cpp",
"queue": "cpp",
"version": "cpp",
"cassert": "cpp",
"__memory": "cpp",
"__nullptr": "cpp",
"__string": "cpp",
"ranges": "cpp",
"complex": "cpp",
"stack": "cpp",
"strstream": "cpp",
"typeindex": "cpp",
"charconv": "cpp",
"csignal": "cpp",
"format": "cpp",
"execution": "cpp",
"filesystem": "cpp",
"print": "cpp"
"*.tcc": "cpp"
}
}
4 changes: 3 additions & 1 deletion .vscode/words-cetl.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
arity
arity
AUTOSAR
builddir
cetl
cetlpf
cetlvast
cfamily
COMPILETEST_PRECHECK
copydoc
ctest
Expand Down Expand Up @@ -32,6 +33,7 @@ NOLINT
NOLINTBEGIN
NOLINTEND
NOLINTNEXTLINE
NOSONAR
NOTFOUND
opencyphal
Pavel
Expand Down
16 changes: 10 additions & 6 deletions cetlvast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,16 @@ else()
)
endif()

add_custom_target(
docs
DEPENDS
lint
generate_CETL_docs
)
if(DEFINED Doxygen_FOUND)
if(${Doxygen_FOUND})
add_custom_target(
docs
DEPENDS
lint
generate_CETL_docs
)
endif()
endif()

add_custom_target(
build
Expand Down
31 changes: 1 addition & 30 deletions cetlvast/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,20 +502,6 @@
"gcovr_sonarqube_report_for_examples"
]
},
{
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline",
"configurePreset": "configure-gcc-native-cpp-14-offline",
"configuration": "Coverage",
"targets": [
"build",
"run_unittests",
"gcovr_html_report_for_unittest",
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples"
]
},
{
"name": "build-Release-gcc-native-cpp-14-online",
"configurePreset": "configure-gcc-native-cpp-14-online",
Expand Down Expand Up @@ -2112,21 +2098,6 @@
}
]
},
{
"name": "manual-sonar-scan-gcc-native-cpp-14-offline",
"displayName": "gcc native cpp 14 offline (Coverage only).",
"description": "Hand-managed workflow for generating coverage data for sonarqube scans.",
"steps": [
{
"type": "configure",
"name": "configure-gcc-native-cpp-14-offline"
},
{
"type": "build",
"name": "manual-Coverage-gcc-native-cpp-14-offline"
}
]
},
{
"name": "manual-coverage-gcc-native-cpp-14-offline",
"displayName": "gcc native cpp 14 offline (Coverage only).",
Expand All @@ -2138,7 +2109,7 @@
},
{
"type": "build",
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline"
"name": "manual-Coverage-gcc-native-cpp-14-offline"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion cetlvast/cmake/modules/ExternalDependenciesGitHub.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

set(GIT_TAG_benchmark "v1.9.1")
set(GIT_TAG_googletest "v1.16.0")
set(GIT_TAG_o1heap "aa3c253923db36eee7d73a4a5e30884a5fe7a6eb")
set(GIT_TAG_o1heap "2.2.0")
Loading