-
Notifications
You must be signed in to change notification settings - Fork 9
refactor(lint-configs): Extract symlink_config
from symlink-cpp-lint-configs.sh
as a helper script.
#86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds a new Bash script to create relative symlinks for config files at the repo root and updates the C++ lint symlink script to delegate to this new utility for .clang-format and .clang-tidy. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant Cpp as symlink-cpp-lint-configs.sh
participant Util as symlink-config.sh
note over Dev,Cpp: Trigger C++ lint config symlinking
Dev->>Cpp: Run script
loop For each config (.clang-format, .clang-tidy)
Cpp->>Util: symlink-config.sh <config-path>
activate Util
Util->>Util: Validate args and source file
Util->>Util: Compute repo root and relative target
alt Destination missing
Util->>Util: Create relative symlink
Util-->>Cpp: Success message
else Destination exists
alt Correct symlink
Util-->>Cpp: Already correctly symlinked
else Conflict (file/other symlink)
Util-->>Cpp: Error and non-zero exit
end
end
deactivate Util
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
exports/lint-configs/symlink-config.sh
(1 hunks)exports/lint-configs/symlink-cpp-lint-configs.sh
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
exports/lint-configs/symlink-config.sh (1)
exports/lint-configs/symlink-cpp-lint-configs.sh (1)
main
(11-14)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: unit-tests (ubuntu-24.04)
- GitHub Check: unit-tests (ubuntu-22.04)
🔇 Additional comments (2)
exports/lint-configs/symlink-config.sh (1)
11-52
: Request macOS verification Validate that the script works on macOS (BSDreadlink
lacks-f
) by running the same smoke test there.exports/lint-configs/symlink-cpp-lint-configs.sh (1)
12-13
: Approve changes: helper script is executable Verified thatexports/lint-configs/symlink-config.sh
exists and has the execute bit set.
Description
As we will introduce linting configs for Rust,
symlink_config
will be reused in another script calledsymlink-rust-lint-configs.sh
. This PR extracts the helper into a single helper shell script for code sharing.Checklist
breaking change.
Validation performed
Did the following tests:
Summary by CodeRabbit