-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ci/fix_create_pkg_ci
- Loading branch information
Showing
9 changed files
with
306 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
arrayIndexThenCheck | ||
assignBoolToFloat | ||
checkersReport | ||
constParameterPointer | ||
constParameterReference | ||
constStatement | ||
constVariable | ||
constVariablePointer | ||
constVariableReference | ||
containerOutOfBounds | ||
cstyleCast | ||
ctuOneDefinitionRuleViolation | ||
current_deleted_index | ||
duplicateAssignExpression | ||
duplicateBranch | ||
duplicateBreak | ||
duplicateCondition | ||
duplicateExpression | ||
funcArgNamesDifferent | ||
functionConst | ||
functionStatic | ||
invalidPointerCast | ||
knownConditionTrueFalse | ||
missingInclude | ||
missingIncludeSystem | ||
multiCondition | ||
noConstructor | ||
noExplicitConstructor | ||
noValidConfiguration | ||
obstacle_cruise_planner | ||
passedByValue | ||
preprocessorErrorDirective | ||
redundantAssignment | ||
redundantContinue | ||
redundantIfRemove | ||
redundantInitialization | ||
returnByReference | ||
selfAssignment | ||
shadowArgument | ||
shadowFunction | ||
shadowVariable | ||
stlFindInsert | ||
syntaxError | ||
uninitMemberVar | ||
unknownMacro | ||
unmatchedSuppression | ||
unpreciseMathCall | ||
unreadVariable | ||
unsignedLessThanZero | ||
unusedFunction | ||
unusedScopedObject | ||
unusedStructMember | ||
unusedVariable | ||
useInitializationList | ||
useStlAlgorithm | ||
uselessCallsSubstr | ||
uselessOverride | ||
variableScope | ||
virtualCallInConstructor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"ignorePaths": [".cppcheck_suppressions"], | ||
"ignoreRegExpList": [], | ||
"words": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Bug | ||
description: Report a bug | ||
body: | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Checklist | ||
description: Confirm the following items before proceeding. If one cannot be satisfied, create a discussion thread instead. | ||
required: true - label: I've searched other issues and no duplicate issues were found. | ||
required: true - label: I'm convinced that this is not my fault but a bug. | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: Write a brief description of the bug. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: Describe the expected behavior. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Actual behavior | ||
description: Describe the actual behavior. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: Write the steps to reproduce the bug. | ||
placeholder: |- 1. 2. 3. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Versions | ||
description: Provide the version information. You can omit this if you believe it's irrelevant. | ||
placeholder: |- - OS: - ROS 2: | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Possible causes | ||
description: Write the possible causes if you have any ideas. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other additional context if it exists. | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Task | ||
description: Plan a task | ||
body: | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Checklist | ||
description: Confirm the following items before proceeding. If one cannot be satisfied, create a discussion thread instead. | ||
required: true - label: I've searched other issues and no duplicate issues were found. | ||
required: true - label: I've agreed with the maintainers that I can plan this task. | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: Write a brief description of the task. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Purpose | ||
description: Describe the purpose of the task. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Possible approaches | ||
description: Describe possible approaches for the task. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Definition of done | ||
description: Write the definition of done for the task. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: cppcheck-all | ||
|
||
on: | ||
pull_request: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cppcheck-all: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake git libpcre3-dev | ||
# cppcheck from apt does not yet support --check-level args, and thus install from source | ||
- name: Install Cppcheck from source | ||
run: | | ||
mkdir /tmp/cppcheck | ||
git clone https://github.com/danmar/cppcheck.git /tmp/cppcheck | ||
cd /tmp/cppcheck | ||
git checkout 2.14.1 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j $(nproc) | ||
sudo make install | ||
- name: Run Cppcheck on all files | ||
continue-on-error: true | ||
id: cppcheck | ||
run: | | ||
cppcheck --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --xml . 2> cppcheck-report.xml | ||
shell: bash | ||
|
||
- name: Count errors by error ID and severity | ||
run: | | ||
#!/bin/bash | ||
temp_file=$(mktemp) | ||
grep -oP '(?<=id=")[^"]+" severity="[^"]+' cppcheck-report.xml | sed 's/" severity="/,/g' > "$temp_file" | ||
echo "Error counts by error ID and severity:" | ||
sort "$temp_file" | uniq -c | ||
rm "$temp_file" | ||
shell: bash | ||
|
||
- name: Upload Cppcheck report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: cppcheck-report | ||
path: cppcheck-report.xml | ||
|
||
- name: Fail the job if Cppcheck failed | ||
if: steps.cppcheck.outcome == 'failure' | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: cppcheck-differential | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
cppcheck-differential: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake git libpcre3-dev | ||
# cppcheck from apt does not yet support --check-level args, and thus install from source | ||
- name: Install Cppcheck from source | ||
run: | | ||
mkdir /tmp/cppcheck | ||
git clone https://github.com/danmar/cppcheck.git /tmp/cppcheck | ||
cd /tmp/cppcheck | ||
git checkout 2.14.1 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j $(nproc) | ||
sudo make install | ||
- name: Get changed files | ||
id: changed-files | ||
run: | | ||
git fetch origin ${{ github.base_ref }} --depth=1 | ||
git diff --name-only FETCH_HEAD ${{ github.sha }} > changed_files.txt | ||
cat changed_files.txt | ||
- name: Run Cppcheck on changed files | ||
continue-on-error: true | ||
id: cppcheck | ||
run: | | ||
files=$(cat changed_files.txt | grep -E '\.(cpp|hpp)$' || true) | ||
if [ -n "$files" ]; then | ||
echo "Running Cppcheck on changed files: $files" | ||
cppcheck --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --suppressions-list=.cppcheck_suppressions $files 2> cppcheck-report.txt | ||
else | ||
echo "No C++ files changed." | ||
touch cppcheck-report.txt | ||
fi | ||
shell: bash | ||
|
||
- name: Show cppcheck-report result | ||
run: | | ||
cat cppcheck-report.txt | ||
- name: Upload Cppcheck report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: cppcheck-report | ||
path: cppcheck-report.txt | ||
|
||
- name: Fail the job if Cppcheck failed | ||
if: steps.cppcheck.outcome == 'failure' | ||
run: exit 1 |
11 changes: 8 additions & 3 deletions
11
...b/workflows/spell-check-differential.yaml → .github/workflows/spell-check-partial.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
name: spell-check-differential | ||
name: spell-check-partial | ||
|
||
on: | ||
pull_request: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
spell-check-differential: | ||
spell-check-partial: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run spell-check | ||
uses: autowarefoundation/autoware-github-actions/spell-check@v1 | ||
with: | ||
cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/.cspell.json | ||
local-cspell-json: .cspell.json | ||
incremental-files-only: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# ros2-project-template | ||
|
||
Project template for ROS2 | ||
Project template for ROS 2 |