Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: uv run pytest tests/ --codspeed
mode: instrumentation
mode: simulation
16 changes: 3 additions & 13 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .

- name: Extract default tool versions
id: versions
run: |
# Get versions from Python
CLANG_FORMAT_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_FORMAT_VERSION; print(DEFAULT_CLANG_FORMAT_VERSION)")
CLANG_TIDY_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_TIDY_VERSION; print(DEFAULT_CLANG_TIDY_VERSION)")
# Get versions directly from versions.py (no package install needed)
CLANG_FORMAT_VERSION=$(python3 -c "import sys; sys.path.insert(0, 'cpp_linter_hooks'); from versions import CLANG_FORMAT_VERSIONS; print(CLANG_FORMAT_VERSIONS[-1])")
CLANG_TIDY_VERSION=$(python3 -c "import sys; sys.path.insert(0, 'cpp_linter_hooks'); from versions import CLANG_TIDY_VERSIONS; print(CLANG_TIDY_VERSIONS[-1])")

# Export to GitHub Actions environment for subsequent steps
echo "CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions cpp_linter_hooks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def get_version_from_dependency(tool: str) -> Optional[str]:
return None


DEFAULT_CLANG_FORMAT_VERSION = get_version_from_dependency("clang-format")
DEFAULT_CLANG_TIDY_VERSION = get_version_from_dependency("clang-tidy")
DEFAULT_CLANG_FORMAT_VERSION = CLANG_FORMAT_VERSIONS[-1] # latest from versions.py
DEFAULT_CLANG_TIDY_VERSION = CLANG_TIDY_VERSIONS[-1] # latest from versions.py


def _resolve_version(versions: List[str], user_input: Optional[str]) -> Optional[str]:
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ classifiers = [
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",
]
dynamic = ["version"]

Expand Down
59 changes: 0 additions & 59 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading