diff --git a/.clang-format b/.clang-format index 0e7c0d5..7200764 100644 --- a/.clang-format +++ b/.clang-format @@ -1,77 +1,88 @@ --- -# BasedOnStyle: WebKit -AccessModifierOffset: -4 -AlignAfterOpenBracket: DontAlign -AlignConsecutiveAssignments: false +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: false +AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: false AlignEscapedNewlines: Right -AlignOperands: false -AlignTrailingComments: false +AlignOperands: true +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: All +AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: No +AlwaysBreakTemplateDeclarations: MultiLine BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: + AfterCaseLabel: false AfterClass: false AfterControlStatement: false AfterEnum: false - AfterFunction: true + AfterFunction: false AfterNamespace: false AfterObjCDeclaration: false AfterStruct: false AfterUnion: false + AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true -BreakBeforeBinaryOperators: All -BreakBeforeBraces: WebKit +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Stroustrup BreakBeforeInheritanceComma: false +BreakInheritanceList: BeforeColon BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false -BreakConstructorInitializers: BeforeComma +BreakConstructorInitializers: BeforeColon BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true -ColumnLimit: 0 +ColumnLimit: 160 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 -Cpp11BracedListStyle: false +Cpp11BracedListStyle: true +DeriveLineEnding: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: false -ForEachMacros: +FixNamespaceComments: true +ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH +IncludeBlocks: Preserve IncludeCategories: - - Regex: '^"config\.h"' - Priority: -1 - # The main header for a source file automatically gets category 0 - - Regex: '^<.*SoftLink.h>' - Priority: 4 - - Regex: '^".*SoftLink.h"' - Priority: 3 - - Regex: '^<.*>' + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 + SortPriority: 0 + - Regex: '^(<|"(gtest|gmock|isl|json)/)' + Priority: 3 + SortPriority: 0 - Regex: '.*' Priority: 1 + SortPriority: 0 IncludeIsMainRegex: '(Test)?$' +IncludeIsMainSourceRegex: '' IndentCaseLabels: false -IndentWidth: 4 +IndentGotoLabels: true +IndentPPDirectives: None +IndentWidth: 2 IndentWrappedFunctionNames: false JavaScriptQuotes: Leave JavaScriptWrapImports: true @@ -80,36 +91,46 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -ObjCBlockIndentWidth: 4 -ObjCSpaceAfterProperty: true +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakAssignment: 2 PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Left +PointerAlignment: Right ReflowComments: true SortIncludes: true SortUsingDeclarations: true SpaceAfterCStyleCast: false -SpaceAfterTemplateKeyword: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true -SpaceBeforeCpp11BracedList: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false +SpacesInConditionalStatement: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never ---- -Language: ObjC -PointerAlignment: Right -... +SpaceBeforeSquareBrackets: false +Standard: Latest +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 2 +UseCRLF: false +UseTab: ForIndentation +... \ No newline at end of file diff --git a/.github/issue_template/task-template.md b/.github/issue_template/task-template.md deleted file mode 100644 index 2c19a20..0000000 --- a/.github/issue_template/task-template.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Task template -about: 'Use this template when defining a new task in an issue. Make sure to fill - out all the fields. ' -title: "[TASK]" -labels: '' -assignees: '' - ---- - -**Time estimate:** XX hours -**Deadline:** DD.MONTH - -**Description of task:** DESCRIPTION - diff --git a/.github/workflows/clang-format-checker.yml b/.github/workflows/clang-format-checker.yml index 8ca33b8..28d0f4d 100644 --- a/.github/workflows/clang-format-checker.yml +++ b/.github/workflows/clang-format-checker.yml @@ -1,8 +1,13 @@ name: Check C++ code format with clang-format on: + push: + branches: [ main ] + workflow_dispatch: + pull_request: - branches: [main] + types: [opened, reopened] + branches: [ main ] jobs: clang-format: diff --git a/.github/workflows/clang-formatter.yml b/.github/workflows/clang-formatter.yml index 884e525..f787c4a 100644 --- a/.github/workflows/clang-formatter.yml +++ b/.github/workflows/clang-formatter.yml @@ -2,9 +2,12 @@ name: Format C++ code with clang-format on: push: - branches: [main] - # pull_request: - # branches: [main] + branches: [ main ] + workflow_dispatch: + + pull_request: + types: [opened, reopened] + branches: [ main ] jobs: clang-format: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 98adbd0..194b489 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,7 +3,12 @@ name: Publish Docker image to GHCR on: push: branches: [ main ] + workflow_dispatch: + pull_request: + types: [opened, reopened] + branches: [ main ] + env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} @@ -19,24 +24,6 @@ jobs: - name: Checkout own repository uses: actions/checkout@v3 - # vortex_msgs needs to be in the same location as the rest of the vortex-auv packages - - name: Checkout vortex_msgs - uses: actions/checkout@v3 - with: - repository: 'vortexntnu/vortex-msgs' - path: './vortex-msgs' - - name: Move vortex_msgs - run: mv ./vortex-msgs ../vortex-msgs - - # robot_localization needs to be in the same location as the rest of the vortex-auv packages - - name: Checkout robot_localization - uses: actions/checkout@v3 - with: - repository: 'vortexntnu/robot_localization' - path: './robot_localization' - - name: Move robot_localization - run: mv ./robot_localization ../robot_localization - - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: diff --git a/.github/workflows/python-format-checker.yml b/.github/workflows/python-format-checker.yml index ffe3bfe..cec7e5c 100644 --- a/.github/workflows/python-format-checker.yml +++ b/.github/workflows/python-format-checker.yml @@ -1,8 +1,13 @@ name: Check format of python code with black on: + push: + branches: [ main ] + workflow_dispatch: + pull_request: - branches: [main] + types: [opened, reopened] + branches: [ main ] jobs: lint: diff --git a/.github/workflows/python-formatter.yml b/.github/workflows/python-formatter.yml index aa69516..830a84e 100644 --- a/.github/workflows/python-formatter.yml +++ b/.github/workflows/python-formatter.yml @@ -2,8 +2,12 @@ name: Format python code with black on: push: - branches: [main] + branches: [ main ] + workflow_dispatch: + pull_request: + types: [opened, reopened] + branches: [ main ] jobs: lint: diff --git a/.gitignore b/.gitignore index 5d05913..a8ef3df 100644 --- a/.gitignore +++ b/.gitignore @@ -207,6 +207,7 @@ cython_debug/ # ROS devel/ +install/ logs/ build/ bin/ diff --git a/docker/Dockerfile b/docker/Dockerfile index 101fee6..6890e3a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ -FROM ros:noetic +FROM ros:humble -ARG distro=noetic +ARG distro=humble ENV DEBIAN_FRONTEND=noninteractive SHELL ["/bin/bash", "-c"]