Skip to content

Commit 7896772

Browse files
authored
Merge pull request #1 from PickNikRobotics/pr-add-minimal-ci
Add minimal CI & config files
2 parents 01bb591 + 8837e13 commit 7896772

File tree

8 files changed

+228
-0
lines changed

8 files changed

+228
-0
lines changed

.clang-format

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
BasedOnStyle: Google
3+
ColumnLimit: 120
4+
MaxEmptyLinesToKeep: 1
5+
6+
# Allow us to adhere to https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
7+
IncludeBlocks: Preserve
8+
SortIncludes: true
9+
10+
Standard: Auto
11+
IndentWidth: 2
12+
TabWidth: 2
13+
UseTab: Never
14+
AccessModifierOffset: -2
15+
ConstructorInitializerIndentWidth: 2
16+
NamespaceIndentation: None
17+
ContinuationIndentWidth: 4
18+
IndentCaseLabels: true
19+
IndentFunctionDeclarationAfterType: false
20+
21+
AlignEscapedNewlinesLeft: false
22+
AlignTrailingComments: true
23+
24+
AllowAllParametersOfDeclarationOnNextLine: false
25+
ExperimentalAutoDetectBinPacking: false
26+
ObjCSpaceBeforeProtocolList: true
27+
Cpp11BracedListStyle: false
28+
29+
AllowShortBlocksOnASingleLine: true
30+
AllowShortIfStatementsOnASingleLine: false
31+
AllowShortLoopsOnASingleLine: false
32+
AllowShortFunctionsOnASingleLine: None
33+
AllowShortCaseLabelsOnASingleLine: false
34+
35+
AlwaysBreakTemplateDeclarations: true
36+
AlwaysBreakBeforeMultilineStrings: false
37+
BreakBeforeBinaryOperators: false
38+
BreakBeforeTernaryOperators: false
39+
BreakConstructorInitializersBeforeComma: true
40+
41+
BinPackParameters: true
42+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
43+
DerivePointerBinding: false
44+
PointerBindsToType: true
45+
46+
PenaltyExcessCharacter: 50
47+
PenaltyBreakBeforeFirstCallParameter: 30
48+
PenaltyBreakComment: 1000
49+
PenaltyBreakFirstLessLess: 10
50+
PenaltyBreakString: 100
51+
PenaltyReturnTypeOnItsOwnLine: 50
52+
53+
SpacesBeforeTrailingComments: 2
54+
SpacesInParentheses: false
55+
SpacesInAngles: false
56+
SpaceInEmptyParentheses: false
57+
SpacesInCStyleCastParentheses: false
58+
SpaceAfterCStyleCast: false
59+
SpaceAfterControlStatementKeyword: true
60+
SpaceBeforeAssignmentOperators: true
61+
62+
# Configure each individual brace in BraceWrapping
63+
BreakBeforeBraces: Custom
64+
65+
# Control of individual brace wrapping cases
66+
BraceWrapping:
67+
AfterCaseLabel: true
68+
AfterClass: true
69+
AfterControlStatement: true
70+
AfterEnum: true
71+
AfterFunction: true
72+
AfterNamespace: true
73+
AfterStruct: true
74+
AfterUnion: true
75+
BeforeCatch: true
76+
BeforeElse: true
77+
IndentBraces: false
78+
IncludeBlocks: Preserve
79+
...

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Add Git LFS support for common 3D file formats
2+
*.onnx filter=lfs diff=lfs merge=lfs -text
3+
*.stl filter=lfs diff=lfs merge=lfs -text
4+
*.STL filter=lfs diff=lfs merge=lfs -text
5+
*.obj filter=lfs diff=lfs merge=lfs -text
6+
*.fbx filter=lfs diff=lfs merge=lfs -text
7+
*.dae filter=lfs diff=lfs merge=lfs -text
8+
*.gltf filter=lfs diff=lfs merge=lfs -text
9+
*.glb filter=lfs diff=lfs merge=lfs -text
10+
*.ply filter=lfs diff=lfs merge=lfs -text
11+
*.3ds filter=lfs diff=lfs merge=lfs -text
12+
*.blend filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
install/
3+
log/
4+
.ccache/

.pre-commit-config.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
repos:
15+
# Standard hooks
16+
- repo: https://github.com/pre-commit/pre-commit-hooks
17+
rev: v3.4.0
18+
hooks:
19+
- id: check-ast
20+
- id: check-case-conflict
21+
- id: check-docstring-first
22+
- id: check-merge-conflict
23+
- id: check-symlinks
24+
- id: check-yaml
25+
args: ["--unsafe"] # Fixes errors parsing custom YAML constructors like ur_description's !degrees
26+
- id: debug-statements
27+
- id: end-of-file-fixer
28+
exclude: (\.(svg|stl|dae))$
29+
- id: mixed-line-ending
30+
- id: fix-byte-order-marker
31+
32+
- repo: https://github.com/psf/black
33+
rev: 22.3.0
34+
hooks:
35+
- id: black
36+
37+
- repo: https://github.com/codespell-project/codespell
38+
rev: v2.0.0
39+
hooks:
40+
- id: codespell
41+
args: ["--write-changes", "-L", "atleast,inout,ether"] # Provide a comma-separated list of misspelled words that codespell should ignore (for example: '-L', 'word1,word2,word3').
42+
exclude: \.(svg|pyc|stl|dae|lock)$
43+
44+
- repo: https://github.com/pre-commit/mirrors-clang-format
45+
rev: v14.0.6
46+
hooks:
47+
- id: clang-format
48+
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|m|proto|vert)$
49+
# -i arg is included by default by the hook
50+
args: ["-fallback-style=none"]
51+
52+
- repo: https://github.com/adrienverge/yamllint
53+
rev: v1.27.1
54+
hooks:
55+
- id: yamllint
56+
args:
57+
[
58+
"--no-warnings",
59+
"--config-data",
60+
"{extends: default, rules: {line-length: disable, braces: {max-spaces-inside: 1}, indentation: {spaces: consistent, indent-sequences: whatever}}}",
61+
]
62+
types: [text]
63+
files: \.(yml|yaml)$
64+
65+
- repo: https://github.com/tcort/markdown-link-check
66+
rev: v3.10.3
67+
hooks:
68+
- id: markdown-link-check
69+
70+
# NOTE: Broken on arm64. Will need to bump once https://github.com/hadolint/hadolint/issues/840 is fixed.
71+
- repo: https://github.com/hadolint/hadolint
72+
rev: v2.10.0
73+
hooks:
74+
- id: hadolint-docker
75+
76+
- repo: https://github.com/pre-commit/mirrors-prettier
77+
rev: "v3.1.0"
78+
hooks:
79+
# Use Prettier to lint XML files because, well.. its rules are prettier than most linters, as the name implies.
80+
# Also we use it in the UI, so it's familiar.
81+
- id: prettier
82+
additional_dependencies:
83+
- "prettier@3.1.0"
84+
- "@prettier/plugin-xml@3.3.1"
85+
files: \.(xml)$

.prettierrc.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: [require.resolve("@prettier/plugin-xml")],
3+
xmlWhitespaceSensitivity: "ignore",
4+
xmlQuoteAttributes: "double"
5+
}

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Any contribution that you make to this repository will
2+
be under the 3-Clause BSD License, as dictated by that
3+
[license](https://opensource.org/licenses/BSD-3-Clause).
4+
5+
# Contributing to this Repository
6+
7+
Thanks for getting involved! If you want to add to this repository, please reach out to support@picknik.ai.

colcon-defaults.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contains colcon default settings for user overlay containers.
2+
build:
3+
# Enable this for bidirectional syncing from the UI
4+
symlink-install: true
5+
mixin:
6+
# Enable ccache support
7+
- ccache
8+
# Multithreaded linker to speed up linking step during compilation
9+
- lld
10+
- compile-commands
11+
# Debug info and build testing for dev workflows
12+
- rel-with-deb-info
13+
- build-testing-on
14+
- coverage-gcc
15+
- coverage-pytest
16+
test:
17+
event-handlers:
18+
- console_direct+
19+
- desktop_notification+

workflows/format.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Format
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
pre-commit:
12+
name: pre-commit
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-python@v3
17+
- uses: pre-commit/action@v3.0.0

0 commit comments

Comments
 (0)