chore: Format code
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: git
|
name: git
|
||||||
description: >-
|
description: >-
|
||||||
Git workflow: commit message format, co-author trailers, tagging, and
|
Git workflow: commit message format, co-author trailers, tagging, and
|
||||||
branching conventions. Use when committing changes, creating release tags, or
|
branching conventions. Use when committing changes, creating release tags,
|
||||||
following branch naming rules.
|
or following branch naming rules.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Git Skill
|
# Git Skill
|
||||||
|
|||||||
@@ -33,23 +33,23 @@ document its configure, build, and test commands here.
|
|||||||
- **Naming:** `SCREAMING_SNAKE_CASE` only for macros and constants
|
- **Naming:** `SCREAMING_SNAKE_CASE` only for macros and constants
|
||||||
- **Header extensions:** C++ headers use `.hpp`, C headers use `.h`
|
- **Header extensions:** C++ headers use `.hpp`, C headers use `.h`
|
||||||
- Include order:
|
- Include order:
|
||||||
1. C++ standard library headers (`<chrono>`, `<vector>`, etc.)
|
1. C++ standard library headers (`<chrono>`, `<vector>`, etc.)
|
||||||
2. _(blank line)_
|
2. _(blank line)_
|
||||||
3. C standard library headers (`<stdlib.h>`, `<string.h>`, etc.)
|
3. C standard library headers (`<stdlib.h>`, `<string.h>`, etc.)
|
||||||
4. _(blank line)_
|
4. _(blank line)_
|
||||||
5. OS-specific headers (Windows API, POSIX, etc.)
|
5. OS-specific headers (Windows API, POSIX, etc.)
|
||||||
6. _(blank line)_
|
6. _(blank line)_
|
||||||
7. Third-party dependencies (`"fmt/core.h"`, etc.)
|
7. Third-party dependencies (`"fmt/core.h"`, etc.)
|
||||||
8. _(blank line)_
|
8. _(blank line)_
|
||||||
9. Local/project headers
|
9. Local/project headers
|
||||||
|
|
||||||
## Shell Scripts
|
## Shell Scripts
|
||||||
|
|
||||||
- Always use `#!/bin/sh` shebang for shell scripts
|
- Always use `#!/bin/sh` shebang for shell scripts
|
||||||
- Scripts must be POSIX compliant (no bashisms)
|
- Scripts must be POSIX compliant (no bashisms)
|
||||||
- When providing commands to users:
|
- When providing commands to users:
|
||||||
- Windows/PowerShell: use `` ` `` for line continuation
|
- Windows/PowerShell: use `` ` `` for line continuation
|
||||||
- Unix/Linux/macOS: use `\` for line continuation
|
- Unix/Linux/macOS: use `\` for line continuation
|
||||||
|
|
||||||
## Commit Messages
|
## Commit Messages
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ releases of the course material.
|
|||||||
|
|
||||||
- All markdown files are formatted with **oxfmt**
|
- All markdown files are formatted with **oxfmt**
|
||||||
- **Always run `npx oxfmt --write .` after editing any markdown file**
|
- **Always run `npx oxfmt --write .` after editing any markdown file**
|
||||||
- This is mandatory. Do not skip it. Run it before finishing your response
|
- This is mandatory. Do not skip it. Run it before finishing your response
|
||||||
- Use `npx oxfmt --check .` to verify formatting before committing
|
- Use `npx oxfmt --check .` to verify formatting before committing
|
||||||
- Config is in `.oxfmtrc.json` at the project root
|
- Config is in `.oxfmtrc.json` at the project root
|
||||||
- Do not manually fight the formatter. Let oxfmt handle spacing, line breaks,
|
- Do not manually fight the formatter. Let oxfmt handle spacing, line breaks,
|
||||||
|
|||||||
+5
-5
@@ -24,9 +24,9 @@ target_link_libraries(hello PRIVATE fmt::fmt)
|
|||||||
|
|
||||||
option(BUILD_TESTING OFF "Build Unity/CMock test suites")
|
option(BUILD_TESTING OFF "Build Unity/CMock test suites")
|
||||||
if (BUILD_TESTING AND NOT IS_EMSCRIPTEN)
|
if (BUILD_TESTING AND NOT IS_EMSCRIPTEN)
|
||||||
set(CMAKE_SKIP_TEST_ALL_DEPENDENCY FALSE)
|
set(CMAKE_SKIP_TEST_ALL_DEPENDENCY FALSE)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
find_package(Unity REQUIRED)
|
find_package(Unity REQUIRED)
|
||||||
find_package(CMock REQUIRED)
|
find_package(CMock REQUIRED)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user