Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github workflow for cppcheck #13

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2d2b862
understand gaussian with python
Nov 22, 2022
d91dd03
implement python for unscented transform
Nov 27, 2022
223fbca
refactoring and implement unscented transform class
Nov 28, 2022
baf53d7
updated unscented transformation python
Nov 29, 2022
5a16ad4
add ukf
Dec 4, 2022
3d1b9ae
add ukf images
Dec 4, 2022
5f59039
optimize unscented transformation cpp code
Dec 6, 2022
17adb8d
update readme file
Dec 6, 2022
5686611
refactor unscented transform class
Dec 7, 2022
0765333
adding test in ukf python example
Dec 9, 2022
9357dc4
cpp implementation of ukf with example
Dec 9, 2022
ad59ab8
Create LICENSE.md
Al-khwarizmi-780 Dec 10, 2022
89535bf
Merge pull request #1 from MYCodingCorner/add-license-1
Al-khwarizmi-780 Dec 10, 2022
97b0a50
LICENSE CHANGED TO GPL-L3
Dec 10, 2022
3ef02a5
updating license to GPL-3.0
Dec 10, 2022
5f69b2b
update readme
Dec 10, 2022
07d6cce
updating readme again
Dec 10, 2022
e42f235
adding more doxygen comments
Dec 10, 2022
14c6474
python implement of sr-ukf
Dec 19, 2022
3eaa1c6
optimize kalman gain in sr-ukf using least squares
Dec 20, 2022
3182145
implement least square solving example
Dec 20, 2022
d8a0c85
Update README.md
Al-khwarizmi-780 Dec 21, 2022
d153dd3
Update README.md
Al-khwarizmi-780 Dec 21, 2022
5039093
Update README.md
Al-khwarizmi-780 Dec 21, 2022
affcb78
implement square-root ukf in C++
Dec 22, 2022
8ce1e4e
reduce template arg in sqare-root ukf
Dec 22, 2022
aa2c9d8
remove unused CMakeLists.txt
Dec 25, 2022
b93aa1c
option to install the library via cmake
Dec 25, 2022
ca4f512
adding bootstrap batch file
Dec 25, 2022
021e22c
updated readme for bootstrap script
Dec 25, 2022
ee02495
Update README.md
Al-khwarizmi-780 Dec 27, 2022
95c5a63
Update README.md
Al-khwarizmi-780 Dec 27, 2022
3c3a160
refactoring namespaces and methods name
Dec 27, 2022
c1c5e5d
Update README.md
Al-khwarizmi-780 Jan 22, 2023
2aac559
change copyright name and remove double underscores
May 26, 2023
05727ef
add ukf projectile example
Jun 4, 2023
84900f9
refactoring and fix linux build
Mar 7, 2024
b2a0923
fix bug in upper trianguler view
Mar 7, 2024
dde2cd4
changing capitalization of folder examples
Mar 8, 2024
0769da4
removing unexisting files from cmake
Mar 8, 2024
c2809da
adding google tests
Mar 9, 2024
dab3f4a
fix for VS Runtime Library compilation
Mar 9, 2024
5791e08
fix test issue in linux
Mar 9, 2024
67a1483
update bootstrap file
Mar 9, 2024
4accf0d
Merge pull request #4 from Al-khwarizmi-780/feature/refactoring
Al-khwarizmi-780 Mar 9, 2024
df3f221
Folders reorg (#6)
Al-khwarizmi-780 Apr 12, 2024
22f88dc
Feature/update readme (#8)
Al-khwarizmi-780 Apr 12, 2024
964143e
Create cmake-single-platform.yml (#10)
Al-khwarizmi-780 Apr 28, 2024
2a5568f
implement classes for motion models (#9)
Al-khwarizmi-780 Apr 28, 2024
3aa4627
Feature/clang format 2 (#12)
Al-khwarizmi-780 Apr 28, 2024
f0f7e0e
add github workflow for cppcheck
Al-khwarizmi-780 May 2, 2024
190f920
adding some parameters
Al-khwarizmi-780 May 2, 2024
bbe1733
add execlusion
Al-khwarizmi-780 May 2, 2024
0be3dcc
fix
Al-khwarizmi-780 May 2, 2024
a6cc9a6
Update cppcheck.yml
Al-khwarizmi-780 May 2, 2024
b0d548f
change workflow for cppcheck
Al-khwarizmi-780 May 4, 2024
1255e79
exclude third_party folder from cppcheck
Al-khwarizmi-780 May 4, 2024
753246a
fix directory
Al-khwarizmi-780 May 4, 2024
0c677bb
possible fix for the cppcheck suppression
Al-khwarizmi-780 May 4, 2024
dd2df86
fix cppcheck command
Al-khwarizmi-780 May 4, 2024
84a59d5
change path in cppcheck command
Al-khwarizmi-780 May 4, 2024
df66360
trial
Al-khwarizmi-780 May 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .cache/clangd/index/dummy.cpp.DD0D404C08096709.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/gmock.cc.7B7156E1C8F7DCB6.idx
Binary file not shown.
Binary file added .cache/clangd/index/gmock.h.FC554658E402349F.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/gtest.h.2E26582C5003B303.idx
Binary file not shown.
Binary file added .cache/clangd/index/gtest.h.7834C5D7F7E0551B.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/main.cpp.5FF86FFF8A25C09C.idx
Binary file not shown.
Binary file added .cache/clangd/index/main.cpp.99565457C9CA84A0.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/main.cpp.CF0695BBBA04BD32.idx
Binary file not shown.
Binary file added .cache/clangd/index/main.cpp.FE3523E093B38467.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/types.h.12680B071987E97B.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/util.h.5FC91D830C8CFE03.idx
Binary file not shown.
28 changes: 28 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
BasedOnStyle: Microsoft
AccessModifierOffset: '-1'
AlignAfterOpenBracket: Align
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: 'Yes'
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: '80'
ContinuationIndentWidth: '4'
IncludeBlocks: Preserve
IndentPPDirectives: None
IndentWidth: '2'
Language: Cpp
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: None
PointerAlignment: Left
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: '2'
TabWidth: '4'
UseTab: Never

...
22 changes: 22 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'src'
exclude: 'third_party' # Exclude file paths containing "hello" or "world"
- check: 'tests'
exclude: '' # Nothing to exclude
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: '13'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
fallback-style: 'Microsoft' # optional
46 changes: 46 additions & 0 deletions .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on a single platform

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Eigen3
uses: kupns-aka-kupa/setup-eigen3@v1
with:
version: 3.4.0
env:
CMAKE_GENERATOR: ${{ matrix.gen }}

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

32 changes: 32 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: cppcheck-action
on: [push]

jobs:
build:
name: cppcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cppcheck
uses: deep5050/cppcheck-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
# check_library:
# skip_preprocessor:
# enable:
exclude_check: src/third_party
# inconclusive:
# inline_suppression:
# force_language:
# force:
# max_ctu_depth:
# platform:
# std:
# output_file:
# other_options:

- name: publish report
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'main' # your branch name goes here
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build
*build*
17 changes: 17 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang-14",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"editor.formatOnType": true,
"clang-format.executable": "${workspaceFolder}/.clang-format",
"clang-format.style": "file",
"clang-format.fallbackStyle": "Google",
"clang-format.language.cpp.enable": true,
}
52 changes: 52 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.4)

# ============================================================================================
# VCPKG Toolchain
# ============================================================================================
if(WIN32)
# use vcpkg as packages manager in windows platform
# environment variable needs to be added for the path to vcpkg installation "VCPKG_ROOT"
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
endif(WIN32)

# ============================================================================================
# ============================================================================================
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/package)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
set(BUILD_GTEST ON CACHE BOOL "" FORCE)

project(OpenKF)

set(INCLUDE_FOLDER "include")
set(LIBRARY_INSTALL_DIR "lib")
set(INCLUDE_INSTALL_DIR "${INCLUDE_FOLDER}/${PROJECT_NAME}")
set(CONFIG_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/cmake/${PROJECT_NAME}")
set(namespace "%{PROJECT_NAME}::")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")

enable_language(C CXX)

if (NOT MSVC)
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra")
endif(NOT MSVC)

if (MSVC)
# https://stackoverflow.com/a/18635749
add_compile_options(-MTd)
endif (MSVC)

find_package(Eigen3 3.3 REQUIRED NO_MODULE)

include(CTest)

add_subdirectory(src/third_party/googletest)
add_subdirectory(src/openkf)
add_subdirectory(src/examples)
add_subdirectory(tests)
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading
Loading