-
Notifications
You must be signed in to change notification settings - Fork 3
build: add default clang-format and clang-tidy versions to release notes #119
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
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5a2fc56
Initial plan
Copilot 7b4ce0a
Add default tool versions to release notes
Copilot 01af810
Update scripts/get_default_versions.py
shenxianpeng 9f9be32
Update .github/release-drafter.yml
shenxianpeng 948d020
Remove unused script and tests, update release template title
Copilot 415e40d
Update .github/workflows/release-drafter.yml
shenxianpeng 8a73ee7
Update .github/workflows/release-drafter.yml
shenxianpeng 5ff47d5
chore: fix from pre-commit
shenxianpeng 0200537
docs: revise template
shenxianpeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,18 @@ | ||
| # Configuration for Release Drafter: https://github.com/toolmantim/release-drafter | ||
| _extends: .github | ||
|
|
||
| # Override the template to include default tool versions | ||
| template: | | ||
| <!-- Optional: add a release summary here --> | ||
|
|
||
| ## Default Tool Versions | ||
|
|
||
| This release uses the following default versions: | ||
| - **clang-format**: `$CLANG_FORMAT_VERSION` | ||
| - **clang-tidy**: `$CLANG_TIDY_VERSION` | ||
|
|
||
| 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) | ||
|
|
||
| $CHANGES | ||
|
|
||
| **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shenxianpeng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env python3 | ||
| """Script to extract default clang-format and clang-tidy versions from pyproject.toml.""" | ||
|
|
||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| # Add the project root to Python path | ||
| project_root = Path(__file__).parent.parent | ||
| sys.path.insert(0, str(project_root)) | ||
|
|
||
| from cpp_linter_hooks.util import DEFAULT_CLANG_FORMAT_VERSION, DEFAULT_CLANG_TIDY_VERSION | ||
|
|
||
| def main(): | ||
| """Print the default tool versions.""" | ||
| print(f"Default clang-format version: {DEFAULT_CLANG_FORMAT_VERSION}") | ||
| print(f"Default clang-tidy version: {DEFAULT_CLANG_TIDY_VERSION}") | ||
|
|
||
| # Also output in a format suitable for GitHub Actions | ||
| print(f"CLANG_FORMAT_VERSION={DEFAULT_CLANG_FORMAT_VERSION}") | ||
| print(f"CLANG_TIDY_VERSION={DEFAULT_CLANG_TIDY_VERSION}") | ||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.