Skip to content

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

@shenxianpeng

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)

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