cpp-linter 1.13.0__tar.gz → 1.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/dependabot.yml +2 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/analyze-workflows.yml +2 -2
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/release.yml +4 -4
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/tests.yml +46 -12
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.pre-commit-config.yaml +3 -3
- {cpp_linter-1.13.0/cpp_linter.egg-info → cpp_linter-1.14.0}/PKG-INFO +11 -1
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/README.rst +10 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/_version.py +3 -3
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/clang_tools/__init__.py +42 -24
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/clang_tools/clang_format.py +26 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/cli.py +15 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/loggers.py +24 -4
- {cpp_linter-1.13.0 → cpp_linter-1.14.0/cpp_linter.egg-info}/PKG-INFO +11 -1
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/SOURCES.txt +1 -1
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/scm_file_list.json +102 -102
- cpp_linter-1.14.0/cpp_linter.egg-info/scm_version.json +8 -0
- cpp_linter-1.14.0/tests/capture_tools_output/test_auto_fix.py +179 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/test_database_path.py +7 -1
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/test_tools_output.py +7 -1
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_cli_args.py +1 -0
- cpp_linter-1.13.0/.github/FUNDING.yml +0 -3
- cpp_linter-1.13.0/cpp_linter.egg-info/scm_version.json +0 -8
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.gitattributes +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/codeql.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/docs.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/labeler.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/pre-commit.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/release-drafter.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/workflows/stale.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.github/zizmor.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.gitignore +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/.readthedocs.yaml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/CONTRIBUTING.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/LICENSE +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/codecov.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/__init__.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/clang_tools/clang_tidy.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/clang_tools/patcher.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/common_fs/__init__.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/common_fs/file_filter.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/git/__init__.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/git/git_str.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/rest_api/__init__.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter/rest_api/github_api.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/dependency_links.txt +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/entry_points.txt +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/not-zip-safe +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/requires.txt +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cpp_linter.egg-info/top_level.txt +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/cspell.config.yml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.clang_tools.clang_format.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.clang_tools.clang_tidy.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.clang_tools.patcher.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.clang_tools.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.cli.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.common_fs.file_filter.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.common_fs.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.git.git_str.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.git.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.loggers.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.rest_api.github_api.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.rest_api.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/API-Reference/cpp_linter.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/_static/extra_css.css +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/_static/favicon.ico +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/_static/logo.png +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/building_docs.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/conf.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/contributing.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/index.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/permissions.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/docs/pr_review_caveats.rst +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/noxfile.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/pyproject.toml +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/setup.cfg +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/setup.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/opl/opl.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/opl/opl_sdl.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/pcsound/pcsound.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/pcsound/pcsound_sdl.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_musicpack.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sdlmusic.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sdlsound.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sound.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/net_sdl.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_0.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/info.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/p_enemy.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/p_local.h +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_0.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/cache/tests/demo/demo.cpp +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/cache/tests/demo/demo.hpp +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/cpp-linter/cpp-linter/test_git_lib.patch +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_0.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/cache/p_enemy.c +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_0.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/pr_22.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/pr_comments_pg1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/pr_comments_pg2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/push_8d68756375e0483c7ac2b4d6bbbece420dbbb495.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/push_comments_8d68756375e0483c7ac2b4d6bbbece420dbbb495.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/comments/test_comments.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/demo/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/demo/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/demo/compile_flags.txt +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/demo/demo.cpp +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/demo/demo.hpp +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/ignored_paths/.gitmodules +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/ignored_paths/test_ignored_paths.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/patch.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/pull_request_files_pg1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/pull_request_files_pg2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/push_files_pg1.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/push_files_pg2.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/list_changes/test_get_file_changes.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/.clang-format +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/.clang-tidy +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/pr_27.diff +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/pr_27.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/pr_review_comments.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/pr_reviews.json +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/reviews/test_pr_review.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_comment_length.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_git_str.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_misc.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_parse_clang_tidy_stdout.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/tests/test_rate_limits.py +0 -0
- {cpp_linter-1.13.0 → cpp_linter-1.14.0}/uv.lock +0 -0
|
@@ -12,11 +12,11 @@ jobs:
|
|
|
12
12
|
analyze-ci:
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
16
16
|
with:
|
|
17
17
|
persist-credentials: false
|
|
18
18
|
- name: Set up Python
|
|
19
|
-
uses: actions/setup-python@
|
|
19
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
20
20
|
with:
|
|
21
21
|
python-version: '3.x'
|
|
22
22
|
- name: Run zizmor
|
|
@@ -20,13 +20,13 @@ jobs:
|
|
|
20
20
|
build:
|
|
21
21
|
runs-on: ubuntu-latest
|
|
22
22
|
steps:
|
|
23
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
24
24
|
# use fetch --all for setuptools_scm to work
|
|
25
25
|
with:
|
|
26
26
|
fetch-depth: 0
|
|
27
27
|
persist-credentials: false
|
|
28
28
|
- name: Set up Python
|
|
29
|
-
uses: actions/setup-python@
|
|
29
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
30
30
|
with:
|
|
31
31
|
python-version: '3.x'
|
|
32
32
|
- name: Build distributions
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
path: dist
|
|
52
52
|
- name: Set up Python
|
|
53
53
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
54
|
-
uses: actions/setup-python@
|
|
54
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
55
55
|
with:
|
|
56
56
|
python-version: '3.x'
|
|
57
57
|
- name: Check distributions
|
|
@@ -59,4 +59,4 @@ jobs:
|
|
|
59
59
|
run: pipx run twine check dist/*
|
|
60
60
|
- name: Deploy to PyPI
|
|
61
61
|
if: startsWith(github.ref, 'refs/tags/')
|
|
62
|
-
uses: pypa/gh-action-pypi-publish@
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -23,12 +23,38 @@ on:
|
|
|
23
23
|
permissions: {}
|
|
24
24
|
|
|
25
25
|
jobs:
|
|
26
|
+
pre-seed-versions:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
outputs:
|
|
29
|
+
versions: ${{ steps.extract-version-range.outputs.versions }}
|
|
30
|
+
steps:
|
|
31
|
+
- env:
|
|
32
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
33
|
+
run: >-
|
|
34
|
+
gh release download
|
|
35
|
+
-R cpp-linter/clang-tools-static-binaries
|
|
36
|
+
--pattern versions.json
|
|
37
|
+
--output versions.json
|
|
38
|
+
- name: Extract version range
|
|
39
|
+
id: extract-version-range
|
|
40
|
+
shell: python
|
|
41
|
+
run: |-
|
|
42
|
+
import json
|
|
43
|
+
from os import environ
|
|
44
|
+
from pathlib import Path
|
|
45
|
+
content = Path("versions.json").read_text(encoding="utf-8")
|
|
46
|
+
metadata = json.loads(content)
|
|
47
|
+
versions = list(metadata["llvm_versions"].keys())
|
|
48
|
+
versions.sort()
|
|
49
|
+
with open(environ["GITHUB_OUTPUT"], mode="a") as gh_out:
|
|
50
|
+
gh_out.write(f"versions={json.dumps(versions)}\n")
|
|
26
51
|
test:
|
|
52
|
+
needs: pre-seed-versions
|
|
27
53
|
strategy:
|
|
28
54
|
fail-fast: false
|
|
29
55
|
matrix:
|
|
30
56
|
os: ['windows-latest', 'ubuntu-latest']
|
|
31
|
-
version:
|
|
57
|
+
version: ${{ fromJSON(needs.pre-seed-versions.outputs.versions) }}
|
|
32
58
|
env:
|
|
33
59
|
MAX_PYTHON_VERSION: '3.14'
|
|
34
60
|
# only used when installing for a pre-released python version
|
|
@@ -36,11 +62,11 @@ jobs:
|
|
|
36
62
|
|
|
37
63
|
runs-on: ${{ matrix.os }}
|
|
38
64
|
steps:
|
|
39
|
-
- uses: actions/checkout@
|
|
65
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
40
66
|
with:
|
|
41
67
|
persist-credentials: false
|
|
42
68
|
|
|
43
|
-
- uses: actions/setup-python@
|
|
69
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
44
70
|
with:
|
|
45
71
|
python-version: 3.x
|
|
46
72
|
|
|
@@ -60,7 +86,7 @@ jobs:
|
|
|
60
86
|
# sudo cmake --install build
|
|
61
87
|
|
|
62
88
|
- name: Install uv
|
|
63
|
-
uses: astral-sh/setup-uv@
|
|
89
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
64
90
|
with:
|
|
65
91
|
enable-cache: true
|
|
66
92
|
cache-dependency-glob: "uv.lock"
|
|
@@ -76,30 +102,38 @@ jobs:
|
|
|
76
102
|
- name: Install Linux clang dependencies
|
|
77
103
|
if: runner.os == 'Linux'
|
|
78
104
|
shell: bash
|
|
105
|
+
env:
|
|
106
|
+
CLANG_VERSION: ${{ matrix.version }}
|
|
79
107
|
run: |
|
|
80
108
|
sudo apt-get update
|
|
81
109
|
# First try installing from default Ubuntu repositories before trying LLVM script
|
|
82
|
-
if ! sudo apt-get install -y clang-format-${
|
|
110
|
+
if ! sudo apt-get install -y clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION}; then
|
|
83
111
|
# This LLVM script will add the relevant LLVM PPA: https://apt.llvm.org/
|
|
84
112
|
wget https://apt.llvm.org/llvm.sh -O ${{ runner.temp }}/llvm_install.sh
|
|
85
113
|
chmod +x ${{ runner.temp }}/llvm_install.sh
|
|
86
|
-
if sudo ${{ runner.temp }}/llvm_install.sh ${
|
|
87
|
-
sudo apt-get install -y clang-format-${
|
|
114
|
+
if sudo ${{ runner.temp }}/llvm_install.sh ${CLANG_VERSION}; then
|
|
115
|
+
sudo apt-get install -y clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION}
|
|
88
116
|
fi
|
|
89
117
|
fi
|
|
90
118
|
|
|
91
119
|
- name: Install clang-tools
|
|
120
|
+
shell: bash
|
|
121
|
+
env:
|
|
122
|
+
CLANG_VERSION: ${{ matrix.version }}
|
|
92
123
|
run: |
|
|
93
124
|
python -m pip install clang-tools
|
|
94
|
-
clang-tools install clang-format clang-tidy --version ${
|
|
125
|
+
clang-tools install clang-format clang-tidy --version "${CLANG_VERSION}"
|
|
95
126
|
|
|
96
127
|
- name: Is clang-only tests?
|
|
97
128
|
id: clang-dep
|
|
98
129
|
shell: python
|
|
130
|
+
env:
|
|
131
|
+
CLANG_VERSION: ${{ matrix.version }}
|
|
99
132
|
run: |-
|
|
100
133
|
from os import environ
|
|
101
134
|
with open(environ["GITHUB_OUTPUT"], mode="a") as gh_out:
|
|
102
|
-
|
|
135
|
+
curr_test_ver = environ["CLANG_VERSION"]
|
|
136
|
+
if curr_test_ver == "21":
|
|
103
137
|
gh_out.write("args=\n")
|
|
104
138
|
else:
|
|
105
139
|
gh_out.write("args=not no_clang\n")
|
|
@@ -125,7 +159,7 @@ jobs:
|
|
|
125
159
|
name: test-coverage
|
|
126
160
|
url: https://app.codecov.io/gh/cpp-linter/cpp-linter
|
|
127
161
|
steps:
|
|
128
|
-
- uses: actions/checkout@
|
|
162
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
129
163
|
with:
|
|
130
164
|
persist-credentials: false
|
|
131
165
|
|
|
@@ -136,12 +170,12 @@ jobs:
|
|
|
136
170
|
merge-multiple: true
|
|
137
171
|
|
|
138
172
|
- name: Setup python
|
|
139
|
-
uses: actions/setup-python@
|
|
173
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
140
174
|
with:
|
|
141
175
|
python-version: '3.x'
|
|
142
176
|
|
|
143
177
|
- name: Install uv
|
|
144
|
-
uses: astral-sh/setup-uv@
|
|
178
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
145
179
|
with:
|
|
146
180
|
enable-cache: true
|
|
147
181
|
cache-dependency-glob: "uv.lock"
|
|
@@ -20,14 +20,14 @@ repos:
|
|
|
20
20
|
args: ["--fix=lf"]
|
|
21
21
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
22
22
|
# Ruff version.
|
|
23
|
-
rev: v0.15.
|
|
23
|
+
rev: v0.15.20
|
|
24
24
|
hooks:
|
|
25
25
|
# Run the linter.
|
|
26
26
|
- id: ruff-check
|
|
27
27
|
# Run the formatter.
|
|
28
28
|
- id: ruff-format
|
|
29
29
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
30
|
-
rev: '
|
|
30
|
+
rev: 'v2.1.0'
|
|
31
31
|
hooks:
|
|
32
32
|
- id: mypy
|
|
33
33
|
additional_dependencies:
|
|
@@ -38,6 +38,6 @@ repos:
|
|
|
38
38
|
- requests-mock
|
|
39
39
|
- '.'
|
|
40
40
|
- repo: https://github.com/streetsidesoftware/cspell-cli
|
|
41
|
-
rev:
|
|
41
|
+
rev: v10.0.1
|
|
42
42
|
hooks:
|
|
43
43
|
- id: cspell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cpp-linter
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.14.0
|
|
4
4
|
Summary: Run clang-format and clang-tidy on a batch of files.
|
|
5
5
|
Author-email: Brendan Doherty <2bndy5@gmail.com>, Xianpeng Shen <xianpeng.shen@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,6 +65,16 @@ For usage in a CI workflow, see `the cpp-linter/cpp-linter-action repository <ht
|
|
|
65
65
|
|
|
66
66
|
For the description of supported Command Line Interface options, see `the CLI documentation <https://cpp-linter.github.io/cpp-linter/cli_args.html>`_
|
|
67
67
|
|
|
68
|
+
Applying fixes
|
|
69
|
+
--------------
|
|
70
|
+
|
|
71
|
+
Passing the ``--fix`` option makes cpp-linter apply clang-format fixes in-place to
|
|
72
|
+
any files that have formatting problems.
|
|
73
|
+
|
|
74
|
+
.. note::
|
|
75
|
+
``--fix`` only applies **clang-format** fixes. clang-tidy fixes are not applied
|
|
76
|
+
automatically.
|
|
77
|
+
|
|
68
78
|
Have question or feedback?
|
|
69
79
|
--------------------------
|
|
70
80
|
|
|
@@ -34,6 +34,16 @@ For usage in a CI workflow, see `the cpp-linter/cpp-linter-action repository <ht
|
|
|
34
34
|
|
|
35
35
|
For the description of supported Command Line Interface options, see `the CLI documentation <https://cpp-linter.github.io/cpp-linter/cli_args.html>`_
|
|
36
36
|
|
|
37
|
+
Applying fixes
|
|
38
|
+
--------------
|
|
39
|
+
|
|
40
|
+
Passing the ``--fix`` option makes cpp-linter apply clang-format fixes in-place to
|
|
41
|
+
any files that have formatting problems.
|
|
42
|
+
|
|
43
|
+
.. note::
|
|
44
|
+
``--fix`` only applies **clang-format** fixes. clang-tidy fixes are not applied
|
|
45
|
+
automatically.
|
|
46
|
+
|
|
37
47
|
Have question or feedback?
|
|
38
48
|
--------------------------
|
|
39
49
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.14.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 14, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g2e850a5d0'
|
|
@@ -8,7 +8,13 @@ import shutil
|
|
|
8
8
|
|
|
9
9
|
from ..common_fs import FileObj, FileIOTimeout
|
|
10
10
|
from ..common_fs.file_filter import TidyFileFilter, FormatFileFilter
|
|
11
|
-
from ..loggers import
|
|
11
|
+
from ..loggers import (
|
|
12
|
+
start_log_group,
|
|
13
|
+
end_log_group,
|
|
14
|
+
worker_log_init,
|
|
15
|
+
should_use_rich,
|
|
16
|
+
logger,
|
|
17
|
+
)
|
|
12
18
|
from .clang_tidy import run_clang_tidy, TidyAdvice
|
|
13
19
|
from .clang_format import run_clang_format, FormatAdvice
|
|
14
20
|
from ..cli import Args
|
|
@@ -37,6 +43,7 @@ def assemble_version_exec(tool_name: str, specified_version: str) -> str | None:
|
|
|
37
43
|
def _run_on_single_file(
|
|
38
44
|
file: FileObj,
|
|
39
45
|
log_lvl: int,
|
|
46
|
+
use_rich: bool,
|
|
40
47
|
tidy_cmd: str | None,
|
|
41
48
|
db_json: list[dict[str, str]] | None,
|
|
42
49
|
format_cmd: str | None,
|
|
@@ -44,31 +51,14 @@ def _run_on_single_file(
|
|
|
44
51
|
tidy_filter: TidyFileFilter | None,
|
|
45
52
|
args: Args,
|
|
46
53
|
) -> tuple[str, str, TidyAdvice | None, FormatAdvice | None]:
|
|
47
|
-
log_stream = worker_log_init(log_lvl)
|
|
54
|
+
log_stream = worker_log_init(log_lvl, use_rich)
|
|
48
55
|
filename = Path(file.name).as_posix()
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
format_advice = run_clang_format(
|
|
56
|
-
command=format_cmd,
|
|
57
|
-
file_obj=file,
|
|
58
|
-
style=args.style,
|
|
59
|
-
lines_changed_only=args.lines_changed_only,
|
|
60
|
-
format_review=args.format_review,
|
|
61
|
-
)
|
|
62
|
-
except FileIOTimeout: # pragma: no cover
|
|
63
|
-
logger.error(
|
|
64
|
-
"Failed to read or write contents of %s when running clang-format",
|
|
65
|
-
filename,
|
|
66
|
-
)
|
|
67
|
-
except OSError: # pragma: no cover
|
|
68
|
-
logger.error(
|
|
69
|
-
"Failed to open the file %s when running clang-format", filename
|
|
70
|
-
)
|
|
71
|
-
|
|
57
|
+
# clang-tidy must run *before* clang-format, because `--fix` rewrites the
|
|
58
|
+
# file in place. clang-tidy reports line numbers from the file on disk, but
|
|
59
|
+
# its `--line-filter` (and the PR review comments built from its output) use
|
|
60
|
+
# line numbers from the event's diff. Formatting first would shift every
|
|
61
|
+
# subsequent diagnostic, silently dropping some and misplacing the rest.
|
|
72
62
|
tidy_note = None
|
|
73
63
|
if tidy_cmd is not None and (
|
|
74
64
|
tidy_filter is None or tidy_filter.is_source_or_ignored(file.name)
|
|
@@ -92,6 +82,29 @@ def _run_on_single_file(
|
|
|
92
82
|
except OSError: # pragma: no cover
|
|
93
83
|
logger.error("Failed to open the file %s when running clang-tidy", filename)
|
|
94
84
|
|
|
85
|
+
format_advice = None
|
|
86
|
+
if format_cmd is not None and (
|
|
87
|
+
format_filter is None or format_filter.is_source_or_ignored(file.name)
|
|
88
|
+
):
|
|
89
|
+
try:
|
|
90
|
+
format_advice = run_clang_format(
|
|
91
|
+
command=format_cmd,
|
|
92
|
+
file_obj=file,
|
|
93
|
+
style=args.style,
|
|
94
|
+
lines_changed_only=args.lines_changed_only,
|
|
95
|
+
format_review=args.format_review,
|
|
96
|
+
fix=args.fix,
|
|
97
|
+
)
|
|
98
|
+
except FileIOTimeout: # pragma: no cover
|
|
99
|
+
logger.error(
|
|
100
|
+
"Failed to read or write contents of %s when running clang-format",
|
|
101
|
+
filename,
|
|
102
|
+
)
|
|
103
|
+
except OSError: # pragma: no cover
|
|
104
|
+
logger.error(
|
|
105
|
+
"Failed to open the file %s when running clang-format", filename
|
|
106
|
+
)
|
|
107
|
+
|
|
95
108
|
return file.name, log_stream.getvalue(), tidy_note, format_advice
|
|
96
109
|
|
|
97
110
|
|
|
@@ -161,11 +174,15 @@ def capture_clang_tools_output(files: list[FileObj], args: Args) -> ClangVersion
|
|
|
161
174
|
|
|
162
175
|
with ProcessPoolExecutor(args.jobs) as executor:
|
|
163
176
|
log_lvl = logger.getEffectiveLevel()
|
|
177
|
+
# Decided here, not in the worker: with the forkserver start method
|
|
178
|
+
# workers do not see environment changes made after the server started.
|
|
179
|
+
use_rich = should_use_rich()
|
|
164
180
|
futures = [
|
|
165
181
|
executor.submit(
|
|
166
182
|
_run_on_single_file,
|
|
167
183
|
file,
|
|
168
184
|
log_lvl=log_lvl,
|
|
185
|
+
use_rich=use_rich,
|
|
169
186
|
tidy_cmd=tidy_cmd,
|
|
170
187
|
db_json=db_json,
|
|
171
188
|
format_cmd=format_cmd,
|
|
@@ -194,4 +211,5 @@ def capture_clang_tools_output(files: list[FileObj], args: Args) -> ClangVersion
|
|
|
194
211
|
break
|
|
195
212
|
else: # pragma: no cover
|
|
196
213
|
raise ValueError(f"Failed to find {file_name} in list of files.")
|
|
214
|
+
|
|
197
215
|
return clang_versions
|
|
@@ -166,6 +166,7 @@ def run_clang_format(
|
|
|
166
166
|
style: str,
|
|
167
167
|
lines_changed_only: int,
|
|
168
168
|
format_review: bool,
|
|
169
|
+
fix: bool = False,
|
|
169
170
|
) -> FormatAdvice:
|
|
170
171
|
"""Run clang-format on a certain file
|
|
171
172
|
|
|
@@ -177,6 +178,8 @@ def run_clang_format(
|
|
|
177
178
|
diff info.
|
|
178
179
|
:param format_review: A flag to enable/disable creating a diff suggestion for
|
|
179
180
|
PR review comments.
|
|
181
|
+
:param fix: A flag to enable applying clang-format's fixes in-place. Only the
|
|
182
|
+
lines selected by ``lines_changed_only`` are reformatted.
|
|
180
183
|
"""
|
|
181
184
|
cmds = [
|
|
182
185
|
command,
|
|
@@ -200,6 +203,29 @@ def run_clang_format(
|
|
|
200
203
|
advice = parse_format_replacements_xml(
|
|
201
204
|
results.stdout.decode(encoding="utf-8").strip(), file_obj, lines_changed_only
|
|
202
205
|
)
|
|
206
|
+
if fix and advice.replaced_lines:
|
|
207
|
+
# Reuse the assembled (range-aware) args to apply fixes in-place. This
|
|
208
|
+
# runs in the same parallel worker as the analysis above, and honors
|
|
209
|
+
# --lines-changed-only via the --lines args already in `cmds`.
|
|
210
|
+
fix_cmds = [arg for arg in cmds if arg != "--output-replacements-xml"]
|
|
211
|
+
fix_cmds.insert(-1, "-i") # apply edits in-place, just before the file path
|
|
212
|
+
logger.info('Applying formatting fixes with "%s"', " ".join(fix_cmds))
|
|
213
|
+
fix_results = subprocess.run(fix_cmds, capture_output=True)
|
|
214
|
+
if fix_results.returncode: # pragma: no cover
|
|
215
|
+
logger.error(
|
|
216
|
+
"Failed to apply clang-format fixes to %s:\n%s",
|
|
217
|
+
file_obj.name,
|
|
218
|
+
fix_results.stderr.decode(),
|
|
219
|
+
)
|
|
220
|
+
else:
|
|
221
|
+
# The file is now formatted, so it has no outstanding issues.
|
|
222
|
+
advice = FormatAdvice(file_obj.name)
|
|
223
|
+
if not format_review:
|
|
224
|
+
return advice
|
|
225
|
+
# A review was asked for, so `patched` still has to be populated:
|
|
226
|
+
# the review pass asserts on it. Fall through and re-run
|
|
227
|
+
# clang-format on the now-formatted file -- it returns the file
|
|
228
|
+
# unchanged, so the review carries no suggestions for it.
|
|
203
229
|
if format_review:
|
|
204
230
|
del cmds[2] # remove `--output-replacements-xml` flag
|
|
205
231
|
logger.info('Getting fixes with "%s"', " ".join(cmds))
|
|
@@ -73,6 +73,8 @@ class Args(UserDict):
|
|
|
73
73
|
ignore_format: str = ""
|
|
74
74
|
#: See :std:option:`--passive-reviews`.
|
|
75
75
|
passive_reviews: bool = False
|
|
76
|
+
#: See :std:option:`--fix`.
|
|
77
|
+
fix: bool = False
|
|
76
78
|
#: See :std:option:`--summary-output-file`.
|
|
77
79
|
summary_output_file: str = ""
|
|
78
80
|
#: A subcommand if provided
|
|
@@ -388,6 +390,19 @@ _parser_args[("-R", "--passive-reviews")] = dict(
|
|
|
388
390
|
help="""Set to ``true`` to prevent Pull Request
|
|
389
391
|
reviews from requesting or approving changes.""",
|
|
390
392
|
)
|
|
393
|
+
_parser_args[("-F", "--fix")] = dict(
|
|
394
|
+
default=False,
|
|
395
|
+
action="store_true",
|
|
396
|
+
help="""Apply clang-format fixes in-place to files with
|
|
397
|
+
style issues. Only the lines selected by
|
|
398
|
+
:std:option:`--lines-changed-only` are reformatted.
|
|
399
|
+
|
|
400
|
+
.. note::
|
|
401
|
+
This option only applies to clang-format.
|
|
402
|
+
clang-tidy fixes are not applied automatically.
|
|
403
|
+
|
|
404
|
+
Defaults to ``%(default)s``""",
|
|
405
|
+
)
|
|
391
406
|
_parser_args[("-o", "--summary-output-file")] = dict(
|
|
392
407
|
default="",
|
|
393
408
|
help="""Supply a path to which the step summary will be written.
|
|
@@ -57,16 +57,36 @@ def log_response_msg(response: Response):
|
|
|
57
57
|
)
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def
|
|
60
|
+
def should_use_rich() -> bool:
|
|
61
|
+
"""Decide whether log output should be rendered with ``rich``.
|
|
62
|
+
|
|
63
|
+
Call this in the parent process and hand the result to worker processes.
|
|
64
|
+
With the ``forkserver`` start method (the default on Linux since Python 3.14)
|
|
65
|
+
workers inherit the environment of the long-lived forkserver, not the parent's
|
|
66
|
+
current environment, so a check of ``os.environ`` inside the worker can be stale.
|
|
67
|
+
"""
|
|
68
|
+
return FOUND_RICH_LIB and "CPP_LINTER_PYTEST_NO_RICH" not in os.environ
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def worker_log_init(log_lvl: int, use_rich: bool | None = None):
|
|
72
|
+
"""Set up logging inside a worker process.
|
|
73
|
+
|
|
74
|
+
:param log_lvl: The log level to apply; passed in because Windows does not
|
|
75
|
+
copy the parent's log level to subprocesses.
|
|
76
|
+
:param use_rich: Whether to render logs with ``rich``. Compute this in the
|
|
77
|
+
parent with :func:`should_use_rich` and pass it in; ``None`` falls back to
|
|
78
|
+
evaluating it in the current process.
|
|
79
|
+
"""
|
|
61
80
|
log_stream = io.StringIO()
|
|
62
81
|
|
|
63
82
|
logger.handlers.clear()
|
|
64
83
|
logger.propagate = False
|
|
65
84
|
|
|
85
|
+
if use_rich is None:
|
|
86
|
+
use_rich = should_use_rich()
|
|
87
|
+
|
|
66
88
|
handler: logging.Handler
|
|
67
|
-
if
|
|
68
|
-
FOUND_RICH_LIB and "CPP_LINTER_PYTEST_NO_RICH" not in os.environ
|
|
69
|
-
): # pragma: no cover
|
|
89
|
+
if use_rich: # pragma: no cover
|
|
70
90
|
console = get_console()
|
|
71
91
|
console.file = log_stream
|
|
72
92
|
handler = RichHandler(show_time=False, console=console)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cpp-linter
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.14.0
|
|
4
4
|
Summary: Run clang-format and clang-tidy on a batch of files.
|
|
5
5
|
Author-email: Brendan Doherty <2bndy5@gmail.com>, Xianpeng Shen <xianpeng.shen@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,6 +65,16 @@ For usage in a CI workflow, see `the cpp-linter/cpp-linter-action repository <ht
|
|
|
65
65
|
|
|
66
66
|
For the description of supported Command Line Interface options, see `the CLI documentation <https://cpp-linter.github.io/cpp-linter/cli_args.html>`_
|
|
67
67
|
|
|
68
|
+
Applying fixes
|
|
69
|
+
--------------
|
|
70
|
+
|
|
71
|
+
Passing the ``--fix`` option makes cpp-linter apply clang-format fixes in-place to
|
|
72
|
+
any files that have formatting problems.
|
|
73
|
+
|
|
74
|
+
.. note::
|
|
75
|
+
``--fix`` only applies **clang-format** fixes. clang-tidy fixes are not applied
|
|
76
|
+
automatically.
|
|
77
|
+
|
|
68
78
|
Have question or feedback?
|
|
69
79
|
--------------------------
|
|
70
80
|
|
|
@@ -11,7 +11,6 @@ noxfile.py
|
|
|
11
11
|
pyproject.toml
|
|
12
12
|
setup.py
|
|
13
13
|
uv.lock
|
|
14
|
-
.github/FUNDING.yml
|
|
15
14
|
.github/dependabot.yml
|
|
16
15
|
.github/zizmor.yml
|
|
17
16
|
.github/workflows/analyze-workflows.yml
|
|
@@ -74,6 +73,7 @@ tests/test_git_str.py
|
|
|
74
73
|
tests/test_misc.py
|
|
75
74
|
tests/test_parse_clang_tidy_stdout.py
|
|
76
75
|
tests/test_rate_limits.py
|
|
76
|
+
tests/capture_tools_output/test_auto_fix.py
|
|
77
77
|
tests/capture_tools_output/test_database_path.py
|
|
78
78
|
tests/capture_tools_output/test_tools_output.py
|
|
79
79
|
tests/capture_tools_output/chocolate-doom/chocolate-doom/.clang-format
|