Skip to content

Commit 5bb1533

Browse files
committed
Add instruction for a precommit hook to automatically clang-tidy the codebase before each commit.
1 parent 207a6eb commit 5bb1533

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# TARS Flight Software Repository
2-
Illinois Space Society's flight software codebase for the TARS system.
3-
4-
<div align="center">
5-
<a href="https://www.youtube.com/watch?v=OQC60KljR3A"><img src="https://img.youtube.com/vi/OQC60KljR3A/0.jpg"></img></a><br>
6-
<i>Click to see a cool video!</i>
2+
Illinois Space Society's flight software codebase for the TARS system.
3+
4+
<div align="center">
5+
<a href="https://www.youtube.com/watch?v=OQC60KljR3A"><img src="https://img.youtube.com/vi/OQC60KljR3A/0.jpg"></img></a><br>
6+
<i>Click to see a cool video!</i>
77
</div>
88

99
### Directory Structure:
10-
- `TARS/`: Mission critical flight software running on TARS. This is the code that actually flies on the rocket
11-
- `src/`: All the flight code that we write ourselves is in this directory.
12-
- `common/`: Utility code we write that is used across microcontrollers.
13-
- `mcu_main/`: Code for the primary microcontroller on TARS (Teensy 4.1)
14-
- `mcu_telemetry/`: Code for the microcontroller in charge of telemetry and GPS (ESP32-S3)
15-
- `mcu_power`: Code for the microcontroller on the power board (ATMega328P)
10+
- `TARS/`: Mission critical flight software running on TARS. This is the code that actually flies on the rocket
11+
- `src/`: All the flight code that we write ourselves is in this directory.
12+
- `common/`: Utility code we write that is used across microcontrollers.
13+
- `mcu_main/`: Code for the primary microcontroller on TARS (Teensy 4.1)
14+
- `mcu_telemetry/`: Code for the microcontroller in charge of telemetry and GPS (ESP32-S3)
15+
- `mcu_power`: Code for the microcontroller on the power board (ATMega328P)
1616
- `lib/`: Third-party libraries that are not available on the PlatformIO Registry. Other libraries are included via the `lib_deps` build flag in `platformio.ini`
1717
- `ground/`: Code running on ground station hardware (Adafruit LoRa Feather)
1818

@@ -72,3 +72,5 @@ Things to keep in mind about code formatting:
7272
- Exempt directories should be listed in `.clang-format-ignore` so they don't get auto-formatted by the script.
7373
- Exempt directories should also be listed in `.github/workflows/clang_format_check.yml` on the lines with `exclude:`, so they're not checked for style violations by GitHub.
7474
- Changing/tweaking the style guide is always option! If you have ideas, reach out!
75+
76+
- You can copy the file tools/precommit to .git/hooks with the command `cp tools/pre-commit .git/hooks/pre-commit` to automatically run clang tidy before committing.

tools/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python run_clang_format.py -r -i .

0 commit comments

Comments
 (0)