All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Drop support for Python 3.8 and 3.9 (end-of-life)
- Add support for Python 3.13
- Minimum required Python version is now 3.10
- Fixed PowerShell system test script using
$?instead of$LASTEXITCODEfor exit code handling
-
Fix SonarCloud violations:
- Fix return type annotation for
_load_from_tomlmethod in_argparse.py - Reduce cognitive complexity in
_cmake.pyby extracting helper methods - Reduce cognitive complexity in
_cmake_test.pyby extracting test helpers - Fix variable naming conventions in test files
- Fix GitHub Actions security issues by using environment variables for user-controlled data
- Add input validation for workflow_dispatch parameters
- Fix shell script issues in
run_tests.sh(use[[instead of[, add return statements)
- Fix return type annotation for
-
Fixed Windows CI by using pip to install cppcheck (Chocolatey package is broken)
-
Modernize ruff configuration to follow latest guidelines
- Remove deprecated settings (
target-version,ANN101,ASYNC1, etc.) - Replace
TCHwithTC(renamed rule set) - Add new rule sets:
DOC,PYI,PD - Configure
blacken-docsto use ruff instead of black
- Remove deprecated settings (
-
Clarify where to put the settings in
pyproject.toml -
Update GitHub Action
actions/download-artifactto v4 -
Update GitHub Action
actions/upload-artifactto v4 -
Update GitHub Action
codecov/codecov-actionfrom v4 to v5 -
Use GitHub Action
SonarSource/sonarqube-scan-actionv7 -
Update GitHub Action
github/codeql-actionfrom v3 to v4 -
Update GitHub Action
stefanzweifel/git-auto-commit-actionfrom v5 to v7 -
Update
github.com/pre-commit/pre-commit-hookshook to v6.0.0 -
Update
https://github.com/PyCQA/doc8/hook to v2.0.0 -
Update
github.com/codespell-project/codespellhook to v2.4.1 -
Update
github.com/shellcheck-py/shellcheck-pyhook to v0.11.0.1 -
Update
github.com/adrienverge/yamllint.githook to v1.37.1 -
Update
github.com/asottile/blacken-docshook to 1.19.1 -
Update
github.com/astral-sh/ruff-pre-commithook to v0.14.10
v1.9.6 - 2024-06-02
- Apply new linter/formatters
- Fixed a bug where a condition always evaluated to
true
- Update GitHub Action
action/setup-pythonto v5 - Update GitHub Action
codecov/codecov-actionfrom v3 to v4 - Update GitHub Action
ilammy/msvc-dev-cmdfrom v1.12.1 to v1.13.0 - Update GitHub Action
thomaseizinger/create-pull-requestto v1.4.0 - Update
adrienverge/yamllinthook to v1.35.1 - Update
astral-sh/ruff-pre-commithook to v0.4.5 - Update
codespell-project/codespellhook to v2.3.0 - Update
Lucas-C/pre-commit-hookhook to v1.5.5 - Update
pre-commit/pre-commit-hookshook to v4.6.0 - Update
shellcheck-py/shellcheck-pyhook to v0.10.0
v1.9.5 - 2023-12-15
- Added metadata to mark support for Python 3.12 and enabled CI checks for it
- Implemented PEP-621
- Remove all Python linters/formatters in favour of ruff
- Require setuptools>=61.0 in preparation for PEP-621
- Fix GitHub workflows
- Update
astral-sh/ruff-pre-committo v0.1.8 - Update
adrienverge/yamllinthook to v1.33.0
v1.9.4 - 2023-10-15
- Added dependency on the Python
attrslibrary
- Improved the printing of output when multiple files have been processed
- Update
pre-commit/pre-commit-hookshook to v4.5.0
v1.9.3 - 2023-10-09
- Fixed an issue when handling
--arguments
- Update
asottile/blacken-docshook to v1.16.0 - Update
astral-sh/ruff-pre-committo v0.0.292 - Update
codespell-project/codespellhook to v2.2.6 - Update
Lucas-C/pre-commit-hookshook to v1.5.4 - Update
psf/blackhook to v23.9.1 - Update
shellcheck-py/shellcheck-pyhook to v0.9.0.6 - Update GitHub Action
stefanzweifel/git-auto-commit-actionto v5
v1.9.2 - 2023-07-19
- Added
--no-cmake-configureoption to avoid calling CMake configure but still use a compilation database if one can be found
- Update
asottile/blacken-docshook to v1.15.0 - Update
astral-sh/ruff-pre-committo v0.0.278 - Update
charliermarsh/ruff-pre-commithook to v0.0.275 - Update
codespell-project/codespellhook to v2.2.5 - Update
psf/blackhook to v23.7.0 - Upgrade GitHub Action
thomaseizinger/create-pull-requestto v1.3.1
v1.9.1 - 2023-06-18
- Add proper support for clang-format "linter" mode (ie.
--dry-run)
- Avoid setting up CMake arguments for clang-format hook
- Update release drafting GitHub workflow
- Modify pull requests workflow to automatically update CHANGELOG file if it was created by pre-commit.ci
- Update
charliermarsh/ruff-pre-commithook to v0.0.272 - Update
shellcheck-py/shellcheck-pyhook to v0.9.0.5
v1.9.0 - 2023-05-24
- Added Python tests using PyTest
- Added support for parsing hook parameters from TOML configuration files
- Added option to dump the current configuration as TOML-formatted output on the standard output (
--dump-toml) - Added option to parse CMake trace output to detect files generated using
configure_file(...)
- Fixed potential issue with CppCheck hook always running on all files in compile database
- CppCheck hook will now exclude C++ header files by default since those are not present within the compilatioon databasebecauzse
- Make default logging level
INFOinstead ofWARNING - Move all CMake handling code into dedicated sub-module
- Minor adjustments to logging output format
- Update README
- Use ruff for linting over other Python linters
- System tests now run using LOGLEVEL=DEBUG
- Improved configuration for external linters (e.g. SonarCloud, Codacy)
- Update
yamllinthook to v1.32.0
v1.8.1 - 2023-04-20
- Added support for C++ module files by default
- Fixed some typos in the README file (thanks to @onuralpszr)
- Require users to explicitly set
-B|--build-dirif they pass--presetto CMake (see issue #63)
- Update
Lucas-C/pre-commit-hookshook to v1.5.1 - Update
codespellto v2.2.4 - Update
yamllinthook to v1.30.0 - Update
blackhook to v23.3.0 - Update
bandithook to v1.7.5 - Update
isorthook to v5.12.0
v1.8.0 - 2023-02-16
- Added support for the CMake
--presetcommand line argument
v1.7.0 - 2023-02-09
- Added support for reading
compile_commands.json(generated by CMake) when running the hooks in order to automatically discover files
- Added some more pre-commit hooks:
- shellcheck
- bandit
- Add new badges to README file for CodeFactor.io and SonarCloud
- Update
blackhook to v23.1.0
v1.6.0 - 2023-02-07
- Added
include-what-you-use-condaandcppcheck-condahooks to install both tools using conda environments
- Changed minimum Python version to 3.8.X
- Allow
lizardhook to handle Fortran files
- Update GitHub release publishing workflow
- Added some more pre-commit hooks:
- doc8
- codespell
- yamllint
- blacken-docs
- pyupgrade
- Update
action/setup-pythonGitHub Action to v5 - Update
action/checkoutGitHub Action to v4 - Update
github/codeql-action/analyzeGitHub Action to v3 - Update
ilammy/msvc-dev-cmdGitHub Action to v1.12.1 - Update
thomaseizinger/create-pull-requestGitHub Action to v1.3.0 - Update
Lucas-C/pre-commit-hookshook to v1.4.2 - Update
asottile/pyupgradeto v3.2.0 - Update
blackhook to v22.10.0 - Update
blacken-docshook to v1.13.0 - Update
flake8hook to v5.0.4 - Update
pre-commit/mirrors-pylintto v3.0.0a5 - Update
pre-commit/pre-commit-hooksto v4.3.0 - Update
pyupgradehook to v3.3.1 - Update
yamllinthook to v1.29.0 - Update
isorthook to v5.12.0
v1.5.3 - 2022-06-14
- Add support for installing
clang-formatusing Python if not found on the system - Add support for installing
lizardautomatically if not found on the system
- Correctly pass on the default argument list to
CLinters - Fixed issues with release publishing workflows on GitHub
- Update GitHub's CodeQL action to v2
- Update
astral-sh/ruff-pre-commithook to v0.4.7 - Update
pre-commit/pre-commit-hookshook to v4.3.0 - Update
Lucas-C/pre-commit-hookshook to v1.2.0 - Update
pre-commit/mirrors-pylinthook to v3.0.0a5 - Update
dangoslen/changelog-enforcerGitHub action to v3 - Update
thomaseizinger/create-pull-requestGitHub action to v1.2.2 - Update
blackhook to v22.3.0 - Update
check-manifestto v0.48
v1.5.2 - 2021-12-08
- Fixed indentation issue
v1.5.1 - 2021-12-08
- Fixed locating of compilation database in presence of a symbolic link in the source directory
- New step in "Format" GitHub action to make sure the CHANGELOG is updated with proper version section for hotfix/_ and release/_ branches
- Update
isorthook to v5.10.1 - Update
blackhook to v21.12b0 - Disable macOS CI for Python < 3.11 (now runs on M1 macs on GitHub)
v1.5.0 - 2021-11-08
- Support for
cpplint - Support for
lizard, a code complexity analyzer
- Update pre-commit hooks
- Update
thomaseizinger/create-pull-requestGiHub action to v1.3.0 - Update
isorthook to v5.10.0 - Update
blackhook to v21.10b0 - Update
check-manifesthook to v0.47 - Update
flake8hook to v4.0.1
v1.4.0 - 2021-07-16
- Support for simultaneous processing of all files using
--all-at-once
- Improved code handling standard output and error stream in case of multiple files
- Minor improvements to debugging output
- Do not attempt to copy the compilation database in the source directory if it exists and is a symbolic link
- Properly handle the
--cmakecommand line option
- Cleanup of
pre-commit-config.yamland added - Added some more flake8 plugins to the list used by
pre-commit:- flake8-breakpoint
- flake8-comprehensions
- flake8-docstrings
- flake8-eradicate
- flake8-mutable
v1.3.0 - 2021-06-27
- Support for platform-specific CMake options
Use
--linux,--macand--winto specify CMake flags that need to be provided only on the specific platform.--unixcan be used as a shortcut to specifying--linuxand--mac.
v1.2.0 - 2021-06-27
- Support for Include-What-You-Use
- Double-dash arguments not present in debug output
- Add tests that use pre-commit directly
- Add isort pre-commit hook
v1.1.2 - 2021-06-26
- Added debug command line option to show the exact commands being run when using pre-commit regardless of exit status
- Properly handle double-dash arguments for clang-tidy when multiple files are passed to the hook
v1.1.1 - 2021-06-26
- Added support for CUDA files by default
- Default source directory is now correctly set to the current directory
- Fix automatic release publication workflow
v1.1.0 - 2021-06-22
- Added Python 3.9 in the package's metadata
- Support for specifying more than one build directory If one of those exists and contains a configured CMake directory, that one will be chosen. If none already exist, the first specified alternative will be chosen.
- Issues with arguments parsing for arguments that are specified more than once
- Fix issue with CMake configure step when running hooks in parallel
- Update pre-commit configuration
v1.0.1 - 2021-06-20
- Support for GitHub actions
- Small test scripts for Linux, MacOS and Windows (only partial testing)
- Slightly more verbose output on certain failures
- Issue when passing paths to
subprocess.run()on Windows - CMake arguments being parsed more than once
v1.0.0 - 2021-06-18
Initial release with support for:
- clang-format
- clang-tidy
- cppcheck