Skip to content

Remove clang-format and clang-tidy as dependencies#194

Merged
shenxianpeng merged 4 commits intomainfrom
copilot/remove-unnecessary-dependencies
Mar 29, 2026
Merged

Remove clang-format and clang-tidy as dependencies#194
shenxianpeng merged 4 commits intomainfrom
copilot/remove-unnecessary-dependencies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

Having clang-format and clang-tidy pinned as install-time dependencies means they land in the venv unconditionally. When a user provides a wrong path to clang tools, the system silently falls back to these pre-installed versions rather than failing visibly.

Changes

  • pyproject.toml: Removed clang-format and clang-tidy from dependencies. Tools are still installed on-demand at runtime via the existing resolve_install_install_tool (pip) mechanism.
  • util.py: DEFAULT_CLANG_FORMAT_VERSION and DEFAULT_CLANG_TIDY_VERSION now derive from the tail of the auto-updated CLANG_FORMAT_VERSIONS/CLANG_TIDY_VERSIONS lists in versions.py, instead of being read from pyproject.toml dependencies.
  • uv.lock: Regenerated; removes clang-format, clang-tidy, and the transitively pulled setuptools.
  • .github/workflows/release-drafter.yml: Removed the Set up Python and Install dependencies steps. Version extraction now reads directly from versions.py via sys.path, eliminating the need to install the package at all.

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Remove unnecessary dependencies in cpp-linter-hooks Remove clang-format and clang-tidy as hard package dependencies Mar 29, 2026
Copilot AI requested a review from shenxianpeng March 29, 2026 16:35
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.72%. Comparing base (4a6686c) to head (2dc27c0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #194   +/-   ##
=======================================
  Coverage   95.72%   95.72%           
=======================================
  Files           4        4           
  Lines         117      117           
=======================================
  Hits          112      112           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 29, 2026

Merging this PR will not alter performance

✅ 63 untouched benchmarks
⏩ 13 skipped benchmarks1


Comparing copilot/remove-unnecessary-dependencies (2dc27c0) with main (4a6686c)

Open in CodSpeed

Footnotes

  1. 13 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@2bndy5 2bndy5 changed the title Remove clang-format and clang-tidy as hard package dependencies build: Remove clang-format and clang-tidy as dependencies Mar 29, 2026
@shenxianpeng
Copy link
Copy Markdown
Member

@copilot since clang-format and clang-tidy are removed fromhe pyproject.toml. this file .github/workflows/release-drafter.yml should be also updated

@shenxianpeng shenxianpeng marked this pull request as ready for review March 29, 2026 20:32
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 29, 2026

@copilot since clang-format and clang-tidy are removed fromhe pyproject.toml. this file .github/workflows/release-drafter.yml should be also updated

Done in 304561b. Removed the Set up Python and Install dependencies steps entirely — the version extraction step now reads directly from versions.py using python3 -c "import sys; sys.path.insert(0, 'cpp_linter_hooks'); from versions import CLANG_FORMAT_VERSIONS; print(CLANG_FORMAT_VERSIONS[-1])" without needing the package installed.

@shenxianpeng shenxianpeng requested a review from 2bndy5 March 29, 2026 20:37
@shenxianpeng shenxianpeng added the enhancement New feature or request label Mar 29, 2026
@sonarqubecloud
Copy link
Copy Markdown

@shenxianpeng shenxianpeng merged commit eac9503 into main Mar 29, 2026
18 checks passed
@shenxianpeng shenxianpeng deleted the copilot/remove-unnecessary-dependencies branch March 29, 2026 21:01
@shenxianpeng shenxianpeng added the minor A minor version bump label Mar 29, 2026
@shenxianpeng shenxianpeng changed the title build: Remove clang-format and clang-tidy as dependencies Remove clang-format and clang-tidy as dependencies Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor A minor version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the unnecessary dependencies in cpp-linter-hooks

3 participants