Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 18, 2025

This PR automatically includes information about the default versions of clang-format and clang-tidy in GitHub release notes, providing users with clear visibility into which tool versions are used by default in each release.

Problem

Users had no easy way to determine which versions of clang-format and clang-tidy were used by default in each release, making it difficult to understand tool behavior and troubleshoot issues.

Solution

The implementation adds a "Default Clang Tools Versions" section to all release notes that automatically displays the current default versions:

## Default Clang Tools Versions

This release uses the following default versions:
- **clang-format**: `21.1.0`
- **clang-tidy**: `21.1.0`

Users can specify the desired version by adding the `--version` argument under `args` in their pre-commit configuration. See: [Custom Clang Tool Version](https://github.com/cpp-linter/cpp-linter-hooks?tab=readme-ov-file#custom-clang-tool-version)

Implementation Details

  • Release Configuration: Added .github/release-drafter.yml that extends the shared organization configuration with a custom template
  • Workflow Enhancement: Modified .github/workflows/release-drafter.yml to automatically extract tool versions and inject them into the release template via environment variables
  • Version Extraction: Leverages existing DEFAULT_CLANG_FORMAT_VERSION and DEFAULT_CLANG_TIDY_VERSION constants directly in the workflow using Python commands

Benefits

  • Transparency: Users can immediately see which tool versions are used by default
  • Reproducibility: Clear version information helps with debugging and consistency
  • Guidance: Release notes include information about how to override default versions with direct link to documentation
  • Automation: Tool versions are automatically updated when dependencies change, requiring no manual maintenance

The solution is minimal, maintains backward compatibility, and provides valuable information to users without disrupting existing workflows.

Fixes #117.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (8c45bb1) to head (0200537).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #119   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files           3        3           
  Lines         107      107           
=======================================
  Hits          101      101           
  Misses          6        6           

☔ 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.

@Copilot Copilot AI changed the title [WIP] Add default versions of clang-format and clang-tidy to each release notes Add default clang-format and clang-tidy versions to release notes Sep 18, 2025
@Copilot Copilot AI requested a review from shenxianpeng September 18, 2025 21:05
Copilot finished work on behalf of shenxianpeng September 18, 2025 21:05
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@Copilot Copilot AI requested a review from shenxianpeng September 19, 2025 06:36
Copilot finished work on behalf of shenxianpeng September 19, 2025 06:36
Copy link

codspeed-hq bot commented Sep 19, 2025

CodSpeed Performance Report

Merging #119 will not alter performance

Comparing copilot/fix-117 (9f9be32) with main (8c45bb1)

Summary

✅ 60 untouched
🆕 1 new
⏩ 13 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 test_get_default_versions_script N/A 471.2 µs N/A

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.

@shenxianpeng shenxianpeng marked this pull request as ready for review September 19, 2025 06:46
Copy link

@shenxianpeng shenxianpeng added the developer Changes that impact developers label Sep 19, 2025
@shenxianpeng shenxianpeng changed the title Add default clang-format and clang-tidy versions to release notes ci: add default clang-format and clang-tidy versions to release notes Sep 19, 2025
@shenxianpeng shenxianpeng changed the title ci: add default clang-format and clang-tidy versions to release notes build: add default clang-format and clang-tidy versions to release notes Sep 19, 2025
@shenxianpeng shenxianpeng merged commit 8649224 into main Sep 19, 2025
18 of 20 checks passed
@shenxianpeng shenxianpeng deleted the copilot/fix-117 branch September 19, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Changes that impact developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add default versions of clang-format and clang-tidy to each release notes
2 participants