Skip to content

Commit

Permalink
use the same federate registration process (#2531)
Browse files Browse the repository at this point in the history
* use the same federate registration process for constructors using an existing core object as without.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* try to fix the clang-tidy action

* update run-clang-tidy-pr.sh to match updated version

* fix the calls for file processing in federates

for more information, see https://pre-commit.ci

* refactor some of the file processing for federates.

* clearer naming of some variables in the test cases

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
phlptp and pre-commit-ci[bot] authored Sep 1, 2023
1 parent 6c0d097 commit 9d6c189
Show file tree
Hide file tree
Showing 7 changed files with 887 additions and 488 deletions.
6 changes: 5 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Checks: "
-bugprone-narrowing-conversions,
misc-*,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
cert-*,
-cert-err58-cpp,
portability-*,
Expand Down Expand Up @@ -62,6 +63,7 @@ WarningsAsErrors: "
-bugprone-narrowing-conversions,
misc-*,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
cert-*,
-cert-err58-cpp,
portability-*,
Expand Down Expand Up @@ -315,7 +317,7 @@ CheckOptions:
- key: readability-identifier-naming.MethodSuffix
value: ""
- key: readability-identifier-naming.NamespaceCase
value: lowercase
value: lower_case
- key: readability-identifier-naming.NamespacePrefix
value: ""
- key: readability-identifier-naming.NamespaceSuffix
Expand Down Expand Up @@ -434,6 +436,8 @@ CheckOptions:
value: ""
- key: readability-identifier-naming.VirtualMethodSuffix
value: ""
- key: readability-function-cognitive-complexity.Threshold
value: 100
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: "0"
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/run-clang-tidy-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if ((filecount > 0 && filecount <= 20)); then
echo "====Run clang-tidy===="
while read -r line; do
if echo "$line" | grep -E '\.(cpp|hpp|c|h)$'; then
python3 /usr/share/clang/run-clang-tidy.py "$line" -p build -quiet
/usr/bin/run-clang-tidy "$line" -p build -quiet
rc=$?
echo "clang-tidy exit code: $rc"
if [[ "$rc" != "0" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/static-analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ jobs:
- uses: actions/checkout@v3
- name: Run clang-tidy on changed files
shell: bash
run: ./.github/actions/run-clang-tidy-pr.sh
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
./.github/actions/run-clang-tidy-pr.sh
Loading

0 comments on commit 9d6c189

Please sign in to comment.