Skip to content

refactor: Update to the latest version of yscope-dev-utils: #63

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

Merged
merged 16 commits into from
May 27, 2025

Conversation

anlowee
Copy link
Member

@anlowee anlowee commented May 23, 2025

Description

Bump the yscope-dev-utils to match the latest master branch. Update the task files and fix the lint issues with upgraded clang-tidy and clang-format.

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

Summary by CodeRabbit

  • Chores
    • Updated version constraints for clang-format and clang-tidy to allow broader version updates.
    • Modified taskfile paths and task references for build, dependency, linting, and virtual environment scripts.
    • Updated linting configurations and exclusion rules for YAML and C++ lint tasks.
    • Changed declaration order of get_category() method in ErrorCode class for style consistency.
    • Updated subproject commit to a newer version.
  • Tests
    • Changed container element types and loop variables from int to size_t in array tests for consistency.
    • Rephrased assertion formatting in result tests for clarity.
  • Style
    • Adjusted declaration order of static and constexpr specifiers in class methods for style.

@anlowee anlowee requested a review from a team as a code owner May 23, 2025 21:09
Copy link

coderabbitai bot commented May 23, 2025

## Walkthrough

This update modifies dependency version constraints, refines task and variable naming conventions, updates file paths, and adjusts test code types. It also includes minor syntax and declaration changes without altering core logic or control flow.

## Changes

| File(s)                                   | Change Summary                                                                                                                                                                                                                      |
|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| lint-requirements.txt                     | Updated clang-format and clang-tidy version constraints from locked v19.x to minimum v20.1.0 and v19.1.0; removed version locking comments.                                                                                         |
| src/ystdlib/error_handling/ErrorCode.hpp | Changed declaration order from `constexpr static` to `static constexpr` for `get_category()` in `ErrorCode` class.                                                                                                               |
| src/ystdlib/containers/test/test_Array.cpp | Replaced all `int` element types with `size_t` in `Array` and `std::vector` tests; updated loop variables accordingly.                                                                                                             |
| src/ystdlib/error_handling/test/test_Result.cpp | Reformatted a single assertion to move the comparison operator to the start of the second line; no logic change.                                                                                                                 |
| taskfile.yaml                            | Updated included utils taskfile path to new exports location.                                                                                                                                                                      |
| taskfiles/build.yaml                     | Renamed CMake-related task references for build, clean, and generate to use `:utils:cmake:...` convention.                                                                                                                         |
| taskfiles/deps.yaml                      | Refactored install-all task to consolidate steps; replaced individual install tasks to use new `:utils:cmake:install-remote-tar` task with standardized variable names; removed obsolete tasks.                                      |
| taskfiles/lint-cpp.yaml                  | Simplified source file selection, switched to new `:utils:cpp-lint:` tasks, updated flag formats, and changed lint config paths to exports subdirectory.                                                                           |
| taskfiles/lint-venv.yaml                 | Updated task references to new namespace conventions for checksum and venv creation.                                                                                                                                               |
| taskfiles/lint-yaml.yaml                 | Changed yamllint config file path to exports subdirectory; excluded additional Clion build directories from linting.                                                                                                               |
| tools/yscope-dev-utils                   | Updated subproject commit reference.                                                                                                                                                                                              |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Developer
    participant TaskRunner
    participant Utils
    participant CppLint
    participant Venv
    participant Deps

    Developer->>TaskRunner: Run build/lint/deps tasks
    TaskRunner->>Utils: Invoke updated utils task (e.g., :utils:cmake:build)
    TaskRunner->>CppLint: Run :utils:cpp-lint:clang-format or clang-tidy-find
    TaskRunner->>Venv: Create/check venv with :utils:misc:create-venv
    TaskRunner->>Deps: Install dependency with standardized variables
    Utils-->>TaskRunner: Return results
    CppLint-->>TaskRunner: Return lint results
    Venv-->>TaskRunner: Return venv setup status
    Deps-->>TaskRunner: Return dependency status

Possibly related PRs

Suggested reviewers

  • davidlion
  • LinZhihao-723

<!-- walkthrough_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 aff82e77e1fb66be56f799276573e8a6e73614b4 and 35e1aa8760b43fca8501f186e1f29cc3866883b2.

</details>

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

* `taskfiles/lint-yaml.yaml` (1 hunks)

</details>

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

<details>
<summary>taskfiles/lint-yaml.yaml (3)</summary>

`17-18`: **Exclude pattern for CLion build directories is correctly recursive.**

The `**/cmake-build-*` glob now ensures all nested CLion-generated build dirs are skipped in the `sources` list, addressing earlier lint variable confusion and aligning with other exclude patterns.

---

`26-30`: **Prune `cmake-build-*` directories in the `find` command.**

Adding `-o -path '**/cmake-build-*'` to the prune expression makes the `find` invocation consistent with the `sources` exclusions, preventing unwanted directories from being linted.

---

`33-36`: **Yamllint config path updated to new exports directory.**

The `--config-file` path now points to `tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml`, matching the reorganized directory structure used across other taskfiles. Please confirm this file exists at the new location.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAMxJqLgAhR25IAANZRCZuEjAlCTA8eC9EdMgpCkR4fAxoyAB3NGQHAWZ1Gno5MNgPbERKdAwvfAaSD2brOwxHAUGANgBmFCxcXr8SbnxqghdIWTBs/FyAeizcWi94ATAGbm4NGHXmbSxubAotgf5YntRbFDIAiQbDcWjUDxrDyZI65fIkQrFUrlbhoBgAazQpDC+EgL1wDFgPQ8XghiFClWqtUgsQoLGJeOaND4AioGEJj3cILBEJWDC82CUyGYingsXgDGoNQwQNxuGa6JpJWkQ3o4oAHirYvg+FcMOIMERAQ4VWtqBsHF5OjS6cxuUQqEKcRl+ZgiGBxLRZOVMPR0q7DWBtRR8elOesAUKGBR4NxxNSmPrXsg0IxehiruTnZUxfI0LRev52ZDcYncDGBMVqURsPAlHrpAAaFa0CW8hq9K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cGAD0UQLQG+4c96eD0F7nQEWDzAHoiwOno91iA08SAiwZHujHRiLALC33B6BYQehk9IohgKkQyPiCxBvumMdGA9AYDzAweTPNAJYQEBoAHoEokgA9Cx7oxvusQCwpYUWC0BFg/3PGLZDkiQBAeT3bRJaTtFU9Fghojni6IsJ6jMYAgRYJjHmBQ8dRVhJ6BYQ1GI90YgPKUZSJtEPRgeqgdGO9wEDoxjRIok0V9wsKYweRT0NAM931HKi0AqosHtSJZ4WEIxOI2INGKegJjaA8op6JjwYC0AEe9VFHk9CUDxASAkPaHi93Rgw8SACozGPQGtEQBGAlpWgKDwSAkB0x6MVQO92jGI9YgdPesQTwYACAFR9PPMZmJe6xB5gJYm0WgB8TfdGeLIh6HOPmC08SAVhWIC9yegfcMeFhF7osB7F5jXubI6MQIHDEDioAwovUWgDQAA95gXoynrEElDfc0xR4h6Mjz1GxB2ermfkSeO+7fdOR6MCMZGMHHaR1Ab/WgASMFzEjaA6/KhPoCAA -->

<!-- internal state end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=y-scope/ystdlib-cpp&utm_content=63):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d3fc980 and 8c1ecd8.

📒 Files selected for processing (10)
  • lint-requirements.txt (1 hunks)
  • src/ystdlib/error_handling/ErrorCode.hpp (1 hunks)
  • src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp (2 hunks)
  • taskfile.yaml (1 hunks)
  • taskfiles/build.yaml (4 hunks)
  • taskfiles/deps.yaml (3 hunks)
  • taskfiles/lint-cpp.yaml (3 hunks)
  • taskfiles/lint-venv.yaml (1 hunks)
  • taskfiles/lint-yaml.yaml (1 hunks)
  • tools/yscope-dev-utils (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.

**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}: - Prefer false == <expression> rather than !<expression>.

  • src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp
  • src/ystdlib/error_handling/ErrorCode.hpp
🪛 GitHub Actions: code-linting-checks
src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp

[error] 5-5: clang-format violation: code should be clang-formatted [-Wclang-format-violations]


[error] 168-168: clang-format violation: code should be clang-formatted [-Wclang-format-violations]

🔇 Additional comments (21)
src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp (1)

6-7: Limit test symbol linkage with anonymous namespace
Enclosing all test cases within an anonymous namespace confines their linkage to this translation unit, preventing symbol collisions across tests.

src/ystdlib/error_handling/ErrorCode.hpp (1)

90-90: Consistent specifier ordering
Reordering to static constexpr (instead of constexpr static) aligns with the project’s lint rules and has no impact on semantics.

tools/yscope-dev-utils (1)

1-1:

✅ Verification successful

Verify new subproject commit reference exists

The commit hash for the yscope-dev-utils subproject has been bumped. Please ensure this commit is present in the remote repository and that the submodule in tools/yscope-dev-utils has been initialised/updated accordingly.


🏁 Script executed:

#!/bin/bash
submodule_dir="tools/yscope-dev-utils"
# Initialise the submodule if it's not already present
git submodule update --init "$submodule_dir"
# Confirm the target commit exists
if git -C "$submodule_dir" cat-file -e 76aecbd6d0db6e2078005431946b5c2e716c4291^{commit}; then
  echo "✅ Commit exists."
else
  echo "❌ ERROR: Commit 76aecbd6d0db6e2078005431946b5c2e716c4291 not found in submodule."
  exit 1
fi

Length of output: 578


Submodule yscope-dev-utils commit verified

The submodule at tools/yscope-dev-utils has been initialised/updated and commit 76aecbd6d0db6e2078005431946b5c2e716c4291 is present. No further action required.

taskfile.yaml (1)

7-7: Correctly updated utils include path to match restructured exports. The utils include now points to tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml, aligning with the reorganised taskfile layout.

taskfiles/lint-yaml.yaml (1)

27-27: Ensure yamllint config path aligns with new exports directory. The --config-file flag now references tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml, matching the updated project structure.

taskfiles/lint-venv.yaml (3)

18-18: Update checksum validation task namespace. The dependency now correctly references :utils:checksum:validate, aligning with the reorganised utilities naming convention.


23-23: Update venv creation task namespace. The command now invokes :utils:misc:create-venv, matching the updated location for virtual-environment utilities.


29-29: Update checksum computation task namespace. The final command now uses :utils:checksum:compute, ensuring the correct utility task is invoked under the new namespace.

taskfiles/build.yaml (4)

13-13: Standardise CMake build task reference. Updated to :utils:cmake:build, reflecting the new multi-level namespace convention for utility tasks.


24-24: Apply new namespace for targeted CMake build. The target-* cmds now use :utils:cmake:build for building specific targets in line with the global build task.


52-52: Update clean task to new CMake namespace. The clean deps reference is now :utils:cmake:clean, consistent with the reorganised task naming.


62-62: Align init generate task with updated namespace. The init task now uses :utils:cmake:generate, ensuring correct invocation under the revised utility namespace.

taskfiles/deps.yaml (3)

78-84: Ensure consistency in install-outcome variable naming.

The install-outcome task now uses CMAKE_PACKAGE_NAME, TAR_SHA256, TAR_URL, and CMAKE_GEN_ARGS, but still relies on WORK_DIR. Verify that the util accepts WORK_DIR without renaming it (or adjust if the util expects a namespaced variant such as CMAKE_WORK_DIR).


98-104: Align install-quickcpplib with new CMake task conventions.

This block mirrors the same standardization: :utils:cmake:install-remote-tar with CMAKE_PACKAGE_NAME, TAR_SHA256, TAR_URL, and CMAKE_GEN_ARGS. Check that the indentation and naming for CMAKE_GEN_ARGS (and all other CMake vars) are correctly consumed by the util and that no parameters were overlooked.


61-66:

✅ Verification successful

Verify updated CMake install task invocation and variable names.

The task name has been namespaced to :utils:cmake:install-remote-tar, and variables have been renamed to CMAKE_PACKAGE_NAME, TAR_SHA256, and TAR_URL. Please confirm that the upstream util definition in tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml matches these identifiers and namespace.


🏁 Script executed:

#!/bin/bash
# Verify cmake install task exists with the correct name and vars
rg -R "cmake:install-remote-tar" -n tools/yscope-dev-utils/exports/taskfiles/utils

Length of output: 487


The previous rg -R invocation failed because Ripgrep doesn’t use -R for recursive search. Let’s re-run without it and also check for the renamed variables:


🏁 Script executed:

#!/bin/bash
# Correctly verify that the cmake install task and vars are defined upstream
rg "install-remote-tar" -n tools/yscope-dev-utils/exports/taskfiles/utils/*.yaml
rg "CMAKE_PACKAGE_NAME"   -n tools/yscope-dev-utils/exports/taskfiles/utils/*.yaml
rg "TAR_SHA256"           -n tools/yscope-dev-utils/exports/taskfiles/utils/*.yaml
rg "TAR_URL"              -n tools/yscope-dev-utils/exports/taskfiles/utils/*.yaml

Length of output: 4680


CMake install-remote-tar task and variables match upstream definition

I confirmed in tools/yscope-dev-utils/exports/taskfiles/utils/cmake.yaml that:

  • The install-remote-tar task is defined (around line 160).
  • Its vars: list includes ["CMAKE_PACKAGE_NAME", "TAR_SHA256", "TAR_URL", "WORK_DIR"] (around line 184).

The invocation in taskfiles/deps.yaml aligns exactly with these names and namespace.

taskfiles/lint-cpp.yaml (6)

20-20: Include source directory in format sources.

Adding {{.G_CPP_SRC_DIR}} ensures all project files are linted. Confirm that the cpp-lint util will traverse directories using the provided include patterns.


27-31: Switch to namespaced clang-format util with list flags and patterns.

The task now calls :utils:cpp-lint:clang-format with FLAGS as a list and explicit INCLUDE_FILENAME_PATTERNS. This enhances maintainability and consistency.


56-60: Propagate source directory change to static-check.

Including {{.G_CPP_SRC_DIR}} here ensures the static analyzer sees all source files, matching the formatting tasks’ configuration.


68-75: Update clang-tidy invocation to new util and patterns.

Switching to :utils:cpp-lint:clang-tidy-find with list-based FLAGS and INCLUDE_PATTERNS is clear. Ensure that {{.G_SPIDER_COMPILE_COMMANDS_DB}} is correctly populated in CI and that the glob patterns ({{.G_SRC_SPIDER_DIR}}/**, {{.G_TEST_DIR}}/**) cover your directory structure.


83-84: Redirect lint-config sources to exports directory.

Pointing to tools/yscope-dev-utils/exports/lint-configs/.clang-format and .clang-tidy aligns with the taskfile reorganization. Verify that these files exist at the new paths.


91-91: Update symlink script path.

The script has moved to exports/lint-configs; ensure symlink-cpp-lint-configs.sh still functions without path or permission issues.

- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}"
Copy link
Member

Choose a reason for hiding this comment

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

G_LINT_CLANG_TIDY_DIR is undefined. You probably want to add the following at the top of the file (after version ):

vars:
  G_LINT_CLANG_TIDY_DIR: "{{.G_BUILD_DIR}}/lint-clang-tidy"

Copy link
Member Author

Choose a reason for hiding this comment

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

I am going to remove it because we didn't use it before (also there is no output dir for cpp=format=check/fix

Copy link
Member

@kirkrodrigues kirkrodrigues May 26, 2025

Choose a reason for hiding this comment

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

If you read the docstring for clang-tidy-find, you'll see that it will default to putting it at the root of the repository. That's going to mess up developers' local copy unnecessarily, right?

- "{{.G_CPP_SRC_DIR}}/**/*.cpp"
- "{{.G_CPP_SRC_DIR}}/**/*.h"
- "{{.G_CPP_SRC_DIR}}/**/*.hpp"
- "{{.G_CPP_SRC_DIR}}"
Copy link
Member

Choose a reason for hiding this comment

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

Let's undo this change since ROOT_PATHS should really just be set to ["{{.G_CPP_SRC_DIR}}"].

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea true. I was doing so but finally I thought we might want to also check other files under other dirs and clang-tidy will help to filter files by extension automatically lol.

SRC_PATHS:
ref: ".G_LINT_CPP_DIRS"
FLAGS: ["--dry-run"]
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]

There are no .inc files in this repo.

ref: ".G_LINT_CPP_DIRS"
FLAGS: ["--dry-run"]
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
ROOT_PATHS: *cpp_format_src_files
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ROOT_PATHS: *cpp_format_src_files
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]

Comment on lines 44 to 45
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
ROOT_PATHS: *cpp_format_src_files
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
ROOT_PATHS: *cpp_format_src_files
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]

FLAGS:
- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
INCLUDE_PATTERNS: ["{{.G_CPP_SRC_DIR}}/*"]

INCLUDE_PATTERNS is different than INCLUDE_FILENAME_PATTERNS.

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel we should change this line to INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]? (Since this is a cpp-static-check task and from the doc of clang-tidy-find it is for:

Runs clang-tidy in parallel on C++ source files that match the given filter criteria.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but that's already the default in clang-tidy-find, so do we need to specify it?

- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}"
ROOT_PATHS: *cpp_static_src_files
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ROOT_PATHS: *cpp_static_src_files
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]

Comment on lines 80 to 87
CMAKE_PACKAGE_NAME: "{{.G_OUTCOME_LIB_NAME}}"
WORK_DIR: "{{.G_OUTCOME_WORK_DIR}}"
FILE_SHA256: "0382248cbb00806ce4b5f3ce6939797dc3b597c85fd3531614959e31ef488b39"
URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.11.tar.gz"
GEN_ARGS:
TAR_SHA256: "0382248cbb00806ce4b5f3ce6939797dc3b597c85fd3531614959e31ef488b39"
TAR_URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.11.tar.gz"
CMAKE_GEN_ARGS:
- "-C {{.G_DEPS_CMAKE_SETTINGS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}.cmake"
- "-DBUILD_TESTING=OFF"
- "-DCMAKE_BUILD_TYPE=Release"
Copy link
Member

Choose a reason for hiding this comment

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

Can we alphabetize these variables?

Comment on lines 100 to 106
CMAKE_PACKAGE_NAME: "{{.G_QUICKCPPLIB_LIB_NAME}}"
WORK_DIR: "{{.G_QUICKCPPLIB_WORK_DIR}}"
FILE_SHA256: "5d4c9b2d6fa177d3fb14f3fe3086867e43b44f4a7a944eb10ee4616b2b0f3c05"
URL: "https://github.com/ned14/quickcpplib/archive/f3e452e.tar.gz"
GEN_ARGS:
TAR_SHA256: "5d4c9b2d6fa177d3fb14f3fe3086867e43b44f4a7a944eb10ee4616b2b0f3c05"
TAR_URL: "https://github.com/ned14/quickcpplib/archive/f3e452e.tar.gz"
CMAKE_GEN_ARGS:
- "-DBUILD_TESTING=OFF"
- "-DCMAKE_BUILD_TYPE=Release"
Copy link
Member

Choose a reason for hiding this comment

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

Can we alphabetize these variables?

GEN_ARGS:
TAR_SHA256: "5d4c9b2d6fa177d3fb14f3fe3086867e43b44f4a7a944eb10ee4616b2b0f3c05"
TAR_URL: "https://github.com/ned14/quickcpplib/archive/f3e452e.tar.gz"
CMAKE_GEN_ARGS:
- "-DBUILD_TESTING=OFF"
- "-DCMAKE_BUILD_TYPE=Release"
- task: "add-package-root-to-cmake-settings"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of using add-package-root-to-cmake-settings and install-all-finish, we should really use the new install-deps-and-generate-settings task in yscope-dev-utils. You can see an example in CLP.

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)
taskfiles/lint-cpp.yaml (1)

72-80: 🛠️ Refactor suggestion

Define missing G_LINT_CLANG_TIDY_DIR for clang-tidy output

The cpp-static-check task uses OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}" but this variable isn’t declared in this file. Add a vars block at the top (similar to lint-yaml.yaml) to declare G_LINT_CLANG_TIDY_DIR: "{{.G_BUILD_DIR}}/lint-clang-tidy".

version: "3"
+vars:
+  G_LINT_CLANG_TIDY_DIR: "{{.G_BUILD_DIR}}/lint-clang-tidy"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 889fef8 and 4c0cefa.

📒 Files selected for processing (3)
  • taskfiles/deps.yaml (3 hunks)
  • taskfiles/lint-cpp.yaml (3 hunks)
  • taskfiles/lint-yaml.yaml (2 hunks)
🔇 Additional comments (8)
taskfiles/lint-yaml.yaml (2)

19-21: Approve addition of Clion build directory exclusions

The new exclude patterns for cmake-build-debug and cmake-build-release are applied consistently in both the sources list and the find command’s prune expression, ensuring Clion’s default build directories are skipped.

Also applies to: 29-33


37-39: Approve updated Yamllint configuration path

The yamllint invocation now points to the exports/lint-configs/.yamllint.yml file, aligning with the reorganised directory structure.

taskfiles/deps.yaml (3)

61-67: Approve task and variable renames in install-Catch2

The task reference is updated to :utils:cmake:install-remote-tar and variables NAMECMAKE_PACKAGE_NAME, FILE_SHA256TAR_SHA256, and URLTAR_URL. This brings consistency with the new yscope-dev-utils API.


78-88: Approve refactored install-outcome section

The install-outcome task now uses the new :utils:cmake:install-remote-tar invocation, introduces CMAKE_GEN_ARGS for CMake configuration, and renames variables for clarity. This mirrors the updated pattern in the Catch2 install.


98-107: Approve updates to install-quickcpplib

Similar changes are applied here: the task path and variable names align with the new conventions, and CMAKE_GEN_ARGS is correctly specified.

taskfiles/lint-cpp.yaml (3)

29-34: Approve updated clang-format invocation in cpp-format-check

The task now calls :utils:cpp-lint:clang-format with list-based FLAGS, explicit INCLUDE_FILENAME_PATTERNS, and ROOT_PATHS. This enhances readability and ensures only C++ sources are targeted.


43-48: Approve mirror changes in cpp-format-fix

The fix task now consistently uses list flags (-i), INCLUDE_FILENAME_PATTERNS, and ROOT_PATHS, matching the check task.


85-87: Approve updated lint config sources and symlink script

The cpp-configs task now refers to exports/lint-configs for both .clang-format and .clang-tidy, and the symlink script path is updated accordingly.

Also applies to: 93-93

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 4c0cefa and 148bb2d.

📒 Files selected for processing (2)
  • taskfiles/lint-cpp.yaml (4 hunks)
  • taskfiles/lint-yaml.yaml (1 hunks)
🔇 Additional comments (7)
taskfiles/lint-yaml.yaml (3)

16-18: Exclude IDE build directories from YAML lint
The new exclude entries for cmake-build-debug and cmake-build-release align with other lint tasks and prevent unnecessary lint errors on generated files.


26-31: Prune new build directories in find command
The updated find prune expression now skips the additional cmake-build-debug and cmake-build-release directories, matching the sources exclusions.


34-36: Update Yamllint configuration file path
The --config-file flag now points to the relocated .yamllint.yml under exports/lint-configs, keeping it consistent with other taskfiles. Ensure that this file exists at the new path.

taskfiles/lint-cpp.yaml (4)

3-5: Define clang-tidy output directory
Introducing G_LINT_CLANG_TIDY_DIR ensures clang-tidy-find has a designated output directory. This variable is correctly referenced later in the static-check task.


32-37: Switch to :utils:cpp-lint:clang-format with list flags
The clang-format invocation has been updated to the new namespace and uses list-style FLAGS. This matches changes in other taskfiles and improves flag parsing.


46-51: Apply formatting fixes with the new lint task
The cpp-format-fix task mirrors the updated clang-format invocation and correctly applies the -i flag with filename patterns.


88-90: Update C++ lint config source paths
The cpp-configs task now pulls .clang-format and .clang-tidy from the exports/lint-configs directory, matching other taskfiles.

Comment on lines 75 to 83
- task: ":utils:cpp-lint:clang-tidy-find"
vars:
FLAGS: >-
--config-file "{{.ROOT_DIR}}/.clang-tidy"
-p "{{.G_COMPILE_COMMANDS_DB}}"
SRC_PATHS:
ref: ".G_LINT_CPP_DIRS"
FLAGS:
- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]
OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}"
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]
VENV_DIR: "{{.G_LINT_VENV_DIR}}"
Copy link

@coderabbitai coderabbitai bot May 26, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Validate and refine clang-tidy flag syntax
Currently the FLAGS list embeds both flag names and values in single strings (e.g., --config-file '{{.ROOT_DIR}}/.clang-tidy'). This can lead to quoting or parsing issues in YAML. Consider splitting them into separate list elements:

  FLAGS:
-   - "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
-   - "-p '{{.G_COMPILE_COMMANDS_DB}}'"
+   - "--config-file"
+   - "{{.ROOT_DIR}}/.clang-tidy"
+   - "-p"
+   - "{{.G_COMPILE_COMMANDS_DB}}"

Let’s inspect how other tasks define FLAGS to ensure we follow existing conventions:


🏁 Script executed:

#!/bin/bash
rg -n "FLAGS:" -A3 taskfiles

Length of output: 1461


Separate clang-tidy flags and their arguments
The FLAGS list in the :utils:cpp-lint:clang-tidy-find task currently combines option names and their values into single strings, which diverges from the established pattern (see lines 34 and 48) and can break proper argument splitting at runtime. Please split each flag and its value into its own YAML entry:

• Location: taskfiles/lint-cpp.yaml (around lines 77–79)

   FLAGS:
-    - "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
-    - "-p '{{.G_COMPILE_COMMANDS_DB}}'"
+    - "--config-file"
+    - "{{.ROOT_DIR}}/.clang-tidy"
+    - "-p"
+    - "{{.G_COMPILE_COMMANDS_DB}}"
📝 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
- task: ":utils:cpp-lint:clang-tidy-find"
vars:
FLAGS: >-
--config-file "{{.ROOT_DIR}}/.clang-tidy"
-p "{{.G_COMPILE_COMMANDS_DB}}"
SRC_PATHS:
ref: ".G_LINT_CPP_DIRS"
FLAGS:
- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]
OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}"
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]
VENV_DIR: "{{.G_LINT_VENV_DIR}}"
- task: ":utils:cpp-lint:clang-tidy-find"
vars:
FLAGS:
- "--config-file"
- "{{.ROOT_DIR}}/.clang-tidy"
- "-p"
- "{{.G_COMPILE_COMMANDS_DB}}"
INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp"]
OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}"
ROOT_PATHS: ["{{.G_CPP_SRC_DIR}}"]
VENV_DIR: "{{.G_LINT_VENV_DIR}}"
🤖 Prompt for AI Agents
In taskfiles/lint-cpp.yaml around lines 75 to 83, the FLAGS list combines flag
names and their values into single strings, which can cause quoting or parsing
issues. To fix this, split each flag and its argument into separate list
entries, for example, replace "--config-file '{{.ROOT_DIR}}/.clang-tidy'" with
two entries: "--config-file" and "'{{.ROOT_DIR}}/.clang-tidy'". Apply the same
for the "-p" flag and its value, ensuring each flag and its parameter are
distinct elements in the FLAGS list.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is not clear to separate the flag and value in different lines unless the values or flag is too long

Copy link

Choose a reason for hiding this comment

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

@anlowee, I understand your preference for keeping flags and their values together for better readability. You're right that combining them in single strings like "--config-file '{{.ROOT_DIR}}/.clang-tidy'" is clearer and more intuitive to read, especially when the values aren't excessively long. I'll respect this coding style preference for the project.

   /|   /|  
  ( :v:  )
   |(_)|

✏️ Learnings added
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.163Z
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.

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.

Comment on lines 16 to 18
# The following are for Clion's default generated build dirs
- exclude: "{{.ROOT_DIR}}/cmake-build-debug/*"
- exclude: "{{.ROOT_DIR}}/cmake-build-release/*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# The following are for Clion's default generated build dirs
- exclude: "{{.ROOT_DIR}}/cmake-build-debug/*"
- exclude: "{{.ROOT_DIR}}/cmake-build-release/*"
# Exclude CMake build directories generated by CLion
- exclude: "{{.ROOT_DIR}}/cmake-build-*"
  • We should include an empty line before each comment block.
  • CLion can generate many different build directories, but they're all prefixed by cmake-build-

Comment on lines 29 to 30
-o -path '**/cmake-build-debug' \
-o -path '**/cmake-build-release' \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
-o -path '**/cmake-build-debug' \
-o -path '**/cmake-build-release' \
-o -path '**/cmake-build-*' \

Comment on lines 34 to 36
xargs -0 yamllint \
--config-file "tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml" \
--strict
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
xargs -0 yamllint \
--config-file "tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml" \
--strict
xargs -0 \
yamllint \
--config-file "tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml" \
--strict

Comment on lines 56 to 62
sources: &cpp_static_src_files
- "{{.G_CMAKE_CACHE}}"
- "{{.G_COMPILE_COMMANDS_DB}}"
- "{{.G_LINT_VENV_CHECKSUM_FILE}}"
- "{{.G_CPP_SRC_DIR}}/**/*.cpp"
- "{{.G_CPP_SRC_DIR}}/**/*.h"
- "{{.G_CPP_SRC_DIR}}/**/*.hpp"
- "{{.G_CPP_SRC_DIR}}"
- "{{.ROOT_DIR}}/.clang-tidy"
- "{{.TASKFILE}}"
Copy link
Member

Choose a reason for hiding this comment

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

I meant get rid of the sources KV pair entirely.

FLAGS:
- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- "-p '{{.G_COMPILE_COMMANDS_DB}}'"
INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"]
Copy link
Member

Choose a reason for hiding this comment

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

Sure, but that's already the default in clang-tidy-find, so do we need to specify it?

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cfad49e and aff82e7.

📒 Files selected for processing (2)
  • taskfiles/lint-cpp.yaml (4 hunks)
  • taskfiles/lint-yaml.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
taskfiles/lint-cpp.yaml (1)
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#63
File: taskfiles/lint-cpp.yaml:75-83
Timestamp: 2025-05-26T15:34:11.163Z
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.
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: lint-check (macos-15)
🔇 Additional comments (7)
taskfiles/lint-yaml.yaml (2)

26-29: Verify find prune syntax
You’ve added -path '**/cmake-build-*' to the prune list, which matches the new exclude rule. Please confirm that your find implementation supports the ** wildcard (some versions treat * as matching directory separators by default).


33-36: Yamllint config path updated
The lint command now points at tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml, aligning with the relocated configs. Please verify that this file exists at the new path and is picked up in CI.

taskfiles/lint-cpp.yaml (5)

32-36: Migrate format-check to new util task
Updating cpp-format-check to invoke :utils:cpp-lint:clang-format with --dry-run, INCLUDE_FILENAME_PATTERNS, and ROOT_PATHS follows the project conventions and the retrieved learning on flag formatting.


46-50: Migrate format-fix to new util task
The cpp-format-fix task now uses the -i flag alongside the correct filename patterns and root paths, keeping it in sync with the check task.


66-72: Switch to clang-tidy-find
Transitioning cpp-static-check to :utils:cpp-lint:clang-tidy-find with combined flags, OUTPUT_DIR, and ROOT_PATHS removes the old sources list and leverages the new lint infrastructure cleanly.


78-79: Update lint-config source paths
The .clang-format and .clang-tidy config sources have been updated to tools/yscope-dev-utils/exports/lint-configs, matching the repository reorganisation.


86-86: Symlink script invocation path
The symlink script now correctly references the exports/lint-configs directory, ensuring the generated configs point to the right location.

Comment on lines +3 to +5
vars:
G_LINT_CLANG_TIDY_DIR: "{{.G_BUILD_DIR}}/lint-clang-tidy"

Copy link

@coderabbitai coderabbitai bot May 27, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Introduce clang-tidy output directory var
Declaring G_LINT_CLANG_TIDY_DIR at the top-level is perfect for a single source of truth. For future clarity, you could add a one-line comment explaining that it’s used by the static-check task.

🤖 Prompt for AI Agents
In taskfiles/lint-cpp.yaml at lines 3 to 5, add a one-line comment above the
G_LINT_CLANG_TIDY_DIR variable declaration explaining that this variable defines
the output directory used by the static-check task. This will improve future
clarity by documenting the purpose of the variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no need to add comment here, the variable name is self-explained.

Copy link

Choose a reason for hiding this comment

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

@anlowee You're absolutely right! The variable name G_LINT_CLANG_TIDY_DIR is indeed self-explanatory with its clear naming convention. I acknowledge your decision - no comment needed here.

@anlowee anlowee requested a review from kirkrodrigues May 27, 2025 16:19
Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

For the PR title & body, how about:

refactor: Update to the latest version of yscope-dev-utils:
- Update taskfiles to use the latest yscope-dev-utils tasks.
- Update lint tools to use the latest yscope-dev-utils lint configs, and fix violations.

@anlowee anlowee changed the title feat: Bump yscope-dev-utils version. refactor: Update to the latest version of yscope-dev-utils: - Update taskfiles to use the latest yscope-dev-utils tasks. - Update lint tools to use the latest yscope-dev-utils lint configs, and fix violations. May 27, 2025
@anlowee anlowee changed the title refactor: Update to the latest version of yscope-dev-utils: - Update taskfiles to use the latest yscope-dev-utils tasks. - Update lint tools to use the latest yscope-dev-utils lint configs, and fix violations. refactor: Update to the latest version of yscope-dev-utils. May 27, 2025
@anlowee anlowee merged commit 3fbc72e into y-scope:main May 27, 2025
9 checks passed
@kirkrodrigues kirkrodrigues changed the title refactor: Update to the latest version of yscope-dev-utils. refactor: Update to the latest version of yscope-dev-utils: May 27, 2025
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