Skip to content

Remove the unnecessary dependencies in cpp-linter-hooks #193

Description

@shenxianpeng

ok, so the nushell script handles a path as the version input:

Version is not an integer
Using custom clang tools installation at path: D:\a_temp/llvm

This works if the path points to a folder where clang-tidy and/or clang-format binaries exist.
But if the path is wrong (above example should be D:\a\_temp/llvm/bin), then cpp-linter uses the version installed in the venv:

INFO:CPP Linter:D:\a\_actions\cpp-linter\cpp-linter-action\fix-364\.venv\Scripts\clang-format.EXE --version: 21.1.2
INFO:CPP Linter:D:\a\_actions\cpp-linter\cpp-linter-action\fix-364\.venv\Scripts\clang-tidy.EXE --version: 21.1.1

This is because cpp-linter-hooks installs a version of clang tools as dependencies:

dependencies = [
"pip>=20.3", # Required to install clang-format and clang-tidy
"tomli>=1.1.0; python_version < '3.11'",
"clang-format==22.1.1",
"clang-tidy==22.1.0",
]

@shenxianpeng Can we remove the unnecessary dependencies in cpp-linter-hooks?

This isn't a deal breaker. It just causes confusion when the given path is wrong.

Originally posted by @2bndy5 in cpp-linter/cpp-linter-action#368 (comment)

Activity

  1. changed the title [-]remove the unnecessary dependencies in cpp-linter-hooks[/-] [+]Remove the unnecessary dependencies in cpp-linter-hooks[/+] on Mar 29, 2026
  2. shenxianpeng commented on Mar 29, 2026

    @shenxianpeng
    MemberAuthor

    @shenxianpeng Can we remove the unnecessary dependencies in cpp-linter-hooks?

    @2bndy5 I am not sure what dependencies are you referring to

  3. shenxianpeng commented on Mar 29, 2026

    @shenxianpeng
    MemberAuthor

    It seems like remove clang-format and clang-tidy dependencies make sense, but want to double check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions