Skip to content

Conversation

@davidlion
Copy link
Member

@davidlion davidlion commented Jun 9, 2025

Description

(This PR was split/refactored to depend on #142.)

Add tasks to run clang-tidy with an exclude list of all know files with issues (mimicking y-scope/clp#753). New PRs should attempt to resolve issues in their files and remove them from the exclude list.

A few other changes were needed to enable this:

  • Local base copy of .clang-format is removed as we now link to the copy in yscope-dev-utils.
  • Removed obsolete tools/init.sh script as config files are setup through task.
  • examples/CMakeLists.txt now generates compile_commands.json by default for clang-tidy to use.
  • Fix clang-tidy issues in examples/common.*pp otherwise *-cpp-static-examples will fail to run as no files are input to clang-tidy (since they are all excluded).

Updated and new public tasks (full list can be seen with task -a):

  • lint:check:
    • check-cpp
    • check-yaml
  • lint:check-cpp:
    • check-cpp-format-examples
    • check-cpp-format-log-surgeon
    • check-cpp-static-examples
    • check-cpp-static-log-surgeon
  • lint:check-cpp-format-examples: runs clang-format --dry-run on examples/
  • lint:check-cpp-format-log-surgeon: runs clang-format --dry-run on src/ and tests/
  • lint:check-cpp-static-examples (aliases: lint:fix-cpp-static-examples): runs clang-tidy on examples/
  • lint:check-cpp-static-log-surgeon (aliases: lint:fix-cpp-static-log-surgeon): runs clang-tidy on src/ and tests/
  • lint:check-yaml (aliases: lint:fix-yaml): runs yamllint
  • lint:fix:
    • fix-cpp
    • fix-yaml
  • lint:fix-cpp:
    • fix-cpp-format-examples
    • fix-cpp-format-log-surgeon
    • fix-cpp-static-examples
    • fix-cpp-static-log-surgeon
  • lint:fix-cpp-format-examples: runs clang-format -i on examples/
  • lint:fix-cpp-format-log-surgeon: runs clang-format -i on src/ and tests/

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

Tasks (and ci) passing.

Summary by CodeRabbit

  • Chores
    • Updated linting and build workflows to improve environment setup and tool installation.
    • Added and updated requirements for linting tools and build dependencies.
    • Modularized and expanded linting tasks for better maintainability.
    • Updated subproject reference for development utilities.
  • Documentation
    • Revised README to clarify build and linting requirements and instructions.
  • Refactor
    • Improved command-line argument handling in example programs for clarity and safety.
    • Updated function signatures in examples for consistency and const-correctness.
  • Style
    • Adjusted output formatting in examples for consistency.
  • Revert
    • Removed unused formatting configuration and initialization script.

@davidlion davidlion requested a review from a team as a code owner June 9, 2025 04:22
@coderabbitai
Copy link

coderabbitai bot commented Jun 9, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This set of changes restructures the project's linting and formatting infrastructure. It deletes the .clang-format and tools/init.sh files, updates the linting requirements to include clang-tidy, and extensively refactors taskfiles/lint.yaml to modularize and expand lint and fix tasks for different code areas. The GitHub Actions workflows for build and lint are updated to install necessary tools and ensure environment consistency. Several C++ example files are refactored to use std::vector<std::string> for argument handling, and some function signatures are updated accordingly. The README.md is revised to reflect new requirements and simplified linting instructions.

Changes

Cohort / File(s) Change Summary
Linting Infrastructure Overhaul
.clang-format, tools/init.sh, lint-requirements.txt, taskfiles/lint.yaml, tools/yscope-dev-utils
- Deleted .clang-format and tools/init.sh.
- Added clang-tidy>=20.1 to lint requirements.
- Major refactor of taskfiles/lint.yaml to modularize lint/fix tasks, add config management, and support new tools.
- Updated yscope-dev-utils submodule reference.
CI Workflow Updates
.github/workflows/build.yaml, .github/workflows/lint.yaml
- Added steps to install uv, set up Clang 20, and ensure required utilities in CI workflows for both build and lint jobs.
Documentation Update
README.md
- Added [uv] as a build requirement.
- Simplified and clarified linting instructions.
- Updated and removed some links.
C++ Example Refactors
examples/buffer-parser.cpp, examples/reader-parser.cpp, examples/common.cpp, examples/common.hpp
- Changed command-line argument handling to use std::vector<std::string> instead of raw argc/argv.
- Updated function signatures for check_input and process_logs to use const references.
- Minor formatting and header include changes.
CMake Build Config
examples/CMakeLists.txt
- Explicitly enabled CMAKE_EXPORT_COMPILE_COMMANDS for compile commands database generation.
Minor Source Update
src/log_surgeon/Token.cpp
- Added missing #include <algorithm>.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Taskfile Lint
    participant Clang-Format
    participant Clang-Tidy
    participant Yamllint

    Developer->>Taskfile Lint: Run check or fix tasks
    Taskfile Lint->>Clang-Format: Check/Format C++ (examples, log-surgeon)
    Taskfile Lint->>Clang-Tidy: Static analysis (examples, log-surgeon)
    Taskfile Lint->>Yamllint: Lint YAML/config files
    Clang-Format-->>Taskfile Lint: Formatting results
    Clang-Tidy-->>Taskfile Lint: Static analysis results
    Yamllint-->>Taskfile Lint: YAML lint results
    Taskfile Lint-->>Developer: Reports status and suggestions
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • SharafMohamed
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@davidlion davidlion requested a review from SharafMohamed June 9, 2025 13:54
SharafMohamed
SharafMohamed previously approved these changes Jun 10, 2025
@davidlion
Copy link
Member Author

@coderabbitai Please review.

@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@davidlion I'll review this PR for you. Let me gather information about the changes first.


🏁 Script executed:

#!/bin/bash
# Get information about this PR - what files were changed
git diff --name-only HEAD~1..HEAD

# Get the commit message(s) to understand the purpose
git log --oneline -5

# Get a high-level overview of what changed
git diff --stat HEAD~1..HEAD

Length of output: 452


🏁 Script executed:

#!/bin/bash
# Check git status and available branches
git status
git branch -a

# Check if there are any commits at all
git log --oneline -1 2>/dev/null || echo "No git history found"

# Get list of all files in the repository to understand the structure
find . -type f -name "*.cpp" -o -name "*.hpp" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.json" | head -20

# Check for common project files
ls -la

Length of output: 2070


🏁 Script executed:

#!/bin/bash
# Compare the current branch with main to see what changed
git diff main..HEAD --name-only

# Get a summary of changes
git diff main..HEAD --stat

# Get the actual diff for review
git diff main..HEAD

Length of output: 14211


@davidlion I've reviewed the changes in this PR. This is a significant refactoring of your linting and build infrastructure. Here's my comprehensive analysis:

Summary of Changes

This PR removes the local .clang-format configuration and introduces a new linting system that:

  • Uses external/shared linting configurations via yscope-dev-utils
  • Adds clang-tidy static analysis support
  • Refactors build tasks for better modularity
  • Introduces differential linting (only checking changed files)

📋 Detailed Review

Positive Changes

  1. Modular Build Tasks: The extraction of the generate task in build.yaml improves code reusability and follows the DRY principle.

  2. Enhanced Linting Capabilities: Adding clang-tidy will provide static analysis to catch potential bugs, performance issues, and code quality problems.

  3. Differential Linting: The check-cpp-diff task will make CI/CD faster by only checking changed files.

  4. Standardized Configuration: Moving to shared configurations via yscope-dev-utils promotes consistency across projects.

⚠️ Areas of Concern

  1. Complete Removal of Local .clang-format:

    • You're removing 161 lines of carefully configured formatting rules
    • This creates a hard dependency on the external yscope-dev-utils repository
    • Risk: If the external config is incompatible or unavailable, formatting will break
  2. Extensive Exclusion List: The check-cpp-static-full task excludes almost the entire codebase (24+ files):

    EXCLUDE_PATTERNS:
      - "{{.ROOT_DIR}}/src/log_surgeon/Buffer.hpp"
      - "{{.ROOT_DIR}}/src/log_surgeon/BufferParser.cpp"
      # ... 22+ more files
    • Concern: This suggests the codebase may not be ready for clang-tidy
    • Recommendation: Consider introducing clang-tidy gradually with fewer exclusions
  3. External Dependency: The new system relies heavily on tools/yscope-dev-utils/exports/:

    • Risk: Build failures if this submodule is missing or incompatible
    • Recommendation: Ensure the dependency is properly documented and versioned

🔍 Technical Questions

  1. Configuration Compatibility: How do you ensure the external .clang-format config maintains the same formatting standards as your deleted local config?

  2. CI/CD Impact: Have you tested that the new linting tasks work correctly in your CI environment?

  3. Developer Workflow: How will developers know what formatting/linting rules are being applied without a local config file?

📝 Recommendations

  1. Gradual Migration: Consider keeping a minimal local .clang-format as a fallback while transitioning to the external system.

  2. Documentation: Update the README or contributing guidelines to explain the new linting setup and external dependencies.

  3. Reduce Exclusions: Create a plan to gradually reduce the clang-tidy exclusion list rather than excluding most of the codebase.

  4. Verification Script: Add a task to verify that external dependencies are available before running linting tasks.

🎯 Overall Assessment

This is a well-intentioned modernization of your linting infrastructure, but it's quite aggressive in removing local configurations. The changes will improve code quality in the long term, but consider a more gradual migration approach to reduce risk.

Recommendation: ✅ Approve with suggestions - The direction is good, but consider implementing some of the risk mitigation strategies mentioned above.

Would you like me to help you create a migration plan or address any of these concerns?

@davidlion
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
taskfiles/build.yaml (1)

114-127: Optional: expose generate under a clearer name

generate is currently internal but referenced externally as build:generate. Renaming it to something like cmake-generate (and keeping it internal) would make intent unmistakable and avoid confusion with other potential “generate” helpers down the road.

taskfiles/lint.yaml (4)

50-69: check-cpp-static-diff hard-codes a debug build

Using a single configuration is fine, but if contributors compile with release only, the compilation database (compile_commands.json) may be stale and clang-tidy findings inaccurate. Consider parameterising build type or documenting the requirement to keep the debug build up-to-date.


70-132: Huge exclude list risks hiding regressions

check-cpp-static-full skips 40+ source files. While understandable during migration, it risks entrenching unchecked code.

Propose adding a CI warning whenever the exclude list grows and encouraging PR authors to “touch” excluded files to clean them up incrementally.


133-149: Yamllint targets .clang-format, which may not be YAML

Linting .clang-format with yamllint will flag non-YAML syntax. Unless the external config is actually YAML-based, you may want to drop that file from the list or switch to clang-format-style-options validation.


179-182: Ensure symlink-cpp-lint-configs.sh is idempotent

Repeated runs of lint tasks should not fail if the symlink already exists. A quick ln -sf in the script would guarantee that.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34620c8 and aaa4b04.

📒 Files selected for processing (4)
  • .clang-format (0 hunks)
  • lint-requirements.txt (1 hunks)
  • taskfiles/build.yaml (2 hunks)
  • taskfiles/lint.yaml (2 hunks)
💤 Files with no reviewable changes (1)
  • .clang-format
⏰ 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). (1)
  • GitHub Check: build (macos-15, debug)
🔇 Additional comments (5)
taskfiles/build.yaml (1)

83-86: 👍 Build task now cleanly depends on generate

Switching the build task to depend on an internal generate step separates configuration from compilation and improves reuse (lint tasks can now call build:generate directly). No concerns here.

taskfiles/lint.yaml (4)

4-6: Good call including the build taskfile

Linking the build Taskfile lets lint tasks bootstrap CMake without duplicating logic. Looks solid.


13-14: Verify that tools/yscope-dev-utils is always present

G_UTILS_CONFIGS_DIR assumes the submodule (or vendored copy) is checked out. If a user clones with --depth 1 and forgets submodules, every lint task will fail.

Add a short pre-flight check (or documentation note) reminding contributors to fetch submodules.


31-49: Reference to .clang-format may be stale

check-cpp-format lists {{.ROOT_DIR}}/.clang-format in sources, but the PR deletes that file and relies on the symlink script. If the symlink fails (e.g., before cpp-lint-configs runs) the taskfile checksum logic could break.

Confirm that symlink-cpp-lint-configs.sh executes early enough and that the resulting link satisfies the sources watcher.


167-178: fix-cpp-format correctly invokes in-place formatting

Nice touch using -i here while check-cpp-format stays read-only. This keeps the interface symmetrical with other fix/check pairs.

@davidlion davidlion requested a review from kirkrodrigues July 12, 2025 02:42
@davidlion davidlion changed the title ci: Add tasks for linting with clang-tidy; Refactor tasks for linting C++ files. ci: Add tasks for linting with clang-tidy; Refactor tasks for linting C++ files (resolves #64). Jul 23, 2025
@davidlion davidlion requested a review from SharafMohamed August 1, 2025 15:49
@davidlion
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Aug 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aaa4b04 and 3ba6934.

📒 Files selected for processing (12)
  • .github/workflows/build.yaml (1 hunks)
  • .github/workflows/lint.yaml (1 hunks)
  • README.md (3 hunks)
  • examples/CMakeLists.txt (1 hunks)
  • examples/buffer-parser.cpp (2 hunks)
  • examples/common.cpp (2 hunks)
  • examples/common.hpp (1 hunks)
  • examples/reader-parser.cpp (2 hunks)
  • src/log_surgeon/Token.cpp (1 hunks)
  • taskfiles/lint.yaml (2 hunks)
  • tools/init.sh (0 hunks)
  • tools/yscope-dev-utils (1 hunks)
💤 Files with no reviewable changes (1)
  • tools/init.sh
✅ Files skipped from review due to trivial changes (5)
  • src/log_surgeon/Token.cpp
  • tools/yscope-dev-utils
  • README.md
  • .github/workflows/build.yaml
  • .github/workflows/lint.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • examples/common.hpp
  • examples/common.cpp
  • examples/buffer-parser.cpp
  • examples/reader-parser.cpp
🧠 Learnings (3)
📚 Learning: in `src/log_surgeon/finite_automata/regexnfastate.hpp`, the constructor `regexnfastate(std::set
Learnt from: SharafMohamed
PR: y-scope/log-surgeon#48
File: src/log_surgeon/finite_automata/RegexNFAState.hpp:0-0
Timestamp: 2024-11-13T20:02:13.737Z
Learning: In `src/log_surgeon/finite_automata/RegexNFAState.hpp`, the constructor `RegexNFAState(std::set<Tag const*> tags, RegexNFAState const* dest_state)` has been updated to use `std::vector<Tag const*> tags` instead of `std::set`.

Applied to files:

  • examples/common.hpp
  • examples/common.cpp
  • examples/buffer-parser.cpp
  • examples/reader-parser.cpp
📚 Learning: in the `log_surgeon` project, header guards in c++ header files should include `_hpp` at the end to ...
Learnt from: SharafMohamed
PR: y-scope/log-surgeon#56
File: src/log_surgeon/finite_automata/RegisterHandler.hpp:0-0
Timestamp: 2024-11-27T21:56:13.425Z
Learning: In the `log_surgeon` project, header guards in C++ header files should include `_HPP` at the end to match the filename. For example, in `RegisterHandler.hpp`, the header guard should be `LOG_SURGEON_FINITE_AUTOMATA_REGISTER_HANDLER_HPP`.

Applied to files:

  • examples/common.hpp
📚 Learning: cmake's find_package() command automatically honors _root variables (e.g., log_surgeon_...
Learnt from: davidlion
PR: y-scope/log-surgeon#142
File: taskfiles/examples.yaml:63-76
Timestamp: 2025-07-22T02:00:47.620Z
Learning: CMake's find_package() command automatically honors <PackageName>_ROOT variables (e.g., LOG_SURGEON_ROOT) during its search process. The CMakeLists.txt file does not need to explicitly reference these _ROOT variables - they are built into CMake's package discovery mechanism.

Applied to files:

  • examples/CMakeLists.txt
🔇 Additional comments (15)
examples/CMakeLists.txt (1)

4-9: LGTM! Enables compile commands export for tooling support.

This change correctly enables the generation of compile_commands.json, which is essential for clang-tidy and other static analysis tools to function properly. The implementation follows CMake best practices with proper caching and descriptive documentation.

taskfiles/lint.yaml (3)

3-12: LGTM! Improved modular structure with internal taskfile includes.

The inclusion of separate taskfiles for examples and log-surgeon with internal scope improves modularity and follows the DRY principle. This structure will make maintenance easier and allows for better separation of concerns.


204-206: LGTM! Symlink configuration approach provides flexibility.

The cpp-lint-configs internal task that creates symlinks to external configurations is a good approach. It allows for centralized configuration management while maintaining local accessibility.


17-17: Verify external dependency availability during linting tasks.

The heavy reliance on tools/yscope-dev-utils/exports/lint-configs creates a potential point of failure if the external repository is unavailable or incompatible.

Consider adding a verification task to ensure external dependencies are available before running linting tasks:

#!/bin/bash
# Verify that required external lint configurations are available
if [[ ! -f "tools/yscope-dev-utils/exports/lint-configs/.clang-tidy" ]]; then
    echo "Error: External lint configurations not found"
    echo "Please ensure yscope-dev-utils submodule is properly initialized"
    exit 1
fi
examples/common.hpp (2)

4-4: LGTM! Addition of cstdint header for explicit type definitions.

Adding the <cstdint> header ensures explicit availability of standard integer types, which is a good practice for portability and clarity.


10-10: LGTM! Modernized function signature improves type safety.

The change from (int argc, char* argv[]) to (std::vector<std::string> const& args) is an excellent modernization that:

  • Improves type safety by using std::string instead of raw char pointers
  • Uses const reference for efficiency and immutability
  • Follows modern C++ best practices
examples/buffer-parser.cpp (2)

17-17: LGTM! Improved const correctness for schema_path parameter.

Changing the parameter from string& to string const& prevents accidental modification of the input and follows const correctness best practices.


94-98: LGTM! Modernized argument handling with std::vector.

The conversion from raw argc/argv to std::vector<std::string> is an excellent modernization that:

  • Improves type safety by using std::string instead of char*
  • Correctly excludes the program name using argv + 1
  • Makes argument access cleaner and more readable
  • Aligns with the updated check_input function signature
examples/reader-parser.cpp (2)

16-16: LGTM! Improved const correctness for schema_path parameter.

The change to string const& prevents accidental modification and follows const correctness best practices, consistent with the modernization in buffer-parser.cpp.


63-67: LGTM! Consistent modernization of argument handling.

The conversion to std::vector<std::string> maintains consistency with the changes in buffer-parser.cpp and provides the same benefits:

  • Type safety with std::string
  • Clean argument access via vector indexing
  • Proper exclusion of program name
examples/common.cpp (5)

3-3: LGTM: Include addition is appropriate.

The <cstdint> include is correctly added to support the uint32_t type used in the print_timestamp_loglevel function parameter.


10-10: LGTM: Include addition aligns with function usage.

The <log_surgeon/Token.hpp> include is properly added to support the Token type usage in the print_timestamp_loglevel function.


15-31: Excellent refactoring: Function signature modernisation is well-implemented.

The refactoring from traditional int argc, char* argv[] to std::vector<std::string> const& is executed correctly:

  • Parameter validation properly uses args.size() instead of argc
  • File path access correctly uses args[0] and args[1] instead of argv[1] and argv[2]
  • The logic maintains identical functionality while providing better type safety
  • Follows the coding guideline by using false == filesystem::exists(f) instead of !filesystem::exists(f)

This change aligns with the coordinated updates mentioned in the AI summary across other example files.


19-29: LGTM: Output formatting consistency improvement.

The change from endl to \n is appropriate as it:

  • Eliminates unnecessary buffer flushing for better performance
  • Maintains consistent formatting throughout the function
  • Aligns with modern C++ best practices for simple line breaks

49-49: LGTM: Consistent output formatting.

The change from endl to \n maintains consistency with the formatting changes made throughout the file and improves performance by avoiding unnecessary buffer flushes.

@davidlion davidlion changed the title ci: Add tasks for linting with clang-tidy; Refactor tasks for linting C++ files (resolves #64). feat(lint): Add tasks for linting with clang-tidy; Refactor tasks for linting C++ files (resolves #64). Aug 4, 2025
@davidlion davidlion changed the title feat(lint): Add tasks for linting with clang-tidy; Refactor tasks for linting C++ files (resolves #64). feat(lint): Add tasks for linting C++ files with clang-tidy; Refactor tasks for linting C++ files (resolves #64). Aug 4, 2025
* [fmt] >= 8.0.1
* [GSL] >= 4.0.0
* [Task] >= 3.38
* [uv] >= 0.7.10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't match the version being installed. Is it suppose to be 0.8.4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should reflect the minimum required version to work (uv in-particular is inherited from dev-utils). For CI we just use the latest stable so that we pick up any new changes. Ideally, we tested both sides (minimum and maximum versions), but it is awkward to setup.

Comment on lines 90 to +93
* [fmt] >= 8.0.1
* [GSL] >= 4.0.0
* [Task] >= 3.38
* [uv] >= 0.7.10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to reflect the llvm clang-tidy 20 install?

@davidlion davidlion requested a review from SharafMohamed August 5, 2025 01:20
@davidlion davidlion merged commit 30fc5bc into y-scope:main Aug 5, 2025
10 checks passed
@davidlion davidlion deleted the clang-tidy branch August 5, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants