ci: Use parallelized clang-tidy task from yscope-dev-utils. - #97
Conversation
WalkthroughThis pull request modifies two configuration files related to linting. The GitHub Actions workflow now runs the lint command with the Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant LintJob as Lint Job
participant Shell as Command Executor
participant Nproc as nproc Utility
participant Clang as Clang-Tidy
GH->>LintJob: Trigger linting workflow
LintJob->>Shell: Execute "task lint:check -C $(nproc)"
Shell->>Nproc: Request number of CPU cores
Nproc-->>Shell: Return core count
Shell->>LintJob: Run lint operations concurrently based on core count
LintJob->>Clang: Invoke :utils:cpp-lint:clang-tidy-find with updated parameters
Clang-->>LintJob: Return lint results
LintJob-->>GH: Report lint outcomes
Possibly related PRs
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lint-tasks.yaml (1)
82-96: Consolidated Clang-Tidy Task ConfigurationThe updated
cpp-static-checktask now consolidates multiple clang-tidy runs into a single unified task (:utils:cpp-lint:clang-tidy-find). Using the shared anchor*cpp_source_filesfor both thesourcesandROOT_PATHSfields improves consistency and maintainability. Additionally, breaking out the clang-tidy flags into a list (for example,"--config-file '{{.ROOT_DIR}}/.clang-tidy'"and"-p '{{.G_SPIDER_COMPILE_COMMANDS_DB}}'") clarifies the configuration.As a minor point, please double-check the nested quoting in the
FLAGSentries to ensure the intended parameters are correctly interpreted by clang-tidy in the execution environment.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/code-linting-checks.yaml(1 hunks)lint-tasks.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: lint
- GitHub Check: non-storage-unit-tests (ubuntu-22.04)
- GitHub Check: non-storage-unit-tests (ubuntu-24.04)
🔇 Additional comments (1)
.github/workflows/code-linting-checks.yaml (1)
52-52: Efficient Parallelisation for Clang-Tidy LintingThe change on line 52 to invoke
task lint:check -C $(nproc)effectively leverages all available CPU cores, which should significantly reduce the overall linting time. This modification aligns directly with the PR objective of enhancing CI efficiency.
yscope-dev-utilsyscope-dev-utils.
Description
Currently a run of clang-tidy on all files take at least 70 minutes in GitHub workflow. This pr change the lint task file to use the parallelized clang-tidy provided by latest
yscope-dev-utils.Checklist
breaking change.
Validation performed
Summary by CodeRabbit