Skip to content

feat(taskfile): Add taskfile support for building examples; Add taskfile support for building debug and release versions; Refactor taskfiles towards meeting the current guidelines. #70

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

Open
wants to merge 116 commits into
base: main
Choose a base branch
from

Conversation

davidlion
Copy link
Member

@davidlion davidlion commented Jul 24, 2025

Description

This PR refactors the following:

  • Change tasks from using wildcards to determine the target to build to using the ystdlib_LIBRARIES CMake variable (introduced in build(cmake)!: Add support for installation and usage as a library in other CMake projects; Add example project to test this use case. #65).

    • Previously, tasks could only specify an individual library/target or all libraries through a task wildcard. With the addition of the CMake variable we can now set it to support building/testing a subset of libraries.
  • Restructures the taskfiles (and therefore namespace):

    • :build: -> :ystdlib: for tasks building/cleaning/installing ystdlib or its libraries.
    • :test-* -> :test:run-* for tasks building/running the ystdlib tests.
  • Rename the following tasks to the verb-* pattern:

    • deps:boost -> deps:install-boost
    • deps:Catch2 -> deps:install-catch2
    • lint:cmake-check -> lint:check-cmake
    • lint:cpp-check -> lint:check-cpp
    • lint:yaml-check -> lint:check-yaml
    • lint:cmake-fix -> lint:fix-cmake
    • lint:cpp-fix -> lint:fix-cpp
    • lint:yaml-fix -> lint:fix-yaml
  • Migrate partially to IWYU style includes.

    • The current flattened lint.yaml structure breaks with multiple definitions of taskfiles, so it is left alone.
    • To support this in deps.yaml we bump the yscope-dev-utils submodule to pull in a fix related to dir usage in the boost tasks.

New features added in this PR:

  • Tasks to build the examples as previously this had to be done through CMake.
  • New tasks were adding to support choosing between build or release versions of ystdlib and the examples.
    • e.g. task ystdlib:build-debug, task test:run-release, task examples:build-debug
    • Run task -a for a full list.

Note for reviewer:
The diff for the changes to ystdlib.yaml (build.yaml) can be found here: e4d8ef0. Github combines these changes with the move/rename making it appear completely new.

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

New tasks tested manually and passing in CI.

Summary by CodeRabbit

  • New Features

    • Added new Taskfiles for building, testing, and managing the standard library and examples, supporting debug/release modes and selective builds.
    • Introduced streamlined commands for building, installing, and testing via Task, including specifying subsets of libraries.
    • Added new requirements and improved documentation for setup and usage, including [uv] dependency.
  • Bug Fixes

    • Updated workflow to fix compilation issues by running unit tests in debug mode only.
  • Refactor

    • Renamed and reorganized linting and build tasks for consistency and clarity.
    • Removed deprecated and redundant Taskfiles and variables.
    • Standardized task naming conventions across Taskfiles.
  • Chores

    • Updated GitHub Actions workflows to install new dependencies and expand test matrix.
    • Updated subproject reference for development utilities.
  • Documentation

    • Expanded and clarified build, install, and test instructions in README files.

@davidlion davidlion requested a review from a team as a code owner July 24, 2025 23:16
Copy link

coderabbitai bot commented Jul 24, 2025

## Walkthrough

This update restructures the project's build, test, and lint automation using Taskfiles, introduces new and refactored Taskfiles for modularity, updates dependency management to use shared utilities, and revises GitHub Actions workflows for matrix builds and uv installation. Documentation is expanded for clarity, and submodule references are updated.

## Changes

| File(s) / Path(s)                                         | Change Summary                                                                                                                                                                                                                                    |
|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `.gersemirc`                                              | Updated Catch2 CMake file path to remove an intermediate directory segment.                                                                                                                                |
| `.github/workflows/code-linting-checks.yaml`              | Added "Install uv" step to the lint job using a shell script from astral.sh.                                                                                                                              |
| `.github/workflows/unit-tests.yaml`                        | Added build matrix for `build_type`, updated commands to run debug tests and build examples per build type, and renamed job.                                                                              |
| `README.md`                                               | Expanded requirements (added uv), clarified and extended build, install, and test instructions, added examples for selective builds, and improved documentation structure.                                 |
| `examples/README.md`                                      | Restructured and clarified build instructions, split into Task and CMake methods.                                                                                                                         |
| `taskfile.yaml`                                           | Removed includes for build.yaml and utils.yaml, added includes for examples.yaml, test.yaml, and ystdlib.yaml; streamlined variables; removed test-* task.                                                |
| `taskfiles/build.yaml`                                    | Entire file removed (all build-related task definitions deleted).                                                                                                                                          |
| `taskfiles/deps.yaml`                                     | Refactored to use shared utility taskfiles, updated dependency installation tasks, variable naming, and logic for Boost and Catch2.                                                                       |
| `taskfiles/examples.yaml`                                 | New Taskfile for building and cleaning examples (debug/release), with internal tasks for build, clean, and generate.                                                                                      |
| `taskfiles/lint-cmake.yaml`                               | Renamed tasks (cmake-check → check-cmake, cmake-fix → fix-cmake), updated includes and dependency references.                                                                                             |
| `taskfiles/lint-cpp.yaml`                                 | Renamed all lint tasks for C++ (cpp- → check-/fix-), added G_CPP_SRC_DIR, included ystdlib.yaml, updated dependencies and variable usage.                                                                 |
| `taskfiles/lint-venv.yaml`                                | Updated task references to remove leading colons in dependencies and commands.                                                                                                                            |
| `taskfiles/lint-yaml.yaml`                                | Renamed task (yaml → check-yaml), updated aliases (removed yaml-check/yaml-fix, added fix-yaml).                                                                                                         |
| `taskfiles/lint.yaml`                                     | Added internal utils include, removed G_LINT_CPP_DIRS, renamed lint tasks for consistency (e.g., cmake-check → check-cmake).                                                                             |
| `taskfiles/test.yaml`                                     | New Taskfile for running unit tests (debug/release), supports selective library testing, with internal logic for build dependencies.                                                                      |
| `taskfiles/ystdlib.yaml`                                  | New Taskfile for building, cleaning, and installing ystdlib (debug/release), supports selective library builds and internalizes build logic.                                                              |
| `tools/yscope-dev-utils`                                  | Updated submodule commit reference to a newer version.                                                                                                                                                    |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant Taskfile
    participant YstdlibTaskfile
    participant Utils
    participant CMake
    participant TestBinary

    User->>Taskfile: task test:run-debug (optionally ystdlib_LIBRARIES)
    Taskfile->>YstdlibTaskfile: build-debug (with ystdlib_LIBRARIES)
    YstdlibTaskfile->>Utils: generate build system (CMake)
    Utils->>CMake: configure and build libraries
    YstdlibTaskfile->>Utils: build libraries
    Taskfile->>TestBinary: run unit test binary
    TestBinary-->>User: test results
sequenceDiagram
    participant User
    participant Taskfile
    participant ExamplesTaskfile
    participant Utils
    participant CMake

    User->>Taskfile: task examples:build-release
    Taskfile->>ExamplesTaskfile: build-release
    ExamplesTaskfile->>Utils: generate build system (CMake)
    Utils->>CMake: configure and build examples
    ExamplesTaskfile-->>User: build complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • kirkrodrigues
  • LinZhihao-723

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details open="true">
> <summary>⚡️ Unit Test Generation is now available in beta!</summary>
> 
> Learn more [here](https://docs.coderabbit.ai/finishing-touches/unit-test-generation), or try it out under "Finishing Touches" below.
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 41803a723d48349282686a47befb4527895a0aee and 4146a03ccd32cc1de30f02d983df2d259aebf5cf.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `taskfiles/examples.yaml` (1 hunks)
* `taskfiles/ystdlib.yaml` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (3)</summary>

<details>
<summary>📓 Common learnings</summary>

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.


Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.


Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.


Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.


Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.


</details>
<details>
<summary>taskfiles/examples.yaml (5)</summary>

Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.691Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like `{{- if .LIBRARIES }} - "arg" {{- end }}`) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: LinZhihao-723
PR: y-scope/ystdlib-cpp#66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for `set` and `shopt` options in Taskfile.yaml that work with the default `mvdan.cc/sh` interpreter, without requiring `interpreter: bash`. The `shopt: ["globstar"]` option will enable recursive globbing patterns like `**/*` without additional shell configuration.

Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.

</details>
<details>
<summary>taskfiles/ystdlib.yaml (13)</summary>

Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.

Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.691Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like `{{- if .LIBRARIES }} - "arg" {{- end }}`) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The `osIsAbs` template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The `osIsAbs` template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

Learnt from: LinZhihao-723
PR: y-scope/ystdlib-cpp#66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for `set` and `shopt` options in Taskfile.yaml that work with the default `mvdan.cc/sh` interpreter, without requiring `interpreter: bash`. The `shopt: ["globstar"]` option will enable recursive globbing patterns like `**/*` without additional shell configuration.

Learnt from: LinZhihao-723
PR: y-scope/ystdlib-cpp#66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for `set` and `shopt` options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring `interpreter: bash`. The `shopt: ["globstar"]` option enables recursive globbing patterns like `**/*` and can be used globally or per-task without additional shell configuration.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#32
File: CMakeLists.txt:0-0
Timestamp: 2025-02-28T05:04:33.616Z
Learning: Bill-hbrhbr uses a maximum line length of 100 characters in CMake files and prefers to use backslash line continuations to maintain this limit.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#32
File: CMakeLists.txt:0-0
Timestamp: 2025-02-28T05:04:33.616Z
Learning: Bill-hbrhbr maintains a maximum line length of 100 characters in CMake files and uses backslash line continuations to maintain this limit.

</details>

</details>

</details>

<details>
<summary>⏰ 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). (6)</summary>

* GitHub Check: lint-check (macos-15)
* GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
* GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
* GitHub Check: lint-check (ubuntu-24.04)
* GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
* GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>taskfiles/examples.yaml (1)</summary>

`67-70`: **Quote the install prefix to survive paths containing spaces**

If `{{.YSTDLIB_INSTALL_PREFIX}}` ever resolves to a path that includes a space (e.g., `"/home/user/My Projects/prefix"`), the argument will be split by the shell and CMake will interpret only the fragment before the first space.  A defensive pair of inner quotes eliminates that edge-case.

```diff
-            - "-D{{.G_CMAKE_PACKAGE_NAME}}_ROOT={{.YSTDLIB_INSTALL_PREFIX}}"
+            - "-D{{.G_CMAKE_PACKAGE_NAME}}_ROOT=\"{{.YSTDLIB_INSTALL_PREFIX}}\""
⛔ Skipped due to learnings
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
✨ 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.
    • @coderabbitai modularize this function.
  • 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

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)

  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

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: 13

🔭 Outside diff range comments (2)
.github/workflows/unit-tests.yaml (1)

51-66: Conditional execution of debug tests to save CI minutes

Currently, every workflow job runs task test:run-debug, even in the release build leg, which compiles unneeded debug artefacts. Since we only exercise examples and linker sanity in release, guard the test invocation:

• File: .github/workflows/unit-tests.yaml
• Section: Run unit tests and examples step

Suggested diff:

-  run: |-
-    task test:run-debug
-    task examples:build-${{matrix.build_type}}
-    ./build/examples/${{matrix.build_type}}/linking-tests
+  run: |-
+    if [ "${{matrix.build_type}}" = "debug" ]; then
+      task test:run-debug
+    fi
+    task examples:build-${{matrix.build_type}}
+    ./build/examples/${{matrix.build_type}}/linking-tests

This preserves current behaviour for debug jobs while avoiding redundant work in release jobs.

taskfiles/lint-cpp.yaml (1)

77-79: YAML escaping is over-quoted

Single-quoting the path inside a double-quoted scalar results in three
levels of quotation once rendered ('"/path"'). The extra quotes are not
needed:

-            - "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
+            - "--config-file={{.ROOT_DIR}}/.clang-tidy"

Same comment for the -p flag if you later quote it.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 753e815 and 4814964.

📒 Files selected for processing (17)
  • .gersemirc (1 hunks)
  • .github/workflows/code-linting-checks.yaml (1 hunks)
  • .github/workflows/unit-tests.yaml (3 hunks)
  • README.md (5 hunks)
  • examples/README.md (1 hunks)
  • taskfile.yaml (1 hunks)
  • taskfiles/build.yaml (0 hunks)
  • taskfiles/deps.yaml (1 hunks)
  • taskfiles/examples.yaml (1 hunks)
  • taskfiles/lint-cmake.yaml (3 hunks)
  • taskfiles/lint-cpp.yaml (2 hunks)
  • taskfiles/lint-venv.yaml (1 hunks)
  • taskfiles/lint-yaml.yaml (1 hunks)
  • taskfiles/lint.yaml (1 hunks)
  • taskfiles/test.yaml (1 hunks)
  • taskfiles/ystdlib.yaml (1 hunks)
  • tools/yscope-dev-utils (1 hunks)
💤 Files with no reviewable changes (1)
  • taskfiles/build.yaml
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
tools/yscope-dev-utils (2)

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

.gersemirc (5)

Learnt from: Bill-hbrhbr
PR: #32
File: CMakeLists.txt:0-0
Timestamp: 2025-02-28T05:04:33.616Z
Learning: Bill-hbrhbr uses a maximum line length of 100 characters in CMake files and prefers to use backslash line continuations to maintain this limit.

Learnt from: Bill-hbrhbr
PR: #32
File: CMakeLists.txt:0-0
Timestamp: 2025-02-28T05:04:33.616Z
Learning: Bill-hbrhbr maintains a maximum line length of 100 characters in CMake files and uses backslash line continuations to maintain this limit.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/lint-yaml.yaml (1)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

examples/README.md (6)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-27T22:57:03.031Z
Learning: In unit tests for ystdlib-cpp, REQUIRE_FALSE is preferred over REQUIRE(!condition) for its explicit nature when checking that conditions are false.

taskfiles/lint-cmake.yaml (2)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/examples.yaml (5)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/lint-venv.yaml (2)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

.github/workflows/code-linting-checks.yaml (2)

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

taskfiles/test.yaml (5)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

README.md (5)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

taskfiles/lint.yaml (3)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

taskfiles/lint-cpp.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

taskfile.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/deps.yaml (4)

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/ystdlib.yaml (7)

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

🪛 markdownlint-cli2 (0.17.2)
README.md

69-69: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ 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). (10)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (macos-15, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: build-ystdlib-cpp (macos-14, release)
  • GitHub Check: build-ystdlib-cpp (macos-14, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: build-ystdlib-cpp (macos-15, release)
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (10)
.gersemirc (1)

5-6: Confirm the new Catch2 CMake path exists in the refactored layout

The definition now points to build/deps/Catch2-src/extras/Catch.cmake. If the directory rename was only logical (inside Taskfiles) but the on-disk structure is still build/deps/Catch2/Catch2-src, gersemi will fail to resolve the file and linting will break.
Please double-check that the new location is produced by the dependency tasks (CI artefacts, local builds).

taskfiles/lint-yaml.yaml (1)

4-7: No stale YAML task invocations found
Ran a repo-wide grep for yaml(-check|-fix)?\b and confirmed there are no remaining references to the old yaml, yaml-check, or yaml-fix task names—everything now points to check-yaml/fix-yaml.

taskfiles/lint-venv.yaml (1)

16-30: utils Taskfile inclusion confirmed—no changes needed

The lint.yaml include block brings in the utils Taskfile (../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml), so utils:checksum:validate will resolve correctly. A repository‐wide grep also shows no remaining :utils: references.

taskfiles/lint-cmake.yaml (1)

50-50: Namespace reference looks correct

deps:install-all matches the alias added above and should resolve without the formerly-required leading :. No issues spotted here.

.github/workflows/unit-tests.yaml (1)

28-31: Matrix parameter added – good coverage

Adding a build_type axis improves CI robustness by exercising both build configurations.

taskfiles/lint.yaml (1)

28-37: Renamed tasks propagate correctly

The check-* / fix-* renames align with the rest of the refactor and the call-sites have been updated. 👍

README.md (2)

46-47: Nice – explicit uv requirement documented

Calling out the minimum version helps new contributors.


175-177: Good addition of [uv] reference

Link resolves and is consistent with existing style.

taskfile.yaml (1)

18-22: Centralised build-dir vars make downstream Taskfiles cleaner

The new variables (G_EXAMPLES_BUILD_DIR, G_YSTDLIB_BUILD_DIR) remove several duplicated constructs seen in the deleted build.yaml. Good improvement.

taskfiles/lint-cpp.yaml (1)

68-71: Verify availability of ystdlib:generate outside its own Taskfile

ystdlib:generate is marked internal: true in ystdlib.yaml.
Go-Task allows depending on internal tasks located in the same file,
but cross-file access to an internal task is not always permitted and has
changed in recent Task releases. If the task is not found, the static-lint
job will fail.

Please run task lint:check-cpp-static locally (or let CI run) to confirm.

Comment on lines +40 to +42
- name: "Install uv"
shell: "bash"
run: "curl --fail --location --silent --show-error https://astral.sh/uv/install.sh | sh"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Pipe-to-bash installer: pin or checksum to mitigate supply-chain risk

Downloading https://astral.sh/uv/install.sh on every run without pinning leaves the workflow exposed to upstream tampering.
Consider one of:

- name: "Install uv"
  run: |
    curl --fail --location --silent --show-error https://astral.sh/uv/v0.7.10/install.sh | sh

or fetch the script, verify its SHA-256, then execute.
This keeps builds reproducible and auditable.

🤖 Prompt for AI Agents
In .github/workflows/code-linting-checks.yaml around lines 40 to 42, the current
workflow downloads the install script from https://astral.sh/uv/install.sh
without pinning to a specific version or verifying its integrity, which poses a
supply-chain risk. To fix this, update the URL to point to a specific versioned
script (e.g., https://astral.sh/uv/v0.7.10/install.sh) or implement a step to
download the script, verify its SHA-256 checksum, and only then execute it. This
ensures reproducibility and security of the installation process.

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 UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4814964 and 926a20c.

📒 Files selected for processing (1)
  • taskfiles/lint-cpp.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
taskfiles/lint-cpp.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

⏰ 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). (6)
  • GitHub Check: build-ystdlib-cpp (macos-15, release)
  • GitHub Check: build-ystdlib-cpp (macos-14, release)
  • GitHub Check: build-ystdlib-cpp (macos-15, debug)
  • GitHub Check: build-ystdlib-cpp (macos-14, debug)
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: lint-check (macos-15)
🔇 Additional comments (2)
taskfiles/lint-cpp.yaml (2)

68-79: Compile commands path is correct

The G_YSTDLIB_BUILD_DIR variable is defined in the root Taskfile as {{.G_BUILD_DIR}}/{{.G_CMAKE_PACKAGE_NAME}}, so it does not already include the build type. Appending /debug/compile_commands.json produces the intended path (…/<package>/debug/compile_commands.json) without duplicating “debug”.

For consistency and to avoid reconstructing the path manually, you could use the BUILD_DIR variable that ystdlib:generate sets (which equals {{.G_YSTDLIB_BUILD_DIR}}/{{.BUILD_TYPE}}):

-            - "-p '{{.G_YSTDLIB_BUILD_DIR}}/debug/compile_commands.json'"
+            - "-p '{{.BUILD_DIR}}/compile_commands.json'"

Likely an incorrect or invalid review comment.


38-44: Confirm task-name resolution after leading-colon removal

Please verify that the external utility task utils:cpp-lint:clang-format has been updated (dropping the initial colon) in the yscope-dev-utils exports. If not, these references will fail at runtime:

  • taskfiles/lint-cpp.yaml:38 – - task: "utils:cpp-lint:clang-format"
  • taskfiles/lint-cpp.yaml:52 – - task: "utils:cpp-lint:clang-format"

Ensure the task declaration in the yscope-dev-utils repository matches this name.

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

♻️ Duplicate comments (4)
README.md (1)

66-72: Insert a blank line before the fenced code block & keep anchor syntax consistent

markdownlint rule MD031 requires a blank line before a fenced block.
Also, to link to the same-file heading you just defined (### Using Task {#build-task}), the internal link must start with “#”.

-### Using Task {#build-task}
-
-To build all libraries:
-```shell
+### Using Task {#build-task}
+
+To build all libraries:
+
+```shell

Update the two cross-references further down as well:

-[Building: Using Task](build-task)
+[Building: Using Task](#build-task)

Do the same change in the Testing section.

taskfiles/test.yaml (2)

15-19: Pass ystdlib_LIBRARIES through so selective builds actually work

The public docs promise that callers can restrict the build with ystdlib_LIBRARIES, but the var is not forwarded to the internal task, so it is silently ignored.

-      - task: "run-unit-test"
-        vars:
-          BUILD_TYPE: "debug"
+      - task: "run-unit-test"
+        vars:
+          BUILD_TYPE: "debug"
+          ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"

Apply the same adjustment in run-release.


31-35: Declare required variable for earlier validation

run-unit-test assumes .BUILD_TYPE exists. Add an explicit guard to fail fast when it’s missing.

  run-unit-test:
    internal: true
+    requires:
+      vars: ["BUILD_TYPE"]
taskfiles/ystdlib.yaml (1)

114-119: osIsAbs is not a Task/Sprig template function

Rendering fails with “function osIsAbs not defined”.
Use a portable prefix check instead.

-      ABSOLUTE_INSTALL_PREFIX: >-
-        {{- if osIsAbs .INSTALL_PREFIX -}}
-          {{.INSTALL_PREFIX}}
-        {{- else -}}
-          {{.USER_WORKING_DIR}}/{{.INSTALL_PREFIX}}
-        {{- end}}
+      ABSOLUTE_INSTALL_PREFIX: >-
+        {{- if hasPrefix .INSTALL_PREFIX "/" -}}
+          {{.INSTALL_PREFIX}}
+        {{- else -}}
+          {{.USER_WORKING_DIR}}/{{.INSTALL_PREFIX}}
+        {{- end}}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 926a20c and 5e94ac6.

📒 Files selected for processing (4)
  • README.md (5 hunks)
  • examples/README.md (1 hunks)
  • taskfiles/test.yaml (1 hunks)
  • taskfiles/ystdlib.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
README.md (5)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

examples/README.md (6)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-27T22:57:03.031Z
Learning: In unit tests for ystdlib-cpp, REQUIRE_FALSE is preferred over REQUIRE(!condition) for its explicit nature when checking that conditions are false.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

taskfiles/test.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-27T22:57:03.031Z
Learning: In unit tests for ystdlib-cpp, REQUIRE_FALSE is preferred over REQUIRE(!condition) for its explicit nature when checking that conditions are false.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

taskfiles/ystdlib.yaml (7)

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

🪛 markdownlint-cli2 (0.17.2)
README.md

69-69: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ 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). (5)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (1)
examples/README.md (1)

8-24: Documentation chunk looks good

The new “Building → Using Task” section clearly lists prerequisites and the exact commands to call. Heading hierarchy, anchor casing, and fenced-block spacing all match our repo style.

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: 2

♻️ Duplicate comments (2)
taskfiles/test.yaml (2)

15-19: Explicitly forward ystdlib_LIBRARIES to the sub-task

As raised in the previous review, run-debug invokes run-unit-test without explicitly passing ystdlib_LIBRARIES. While Task will inherit top-level variables, making the propagation explicit prevents surprises when the variable is overridden or unset in an outer scope.

       - task: "run-unit-test"
         vars:
           BUILD_TYPE: "debug"
+          ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"

26-30: Mirror the variable pass-through for release builds

For consistency with run-debug (and to avoid the same shadowing issue), pass ystdlib_LIBRARIES through here as well.

       - task: "run-unit-test"
         vars:
           BUILD_TYPE: "release"
+          ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e94ac6 and bd23999.

📒 Files selected for processing (1)
  • taskfiles/test.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
taskfiles/test.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-27T22:57:03.031Z
Learning: In unit tests for ystdlib-cpp, REQUIRE_FALSE is preferred over REQUIRE(!condition) for its explicit nature when checking that conditions are false.

⏰ 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). (5)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: lint-check (ubuntu-24.04)

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

♻️ Duplicate comments (1)
README.md (1)

66-70: Replace inline <a> anchor and add required blank line before the fenced block

Using an inline <a> tag inside a heading violates MD033 and is unnecessary.
Switch to GitHub-style explicit heading IDs and insert a blank line before the code block to satisfy MD031.

-### <a id="building-using-task" />Using Task
-
-To build all libraries:
+### Using Task {#building-using-task}
+
+To build all libraries:
+
 ```shell
 task ystdlib:build-release
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd23999 and bbf6d8f.

📒 Files selected for processing (1)
  • README.md (5 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
README.md (5)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

🪛 markdownlint-cli2 (0.17.2)
README.md

66-66: Inline HTML
Element: a

(MD033, no-inline-html)


69-69: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ 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). (5)
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)

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

♻️ Duplicate comments (3)
taskfiles/examples.yaml (1)

65-67: Remove unnecessary quoting around CMAKE_BUILD_TYPE to avoid double-quoting on the CLI

The value is already a single word; keeping the whole argument unquoted avoids cases where it ends up rendered as "\"debug\"" or "\"release\"" on some shells.

-            - "-DCMAKE_BUILD_TYPE={{.BUILD_TYPE}}"
+            - -DCMAKE_BUILD_TYPE={{.BUILD_TYPE}}
taskfiles/ystdlib.yaml (1)

98-103: Inline the conditional to prevent an empty list element when .LIBRARIES is blank

Emitting an empty scalar shows up as a spurious "" argument to CMake. The condensed form keeps CLI noise down.

-            - >-
-              {{- if .LIBRARIES -}}
-                -D{{.G_CMAKE_PACKAGE_NAME}}_LIBRARIES="{{.LIBRARIES}}"
-              {{- end}}
+            {{- if .LIBRARIES }}
+            - "-D{{.G_CMAKE_PACKAGE_NAME}}_LIBRARIES={{.LIBRARIES}}"
+            {{- end }}
taskfile.yaml (1)

6-11: Consider grouping build-related taskfiles together for quicker scanning

Placing ystdlib, examples, and test consecutively (right after deps) improves readability when skimming the includes section.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bbf6d8f and a5d9eea.

📒 Files selected for processing (3)
  • taskfile.yaml (1 hunks)
  • taskfiles/examples.yaml (1 hunks)
  • taskfiles/ystdlib.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
taskfiles/ystdlib.yaml (9)

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The osIsAbs template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The osIsAbs template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

taskfiles/examples.yaml (4)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

taskfile.yaml (8)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with the default mvdan.cc/sh interpreter, without requiring interpreter: bash. The shopt: ["globstar"] option will enable recursive globbing patterns like **/* without additional shell configuration.

Learnt from: LinZhihao-723
PR: #66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for set and shopt options in Taskfile.yaml that work with Task's built-in shell interpreter library, without requiring interpreter: bash. The shopt: ["globstar"] option enables recursive globbing patterns like **/* and can be used globally or per-task without additional shell configuration.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

⏰ 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). (5)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: lint-check (ubuntu-24.04)

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

🔭 Outside diff range comments (1)
taskfiles/lint-cpp.yaml (1)

27-33: Broaden file patterns and root paths to avoid skipping headers outside src/

Limiting INCLUDE_FILENAME_PATTERNS to .cpp, .h, and .hpp under {{.G_CPP_SRC_DIR}} means headers placed in common include/ or inc/ directories (and any .inc headers used for template instantiation) will not be linted or auto-formatted. This diverges from the project’s stated header-only detection rules.

-      - "{{.G_CPP_SRC_DIR}}/**/*.h"
-      - "{{.G_CPP_SRC_DIR}}/**/*.hpp"
+      - "{{.G_CPP_SRC_DIR}}/**/*.h"
+      - "{{.G_CPP_SRC_DIR}}/**/*.hpp"
+      - "{{.G_CPP_SRC_DIR}}/**/*.inc"
+      - "{{.ROOT_DIR}}/include/**/*.h"
+      - "{{.ROOT_DIR}}/include/**/*.hpp"
+      - "{{.ROOT_DIR}}/include/**/*.inc"
@@
-          INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]
+          INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
-          ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]
+          ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}", "{{.ROOT_DIR}}/include"]

Also applies to: 42-43

♻️ Duplicate comments (1)
taskfiles/lint-cpp.yaml (1)

59-66: Alias direction is still counter-intuitive

The earlier review suggested making fix-cpp-static the primary task and aliasing check-cpp-static back to it, aligning with how the fix variant is invoked elsewhere. The current layout keeps the less-used “check” form as primary.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5d9eea and 0aa2b0c.

📒 Files selected for processing (1)
  • taskfiles/lint-cpp.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.
Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.
taskfiles/lint-cpp.yaml (6)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

⏰ 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). (6)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: lint-check (macos-15)

@davidlion davidlion requested a review from Bill-hbrhbr July 28, 2025 14:16
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: 2

♻️ Duplicate comments (2)
taskfiles/test.yaml (1)

21-24: Quote paths that may contain spaces

Invoking the test binary without quotes will break if {{.G_YSTDLIB_*_BUILD_DIR}} ever resolves to a path with spaces (e.g., ~/Library/Application Support). Cheap future-proofing:

-      - "{{.G_YSTDLIB_DEBUG_BUILD_DIR}}/{{.G_UNIT_TEST_ALL}}"
+      - '"{{.G_YSTDLIB_DEBUG_BUILD_DIR}}/{{.G_UNIT_TEST_ALL}}"'-      - "{{.G_YSTDLIB_RELEASE_BUILD_DIR}}/{{.G_UNIT_TEST_ALL}}"
+      - '"{{.G_YSTDLIB_RELEASE_BUILD_DIR}}/{{.G_UNIT_TEST_ALL}}"'

Also applies to: 31-34

taskfiles/lint-cpp.yaml (1)

59-66: Alias direction still counter-intuitive

check-cpp-static merely forwards to fix-cpp-static, yet the fix variant is what downstream tasks invoke. Making fix-cpp-static the canonical task (with check-cpp-static as the alias) reads more naturally.

-check-cpp-static:
-  aliases:
-    - "fix-cpp-static"
+fix-cpp-static:
+  aliases:
+    - "check-cpp-static"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0aa2b0c and 41803a7.

📒 Files selected for processing (4)
  • README.md (5 hunks)
  • taskfiles/lint-cpp.yaml (2 hunks)
  • taskfiles/test.yaml (1 hunks)
  • taskfiles/ystdlib.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
taskfiles/ystdlib.yaml (9)

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The osIsAbs template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:114-119
Timestamp: 2025-07-24T23:48:46.989Z
Learning: The osIsAbs template function is available in Task through slim-sprig's paths module (https://go-task.github.io/slim-sprig/paths.html) and provides robust cross-platform absolute path detection using Go's filepath.IsAbs() function, making it superior to simple prefix checks with hasPrefix.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.638Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like {{- if .LIBRARIES }} - "arg" {{- end }}) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

taskfiles/test.yaml (4)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.638Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like {{- if .LIBRARIES }} - "arg" {{- end }}) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-27T22:57:03.031Z
Learning: In unit tests for ystdlib-cpp, REQUIRE_FALSE is preferred over REQUIRE(!condition) for its explicit nature when checking that conditions are false.

README.md (6)

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.638Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like {{- if .LIBRARIES }} - "arg" {{- end }}) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

taskfiles/lint-cpp.yaml (7)

Learnt from: anlowee
PR: #63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-06T20:42:41.772Z
Learning: In the y-scope/ystdlib-cpp project, the linting scope is limited to .h, .hpp, and .cpp files, and the header-only detection logic in CMake checks for .h, .hpp, and .inc extensions.

Learnt from: PacificViking
PR: #65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase ystdlib_ prefix for project-specific CMake variables (e.g., ystdlib_VERSION, ystdlib_BUILD_TESTING, ystdlib_INSTALL_CONFIG_DIR) following the current naming convention standards.

Learnt from: davidlion
PR: #70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.638Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like {{- if .LIBRARIES }} - "arg" {{- end }}) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: #62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The :utils:boost:download-and-install task is defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml at around line 128, providing Boost installation functionality for the project's dependency management.

🪛 markdownlint-cli2 (0.17.2)
README.md

66-66: Inline HTML
Element: a

(MD033, no-inline-html)


69-69: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ 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). (8)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, debug)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, debug)
  • GitHub Check: build-ystdlib-cpp (macos-15, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-24.04, release)
  • GitHub Check: build-ystdlib-cpp (ubuntu-22.04, release)
  • GitHub Check: build-ystdlib-cpp (macos-14, release)
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: build-ystdlib-cpp (macos-15, debug)
🔇 Additional comments (1)
taskfiles/ystdlib.yaml (1)

98-103: Avoid emitting an empty list element when .LIBRARIES is blank

The multi-line scalar leaves a dangling “-” that turns into an empty CLI argument. Inline the conditional to keep the argument list clean.

-            - >-
-              {{- if .LIBRARIES -}}
-                -D{{.G_CMAKE_PACKAGE_NAME}}_LIBRARIES="{{.LIBRARIES}}"
-              {{- end}}
+            {{- if .LIBRARIES }}
+            - "-D{{.G_CMAKE_PACKAGE_NAME}}_LIBRARIES={{.LIBRARIES}}"
+            {{- end }}
⛔ Skipped due to learnings
Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.638Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like `{{- if .LIBRARIES }} - "arg" {{- end }}`) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Comment on lines +66 to +70
### <a id="building-using-task" />Using Task

To build all targets:
To build all libraries:
```shell
task build:all
task ystdlib:build-release
Copy link

@coderabbitai coderabbitai bot Jul 28, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Replace the inline HTML anchor and insert the required blank line to satisfy markdown-lint

Using <a> tags triggers MD033 and the missing blank line before the fenced block re-raises MD031. Switching to GitHub-style explicit IDs and adding the blank line fixes both.

-### <a id="building-using-task" />Using Task
-
-To build all libraries:
+### Using Task {#building-using-task}
+
+To build all libraries:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### <a id="building-using-task" />Using Task
To build all targets:
To build all libraries:
```shell
task build:all
task ystdlib:build-release
### Using Task {#building-using-task}
To build all libraries:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

66-66: Inline HTML
Element: a

(MD033, no-inline-html)


69-69: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🤖 Prompt for AI Agents
In README.md around lines 66 to 70, replace the inline HTML anchor tag <a
id="building-using-task" /> with a GitHub-style heading ID by appending
{#building-using-task} to the heading text. Also, insert a blank line before the
fenced code block to satisfy markdown-lint rules MD033 and MD031.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you have a source for the "GitHub-style explicit ID"? When I tried using this syntax, it didn't work.

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

Does GitHub Flavored Markdown support explicit heading IDs using {#id} syntax for anchors?

💡 Result:

GitHub Flavored Markdown (GFM) does not natively support the {#id} syntax for assigning explicit IDs to headings. Instead, GFM automatically generates heading IDs by converting the heading text to lowercase, replacing spaces with hyphens, and removing non-alphanumeric characters. For example, a heading like ## My Heading! would generate the ID my-heading. (docs.gitlab.com)

If you require custom heading IDs in GFM, you can use HTML anchor tags directly within your Markdown file. By inserting an HTML <a> tag with a specific id attribute before your heading, you can create a custom anchor. Here's how you can do it:

<a id="custom-id"></a>
## My Heading

This approach allows you to define custom IDs for your headings, which can be useful for linking directly to specific sections within your document. However, it's important to note that this method relies on raw HTML and may not be supported by all Markdown processors. Therefore, it's advisable to test your Markdown files in the specific environment where they will be rendered to ensure compatibility.

Citations:


@davidlion You're absolutely right to question that - I made an error in my previous suggestion. The {#id} syntax is not supported by GitHub Flavored Markdown. That syntax works with other markdown processors like Jekyll or Hugo, but not on GitHub.

GitHub automatically generates heading IDs from the heading text (converting to lowercase, replacing spaces with hyphens), but it doesn't support explicit custom IDs using the {#id} syntax.

The original code using <a id="building-using-task" /> is actually the correct way to create custom heading anchors in GitHub markdown. The markdown linter is flagging this as MD033 (no inline HTML), but this is a false positive since inline HTML <a> tags are the proper method for custom anchors in GFM.

For the linting issues, you have a few options:

  1. Configure markdownlint to allow <a> tags for anchors by adding this to your .markdownlint.yaml:

    MD033:
      allowed_elements: ["a"]
  2. Keep the current approach and accept the linting warning, since it's the correct GitHub markdown syntax

  3. Remove the custom anchor if it's not essential, and rely on GitHub's auto-generated ID from the heading text

The MD031 issue can be fixed by adding the blank line before the fenced code block as originally suggested.

🐰💭
Hmm, I should double-check my suggestions more carefully before making claims about syntax support...


✏️ Learnings added
Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: README.md:66-70
Timestamp: 2025-07-30T02:32:39.854Z
Learning: GitHub Flavored Markdown does not support the {#id} syntax for explicit heading IDs. This syntax works with Jekyll, Hugo, and other static site generators, but not with GitHub's native markdown processor. In GFM, custom heading anchors must use HTML <a> tags with id attributes, which is the correct approach despite triggering markdownlint MD033 warnings.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.885Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.

Learnt from: PacificViking
PR: y-scope/ystdlib-cpp#65
File: CMakeLists.txt:87-88
Timestamp: 2025-06-06T15:01:53.987Z
Learning: The y-scope/ystdlib-cpp project uses lowercase `ystdlib_` prefix for project-specific CMake variables (e.g., `ystdlib_VERSION`, `ystdlib_BUILD_TESTING`, `ystdlib_INSTALL_CONFIG_DIR`) following the current naming convention standards.

Learnt from: davidlion
PR: y-scope/ystdlib-cpp#70
File: taskfiles/ystdlib.yaml:0-0
Timestamp: 2025-07-28T14:16:32.691Z
Learning: Task (go-task) has limitations with Go template usage in YAML generation. Inline conditional templating to control YAML list elements (like `{{- if .LIBRARIES }} - "arg" {{- end }}`) is not supported, so multi-line scalar approaches may be necessary even if they produce empty elements when variables are blank.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: LinZhihao-723
PR: y-scope/ystdlib-cpp#66
File: taskfile.yaml:4-4
Timestamp: 2025-05-27T22:22:47.058Z
Learning: Task (go-task) has native support for `set` and `shopt` options in Taskfile.yaml that work with the default `mvdan.cc/sh` interpreter, without requiring `interpreter: bash`. The `shopt: ["globstar"]` option will enable recursive globbing patterns like `**/*` without additional shell configuration.

Learnt from: Bill-hbrhbr
PR: y-scope/ystdlib-cpp#0
File: :0-0
Timestamp: 2025-03-01T05:38:37.570Z
Learning: The README.md in the ystdlib-cpp repository consistently uses ATX style markdown headings (with # symbols) throughout the document.

Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.199Z
Learning: In the ystdlib-cpp project taskfiles, prefer keeping command-line flags and their values together in single YAML list entries (e.g., "--config-file '{{.ROOT_DIR}}/.clang-tidy'") rather than separating them into individual entries, unless the values are too long. This improves readability and maintains consistency with the project's style.

Comment on lines 60 to 72
install-debug:
desc: >-
install-debug INSTALL_PREFIX="<prefix path>": Install the debug build into <prefix path>.
requires:
vars:
- "INSTALL_PREFIX"
cmds:
- task: "build-debug"
- task: "utils:cmake:install"
vars:
BUILD_DIR: "{{.G_YSTDLIB_DEBUG_BUILD_DIR}}"
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}"

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

install-debug/install-release drop the ystdlib_LIBRARIES variable, breaking selective installs

Docs promise task ystdlib:install-release … ystdlib_LIBRARIES="containers" will install only the requested libs, but the variable is never forwarded to the underlying build task. The install tasks therefore rebuild all libraries.

       - task: "build-debug"
+        vars:
+          ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"
 …
       - task: "build-release"
+        vars:
+          ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
install-debug:
desc: >-
install-debug INSTALL_PREFIX="<prefix path>": Install the debug build into <prefix path>.
requires:
vars:
- "INSTALL_PREFIX"
cmds:
- task: "build-debug"
- task: "utils:cmake:install"
vars:
BUILD_DIR: "{{.G_YSTDLIB_DEBUG_BUILD_DIR}}"
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}"
install-debug:
desc: >-
install-debug INSTALL_PREFIX="<prefix path>": Install the debug build into <prefix path>.
requires:
vars:
- "INSTALL_PREFIX"
cmds:
- task: "build-debug"
vars:
ystdlib_LIBRARIES: "{{.ystdlib_LIBRARIES}}"
- task: "utils:cmake:install"
vars:
BUILD_DIR: "{{.G_YSTDLIB_DEBUG_BUILD_DIR}}"
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}"
🤖 Prompt for AI Agents
In taskfiles/ystdlib.yaml around lines 60 to 72, the install-debug and
install-release tasks do not forward the ystdlib_LIBRARIES variable to the
underlying build tasks, causing all libraries to be rebuilt instead of
selectively installing requested ones. Modify these tasks to pass the
ystdlib_LIBRARIES variable through their vars sections to the build-debug or
build-release tasks, ensuring selective installs work as documented.

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