feat: add CI/CD workflows, clang-format, and clang-tidy#21
Merged
Conversation
- Add .clang-format (LLVM-based, 4-space indent, 100-col limit) - Add .clang-tidy with scoped bugprone/clang-analyzer/performance/ portability/readability checks, suppressing noise for C11 idioms - Add CI workflow (ci.yml): build+test and lint on PRs and main pushes - Add CD workflow (release.yml): GitHub Release on v*.*.* tag push - Apply clang-format to all source files for a clean baseline - Fix pipeline.c: math precedence parens and widening cast - Fix execute.c: remove dead store of glob_eligible - Add CI status badge to README.md
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI/CD automation and C/C++ formatting/linting configuration to enforce consistent style and quality checks, along with repository-wide clang-format reformatting and a few small source/test cleanups.
Changes:
- Added GitHub Actions CI workflow for build/test and lint (clang-format + clang-tidy).
- Added GitHub Actions release workflow to publish a built
shellartifact on semver tag pushes. - Introduced
.clang-format/.clang-tidyand reformatted existing C sources/tests to match.
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_pipeline.c | Formatting-only changes and include reordering in pipeline tests. |
| tests/test_input.c | Formatting-only changes to input-splitting tests and include ordering. |
| tests/test_glob.c | Formatting-only changes to glob expansion tests. |
| tests/test_framework.h | Reflowed assertion macros to match clang-format output. |
| tests/test_execute.c | Formatting-only changes and include reordering in execute tests. |
| tests/test_builtins.c | Formatting-only changes and minor readability reflow in builtins tests. |
| src/utils/utils.h | Formatting-only changes (spacing/wrapping). |
| src/utils/utils.c | Formatting-only changes (indentation/wrapping). |
| src/pipeline.c | Formatting and adjusted pipe FD allocation expression. |
| src/main.c | Formatting-only changes and include ordering. |
| src/input.c | Formatting-only changes and include ordering. |
| src/glob.c | Formatting-only changes and include ordering. |
| src/execute.c | Formatting and minor cleanup (removed unused local) in execute path. |
| src/builtins.c | Formatting-only changes and wrapping long initializer lines. |
| README.md | Added CI badge at top and reflowed content to match formatting baseline. |
| include/pipeline.h | Formatting-only changes. |
| include/input.h | Formatting-only changes. |
| include/glob_expand.h | Formatting-only changes. |
| include/execute.h | Formatting-only changes. |
| include/builtins.h | Formatting-only changes. |
| .github/workflows/release.yml | Added tag-triggered release workflow to build and attach build/shell. |
| .github/workflows/ci.yml | Added PR/push CI workflow with build/test and lint jobs. |
| .clang-tidy | Added clang-tidy checks configuration. |
| .clang-format | Added clang-format style configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CI gate on PRs and a CD release pipeline on tag push.
What's included
CI (.github/workflows/ci.yml)
CD (.github/workflows/release.yml)
Tooling config
Source changes
Verification
#20