Skip to content

Commit 587efdf

Browse files
committed
Add additional linters
1 parent 1dc5b09 commit 587efdf

30 files changed

+97
-79
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
BasedOnStyle: Chromium
33
IndentWidth: 4
44
ColumnLimit: 120
5-
AccessModifierOffset: -2
5+
AccessModifierOffset: -2

.github/workflows/ci.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ on:
77
- main
88

99
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Lint
15+
run: |
16+
make fmt
1017
build:
1118
runs-on: ubuntu-latest
1219
steps:
1320
- uses: actions/checkout@v4
1421
- name: Build
1522
run: |
16-
make
23+
make build
1724
- name: Archive
1825
uses: actions/upload-artifact@v4
1926
with:
2027
name: artifacts
2128
path: |
2229
build-artifacts/zephyr.uf2
2330
build-artifacts/zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json
24-

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-added-large-files
10+
11+
- repo: https://github.com/codespell-project/codespell
12+
rev: v2.4.1
13+
hooks:
14+
- id: codespell
15+
216
- repo: https://github.com/pre-commit/mirrors-clang-format
317
rev: v20.1.8
418
hooks:

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ endif()
1111
find_package(Zephyr HINTS "${CMAKE_CURRENT_LIST_DIR}/lib/zephyr-workspace")
1212
project(fprime-zephyr-reference C CXX)
1313

14-
# Put in an option to force the device back into programable state for automated testing
15-
option(FPRIME_CI_FAILSAFE_ENABLED "Cycle count before a forced reset to programable state" OFF)
14+
# Put in an option to force the device back into programmable state for automated testing
15+
option(FPRIME_CI_FAILSAFE_ENABLED "Cycle count before a forced reset to programmable state" OFF)
1616
if (FPRIME_CI_FAILSAFE_ENABLED)
1717
set(FPRIME_CI_FAILSAFE_CYCLE_COUNT 6000 CACHE STRING "Cycles before a forced reset")
1818
add_compile_definitions(FPRIME_CI_FAILSAFE_CYCLE_COUNT=${FPRIME_CI_FAILSAFE_CYCLE_COUNT})

CMakePresets.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"version": 4,
32
"configurePresets": [
43
{
5-
"name": "fprime-zephyr-teensy41",
6-
"displayName": "F´ Zephyr (teensy41)",
7-
"description": "F´ release build using local fprime-venv",
84
"binaryDir": "${sourceDir}/build-fprime-automatic-zephyr",
9-
"environment": {
10-
"VIRTUAL_ENV": "${fileDir}/fprime-venv",
11-
"PATH": "$env{VIRTUAL_ENV}/bin:$penv{PATH}"
12-
},
135
"cacheVariables": {
14-
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
6+
"BOARD": "teensy41",
157
"CMAKE_BUILD_TYPE": "Release",
16-
"BOARD": "teensy41"
8+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
179
},
18-
"toolchainFile": "${fileDir}/lib/fprime-zephyr/cmake/toolchain/zephyr.cmake",
19-
"generator": "Ninja"
10+
"description": "F\u00b4 release build using local fprime-venv",
11+
"displayName": "F\u00b4 Zephyr (teensy41)",
12+
"environment": {
13+
"PATH": "$env{VIRTUAL_ENV}/bin:$penv{PATH}",
14+
"VIRTUAL_ENV": "${fileDir}/fprime-venv"
15+
},
16+
"generator": "Ninja",
17+
"name": "fprime-zephyr-teensy41",
18+
"toolchainFile": "${fileDir}/lib/fprime-zephyr/cmake/toolchain/zephyr.cmake"
2019
}
21-
]
20+
],
21+
"version": 4
2222
}

FprimeZephyrReference/Components/Led/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ register_fprime_library(
2222
# DEPENDS
2323
# MyPackage_MyOtherModule
2424
)
25-

FprimeZephyrReference/Components/Led/Led.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ void Led ::SET_BLINK_INTERVAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 in
8484
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
8585
}
8686

87-
} // namespace Components
87+
} // namespace Components

FprimeZephyrReference/Components/Led/Led.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ module Components {
6464
telemetry port tlmOut
6565

6666
}
67-
}
67+
}

FprimeZephyrReference/Components/Led/Led.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ class Led : public LedComponentBase {
6868

6969
} // namespace Components
7070

71-
#endif
71+
#endif

FprimeZephyrReference/ReferenceDeployment/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#####
22
# 'ReferenceDeployment' Deployment:
33
#
4-
# This registers the 'ReferenceDeployment' deployment to the build system.
5-
# Custom components that have not been added at the project-level should be added to
4+
# This registers the 'ReferenceDeployment' deployment to the build system.
5+
# Custom components that have not been added at the project-level should be added to
66
# the list below.
77
#
88
#####

0 commit comments

Comments
 (0)