cpp-linter 1.11.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.11.0/.gitattributes +13 -0
- cpp_linter-1.11.0/.github/FUNDING.yml +3 -0
- cpp_linter-1.11.0/.github/dependabot.yml +23 -0
- cpp_linter-1.11.0/.github/release-drafter.yml +1 -0
- cpp_linter-1.11.0/.github/workflows/analyze-workflows.yml +25 -0
- cpp_linter-1.11.0/.github/workflows/codeql.yml +18 -0
- cpp_linter-1.11.0/.github/workflows/docs.yml +21 -0
- cpp_linter-1.11.0/.github/workflows/labeler.yml +17 -0
- cpp_linter-1.11.0/.github/workflows/pre-commit.yml +15 -0
- cpp_linter-1.11.0/.github/workflows/release-drafter.yml +21 -0
- cpp_linter-1.11.0/.github/workflows/release.yml +62 -0
- cpp_linter-1.11.0/.github/workflows/stale.yml +14 -0
- cpp_linter-1.11.0/.github/workflows/tests.yml +161 -0
- cpp_linter-1.11.0/.gitignore +184 -0
- cpp_linter-1.11.0/.pre-commit-config.yaml +41 -0
- cpp_linter-1.11.0/.readthedocs.yaml +26 -0
- cpp_linter-1.11.0/CONTRIBUTING.rst +63 -0
- cpp_linter-1.11.0/LICENSE +21 -0
- cpp_linter-1.11.0/PKG-INFO +73 -0
- cpp_linter-1.11.0/README.rst +42 -0
- cpp_linter-1.11.0/codecov.yml +11 -0
- cpp_linter-1.11.0/cpp_linter/__init__.py +90 -0
- cpp_linter-1.11.0/cpp_linter/_version.py +34 -0
- cpp_linter-1.11.0/cpp_linter/clang_tools/__init__.py +197 -0
- cpp_linter-1.11.0/cpp_linter/clang_tools/clang_format.py +208 -0
- cpp_linter-1.11.0/cpp_linter/clang_tools/clang_tidy.py +311 -0
- cpp_linter-1.11.0/cpp_linter/clang_tools/patcher.py +216 -0
- cpp_linter-1.11.0/cpp_linter/cli.py +405 -0
- cpp_linter-1.11.0/cpp_linter/common_fs/__init__.py +282 -0
- cpp_linter-1.11.0/cpp_linter/common_fs/file_filter.py +214 -0
- cpp_linter-1.11.0/cpp_linter/git/__init__.py +142 -0
- cpp_linter-1.11.0/cpp_linter/git/git_str.py +109 -0
- cpp_linter-1.11.0/cpp_linter/loggers.py +89 -0
- cpp_linter-1.11.0/cpp_linter/rest_api/__init__.py +317 -0
- cpp_linter-1.11.0/cpp_linter/rest_api/github_api.py +529 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/PKG-INFO +73 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/SOURCES.txt +140 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/dependency_links.txt +1 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/entry_points.txt +2 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/not-zip-safe +1 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/requires.txt +3 -0
- cpp_linter-1.11.0/cpp_linter.egg-info/top_level.txt +1 -0
- cpp_linter-1.11.0/cspell.config.yml +65 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.clang_tools.clang_format.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.clang_tools.clang_tidy.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.clang_tools.patcher.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.clang_tools.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.cli.rst +6 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.common_fs.file_filter.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.common_fs.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.git.git_str.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.git.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.loggers.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.rest_api.github_api.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.rest_api.rst +5 -0
- cpp_linter-1.11.0/docs/API-Reference/cpp_linter.rst +5 -0
- cpp_linter-1.11.0/docs/_static/extra_css.css +89 -0
- cpp_linter-1.11.0/docs/_static/favicon.ico +0 -0
- cpp_linter-1.11.0/docs/_static/logo.png +0 -0
- cpp_linter-1.11.0/docs/building_docs.rst +21 -0
- cpp_linter-1.11.0/docs/conf.py +338 -0
- cpp_linter-1.11.0/docs/contributing.rst +1 -0
- cpp_linter-1.11.0/docs/index.rst +33 -0
- cpp_linter-1.11.0/docs/permissions.rst +99 -0
- cpp_linter-1.11.0/docs/pr_review_caveats.rst +92 -0
- cpp_linter-1.11.0/noxfile.py +84 -0
- cpp_linter-1.11.0/pyproject.toml +124 -0
- cpp_linter-1.11.0/setup.cfg +4 -0
- cpp_linter-1.11.0/setup.py +9 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/.clang-format +148 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/.clang-tidy +349 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/opl/opl.c +525 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/opl/opl_sdl.c +519 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/pcsound/pcsound.c +139 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/pcsound/pcsound_sdl.c +256 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_musicpack.c +1463 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sdlmusic.c +598 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sdlsound.c +1145 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/i_sound.c +519 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/cache/src/net_sdl.c +441 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_0.json +239 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_1.json +239 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/expected-result_2.json +239 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/67715d6e2725322e6132e9ff99b9a2a3f3b10c83/patch.diff +593 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/info.c +13868 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/p_enemy.c +5407 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/cache/src/hexen/p_local.h +427 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_0.json +59 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_1.json +59 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/expected-result_2.json +19 -0
- cpp_linter-1.11.0/tests/capture_tools_output/chocolate-doom/chocolate-doom/71091562db5b0e7853d08ffa2f110af49cc3bc0d/patch.diff +107 -0
- cpp_linter-1.11.0/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/cache/tests/demo/demo.cpp +18 -0
- cpp_linter-1.11.0/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/cache/tests/demo/demo.hpp +36 -0
- cpp_linter-1.11.0/tests/capture_tools_output/cpp-linter/cpp-linter/950ff0b690e1903797c303c5fc8d9f3b52f1d3c5/patch.diff +5208 -0
- cpp_linter-1.11.0/tests/capture_tools_output/cpp-linter/cpp-linter/test_git_lib.patch +32 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/.clang-format +20 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/.clang-tidy +4 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_0.json +171577 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_1.json +171577 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/expected-result_2.json +171565 -0
- cpp_linter-1.11.0/tests/capture_tools_output/libvips/libvips/fe82be345a5b654a76835a7aea5a804bd9ebff0a/patch.diff +301611 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/.clang-format +3 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/.clang-tidy +185 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/cache/p_enemy.c +5403 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_0.json +19 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_1.json +19 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/expected-result_2.json +19 -0
- cpp_linter-1.11.0/tests/capture_tools_output/shenxianpeng/test-repo/662ad4cf90084063ea9c089b8de4aff0b8959d0e/patch.diff +5409 -0
- cpp_linter-1.11.0/tests/capture_tools_output/test_database_path.py +124 -0
- cpp_linter-1.11.0/tests/capture_tools_output/test_tools_output.py +508 -0
- cpp_linter-1.11.0/tests/comments/pr_22.json +92 -0
- cpp_linter-1.11.0/tests/comments/pr_comments_pg1.json +1322 -0
- cpp_linter-1.11.0/tests/comments/pr_comments_pg2.json +266 -0
- cpp_linter-1.11.0/tests/comments/push_8d68756375e0483c7ac2b4d6bbbece420dbbb495.json +183 -0
- cpp_linter-1.11.0/tests/comments/push_comments_8d68756375e0483c7ac2b4d6bbbece420dbbb495.json +48 -0
- cpp_linter-1.11.0/tests/comments/test_comments.py +172 -0
- cpp_linter-1.11.0/tests/demo/.clang-format +3 -0
- cpp_linter-1.11.0/tests/demo/.clang-tidy +185 -0
- cpp_linter-1.11.0/tests/demo/compile_flags.txt +2 -0
- cpp_linter-1.11.0/tests/demo/demo.cpp +18 -0
- cpp_linter-1.11.0/tests/demo/demo.hpp +36 -0
- cpp_linter-1.11.0/tests/ignored_paths/.gitmodules +12 -0
- cpp_linter-1.11.0/tests/ignored_paths/test_ignored_paths.py +72 -0
- cpp_linter-1.11.0/tests/list_changes/patch.diff +142 -0
- cpp_linter-1.11.0/tests/list_changes/pull_request_files_pg1.json +27 -0
- cpp_linter-1.11.0/tests/list_changes/pull_request_files_pg2.json +23 -0
- cpp_linter-1.11.0/tests/list_changes/push_files_pg1.json +29 -0
- cpp_linter-1.11.0/tests/list_changes/push_files_pg2.json +25 -0
- cpp_linter-1.11.0/tests/list_changes/test_get_file_changes.py +156 -0
- cpp_linter-1.11.0/tests/reviews/.clang-format +3 -0
- cpp_linter-1.11.0/tests/reviews/.clang-tidy +185 -0
- cpp_linter-1.11.0/tests/reviews/pr_27.diff +142 -0
- cpp_linter-1.11.0/tests/reviews/pr_27.json +372 -0
- cpp_linter-1.11.0/tests/reviews/pr_review_comments.json +206 -0
- cpp_linter-1.11.0/tests/reviews/pr_reviews.json +41 -0
- cpp_linter-1.11.0/tests/reviews/test_pr_review.py +230 -0
- cpp_linter-1.11.0/tests/test_cli_args.py +58 -0
- cpp_linter-1.11.0/tests/test_comment_length.py +52 -0
- cpp_linter-1.11.0/tests/test_git_str.py +112 -0
- cpp_linter-1.11.0/tests/test_misc.py +155 -0
- cpp_linter-1.11.0/tests/test_rate_limits.py +46 -0
- cpp_linter-1.11.0/uv.lock +1483 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Set the default behavior, in case people don't have core.autocrlf set.
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Explicitly declare text files you want to always be normalized and converted
|
|
5
|
+
# to native line endings on checkout.
|
|
6
|
+
*.py text eol=lf
|
|
7
|
+
*.rst text eol=lf
|
|
8
|
+
*.sh text eol=lf
|
|
9
|
+
*.cpp text eol=lf
|
|
10
|
+
*.hpp text eol=lf
|
|
11
|
+
*.yml text eol=lf
|
|
12
|
+
*.yaml text eol=lf
|
|
13
|
+
*.toml text eol=lf
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: github-actions
|
|
9
|
+
directory: /
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "monthly"
|
|
12
|
+
groups:
|
|
13
|
+
actions:
|
|
14
|
+
patterns:
|
|
15
|
+
- "*"
|
|
16
|
+
# - package-ecosystem: uv
|
|
17
|
+
# directory: /
|
|
18
|
+
# schedule:
|
|
19
|
+
# interval: "monthly"
|
|
20
|
+
# groups:
|
|
21
|
+
# uv-pip:
|
|
22
|
+
# patterns:
|
|
23
|
+
# - "*"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_extends: .github
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Analyze CI workflows
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analyze-ci:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
16
|
+
with:
|
|
17
|
+
persist-credentials: false
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.x'
|
|
22
|
+
- name: Run zizmor
|
|
23
|
+
env:
|
|
24
|
+
GH_TOKEN: ${{ github.token }}
|
|
25
|
+
run: pipx run zizmor .github/workflows/*.yml
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
codeql:
|
|
12
|
+
permissions:
|
|
13
|
+
actions: read
|
|
14
|
+
security-events: write
|
|
15
|
+
contents: read
|
|
16
|
+
uses: cpp-linter/.github/.github/workflows/codeql.yml@main
|
|
17
|
+
with:
|
|
18
|
+
language: python
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Build Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
env:
|
|
12
|
+
PATH_TO_DOCS: docs/_build/html
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
docs:
|
|
16
|
+
permissions:
|
|
17
|
+
# to deploy to Pages
|
|
18
|
+
pages: write
|
|
19
|
+
# to verify the deployment originates from an appropriate source
|
|
20
|
+
id-token: write
|
|
21
|
+
uses: cpp-linter/.github/.github/workflows/sphinx.yml@main
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: PR Autolabeler
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, reopened, synchronize]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
# Auto label PRs during a PR event
|
|
9
|
+
auto-label:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pull-requests: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "main"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
# Draft your next Release notes as Pull Requests are merged into the default branch
|
|
13
|
+
draft-release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
pull-requests: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches: [main]
|
|
14
|
+
tags: ['v*']
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions: {}
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
24
|
+
# use fetch --all for setuptools_scm to work
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
30
|
+
with:
|
|
31
|
+
python-version: '3.x'
|
|
32
|
+
- name: Build distributions
|
|
33
|
+
run: pipx run build -o dist
|
|
34
|
+
- name: Upload builds as artifacts
|
|
35
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
36
|
+
with:
|
|
37
|
+
path: dist
|
|
38
|
+
name: wheels
|
|
39
|
+
|
|
40
|
+
deploy:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
needs: [build]
|
|
43
|
+
permissions:
|
|
44
|
+
# needed for trusted publishing
|
|
45
|
+
id-token: write
|
|
46
|
+
steps:
|
|
47
|
+
- name: Download distributions
|
|
48
|
+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
|
49
|
+
with:
|
|
50
|
+
name: wheels
|
|
51
|
+
path: dist
|
|
52
|
+
- name: Set up Python
|
|
53
|
+
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
54
|
+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
55
|
+
with:
|
|
56
|
+
python-version: '3.x'
|
|
57
|
+
- name: Check distributions
|
|
58
|
+
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
59
|
+
run: pipx run twine check dist/*
|
|
60
|
+
- name: Deploy to PyPI
|
|
61
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
name: Build and Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "**.py"
|
|
8
|
+
- uv.lock
|
|
9
|
+
- pyproject.toml
|
|
10
|
+
- ".github/workflows/tests.yml"
|
|
11
|
+
- "!docs/**"
|
|
12
|
+
pull_request:
|
|
13
|
+
# types: opened
|
|
14
|
+
branches: [main]
|
|
15
|
+
paths:
|
|
16
|
+
- "**.py"
|
|
17
|
+
- uv.lock
|
|
18
|
+
- pyproject.toml
|
|
19
|
+
- ".github/workflows/tests.yml"
|
|
20
|
+
- "!docs/**"
|
|
21
|
+
workflow_dispatch:
|
|
22
|
+
|
|
23
|
+
permissions: {}
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
test:
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
os: ['windows-latest', 'ubuntu-latest']
|
|
31
|
+
version: ['21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9']
|
|
32
|
+
env:
|
|
33
|
+
MAX_PYTHON_VERSION: '3.13'
|
|
34
|
+
# only used when installing for a pre-released python version
|
|
35
|
+
# LIBGIT2_VERSION: '1.9.0'
|
|
36
|
+
|
|
37
|
+
runs-on: ${{ matrix.os }}
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
40
|
+
with:
|
|
41
|
+
persist-credentials: false
|
|
42
|
+
|
|
43
|
+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
44
|
+
with:
|
|
45
|
+
python-version: 3.x
|
|
46
|
+
|
|
47
|
+
# - name: Checkout libgit2
|
|
48
|
+
# uses: actions/checkout@v5
|
|
49
|
+
# with:
|
|
50
|
+
# repository: libgit2/libgit2
|
|
51
|
+
# ref: v${{ env.LIBGIT2_VERSION }}
|
|
52
|
+
# path: libgit2-${{ env.LIBGIT2_VERSION }}
|
|
53
|
+
|
|
54
|
+
# - name: Install libgit2
|
|
55
|
+
# working-directory: libgit2-${{ env.LIBGIT2_VERSION }}
|
|
56
|
+
# shell: bash
|
|
57
|
+
# run: |-
|
|
58
|
+
# cmake -B build -S . -DBUILD_TESTS=OFF
|
|
59
|
+
# cmake --build build
|
|
60
|
+
# sudo cmake --install build
|
|
61
|
+
|
|
62
|
+
- name: Install uv
|
|
63
|
+
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
|
|
64
|
+
with:
|
|
65
|
+
enable-cache: true
|
|
66
|
+
cache-dependency-glob: "uv.lock"
|
|
67
|
+
|
|
68
|
+
# https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages
|
|
69
|
+
- name: Install ninja (Linux)
|
|
70
|
+
if: runner.os == 'Linux'
|
|
71
|
+
run: sudo apt-get install ninja-build
|
|
72
|
+
- name: Install ninja (Windows)
|
|
73
|
+
if: runner.os == 'Windows'
|
|
74
|
+
run: choco install ninja
|
|
75
|
+
|
|
76
|
+
- name: Install Linux clang dependencies
|
|
77
|
+
if: runner.os == 'Linux'
|
|
78
|
+
shell: bash
|
|
79
|
+
run: |
|
|
80
|
+
sudo apt-get update
|
|
81
|
+
# First try installing from default Ubuntu repositories before trying LLVM script
|
|
82
|
+
if ! sudo apt-get install -y clang-format-${{ matrix.version }} clang-tidy-${{ matrix.version }}; then
|
|
83
|
+
# This LLVM script will add the relevant LLVM PPA: https://apt.llvm.org/
|
|
84
|
+
wget https://apt.llvm.org/llvm.sh -O ${{ runner.temp }}/llvm_install.sh
|
|
85
|
+
chmod +x ${{ runner.temp }}/llvm_install.sh
|
|
86
|
+
if sudo ${{ runner.temp }}/llvm_install.sh ${{ matrix.version }}; then
|
|
87
|
+
sudo apt-get install -y clang-format-${{ matrix.version }} clang-tidy-${{ matrix.version }}
|
|
88
|
+
fi
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
- name: Install clang-tools
|
|
92
|
+
run: |
|
|
93
|
+
python -m pip install clang-tools
|
|
94
|
+
clang-tools --install ${{ matrix.version }}
|
|
95
|
+
|
|
96
|
+
- name: Is clang-only tests?
|
|
97
|
+
id: clang-dep
|
|
98
|
+
shell: python
|
|
99
|
+
run: |-
|
|
100
|
+
from os import environ
|
|
101
|
+
with open(environ["GITHUB_OUTPUT"], mode="a") as gh_out:
|
|
102
|
+
if "${{ matrix.version }}" == "21":
|
|
103
|
+
gh_out.write("args=\n")
|
|
104
|
+
else:
|
|
105
|
+
gh_out.write("args=not no_clang\n")
|
|
106
|
+
|
|
107
|
+
- name: Collect Coverage
|
|
108
|
+
shell: bash
|
|
109
|
+
env:
|
|
110
|
+
CLANG_VERSION: ${{ matrix.version }}
|
|
111
|
+
PYTEST_ARGS: ${{ steps.clang-dep.outputs.args }}
|
|
112
|
+
run: uvx nox -s test-all -- -m "${PYTEST_ARGS}"
|
|
113
|
+
|
|
114
|
+
- name: Upload coverage data
|
|
115
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
116
|
+
with:
|
|
117
|
+
name: coverage-data-${{ runner.os }}-${{ matrix.version }}
|
|
118
|
+
path: .coverage*
|
|
119
|
+
include-hidden-files: true
|
|
120
|
+
|
|
121
|
+
coverage-report:
|
|
122
|
+
needs: [test]
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
126
|
+
with:
|
|
127
|
+
persist-credentials: false
|
|
128
|
+
|
|
129
|
+
- name: Download all artifacts
|
|
130
|
+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
|
131
|
+
with:
|
|
132
|
+
pattern: coverage-data-*
|
|
133
|
+
merge-multiple: true
|
|
134
|
+
|
|
135
|
+
- name: Setup python
|
|
136
|
+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
137
|
+
with:
|
|
138
|
+
python-version: '3.x'
|
|
139
|
+
|
|
140
|
+
- name: Install uv
|
|
141
|
+
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
|
|
142
|
+
with:
|
|
143
|
+
enable-cache: true
|
|
144
|
+
cache-dependency-glob: "uv.lock"
|
|
145
|
+
|
|
146
|
+
- name: Create coverage report
|
|
147
|
+
run: uvx nox -s coverage
|
|
148
|
+
|
|
149
|
+
- name: Upload comprehensive coverage HTML report
|
|
150
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
151
|
+
with:
|
|
152
|
+
name: coverage-report
|
|
153
|
+
path: htmlcov/
|
|
154
|
+
|
|
155
|
+
- uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
|
|
156
|
+
env:
|
|
157
|
+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|
|
158
|
+
with:
|
|
159
|
+
files: ./coverage.xml
|
|
160
|
+
fail_ci_if_error: true # optional (default = false)
|
|
161
|
+
verbose: true # optional (default = false)
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# local dev artifacts
|
|
2
|
+
.cpp-linter_cache/
|
|
3
|
+
act.exe
|
|
4
|
+
|
|
5
|
+
#### ignores for Python
|
|
6
|
+
# Byte-compiled / optimized / DLL files
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*$py.class
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib/
|
|
20
|
+
lib64/
|
|
21
|
+
parts/
|
|
22
|
+
sdist/
|
|
23
|
+
var/
|
|
24
|
+
wheels/
|
|
25
|
+
pip-wheel-metadata/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py,cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
lcov.info
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
target/
|
|
79
|
+
|
|
80
|
+
# Jupyter Notebook
|
|
81
|
+
.ipynb_checkpoints
|
|
82
|
+
|
|
83
|
+
# IPython
|
|
84
|
+
profile_default/
|
|
85
|
+
ipython_config.py
|
|
86
|
+
|
|
87
|
+
# pyenv
|
|
88
|
+
.python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
98
|
+
__pypackages__/
|
|
99
|
+
|
|
100
|
+
# Celery stuff
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
celerybeat.pid
|
|
103
|
+
|
|
104
|
+
# SageMath parsed files
|
|
105
|
+
*.sage.py
|
|
106
|
+
|
|
107
|
+
# Environments
|
|
108
|
+
.env
|
|
109
|
+
.venv
|
|
110
|
+
env/
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
env.bak/
|
|
114
|
+
venv.bak/
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# exclude local VSCode's settings folder
|
|
135
|
+
.vscode/
|
|
136
|
+
|
|
137
|
+
#### ignores for C++
|
|
138
|
+
# Prerequisites
|
|
139
|
+
*.d
|
|
140
|
+
|
|
141
|
+
# Compiled Object files
|
|
142
|
+
*.slo
|
|
143
|
+
*.lo
|
|
144
|
+
*.o
|
|
145
|
+
*.obj
|
|
146
|
+
|
|
147
|
+
# Precompiled Headers
|
|
148
|
+
*.gch
|
|
149
|
+
*.pch
|
|
150
|
+
|
|
151
|
+
# Compiled Dynamic libraries
|
|
152
|
+
*.so
|
|
153
|
+
*.dylib
|
|
154
|
+
*.dll
|
|
155
|
+
|
|
156
|
+
# Fortran module files
|
|
157
|
+
*.mod
|
|
158
|
+
*.smod
|
|
159
|
+
|
|
160
|
+
# Compiled Static libraries
|
|
161
|
+
*.lai
|
|
162
|
+
*.la
|
|
163
|
+
*.a
|
|
164
|
+
*.lib
|
|
165
|
+
|
|
166
|
+
# Executables
|
|
167
|
+
*.exe
|
|
168
|
+
*.out
|
|
169
|
+
*.app
|
|
170
|
+
|
|
171
|
+
# Cmake build-in-source generated stuff
|
|
172
|
+
CMakeUserPresets.json
|
|
173
|
+
CMakeCache.txt
|
|
174
|
+
CPackConfig.cmake
|
|
175
|
+
CPackSourceConfig.cmake
|
|
176
|
+
CMakeFiles
|
|
177
|
+
cmake_install.cmake
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
# generated doc pages
|
|
181
|
+
docs/cli_args.rst
|
|
182
|
+
|
|
183
|
+
# generated version info (via setuptools_scm)
|
|
184
|
+
cpp_linter/_version.py
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_schedule: quarterly
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v6.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
exclude: ^tests/.*\.(?:patch|diff)$
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: check-docstring-first
|
|
12
|
+
- id: check-added-large-files
|
|
13
|
+
args: [--maxkb=9000]
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: requirements-txt-fixer
|
|
17
|
+
- id: mixed-line-ending
|
|
18
|
+
args: ["--fix=lf"]
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
# Ruff version.
|
|
21
|
+
rev: v0.12.11
|
|
22
|
+
hooks:
|
|
23
|
+
# Run the linter.
|
|
24
|
+
- id: ruff-check
|
|
25
|
+
# Run the formatter.
|
|
26
|
+
- id: ruff-format
|
|
27
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
28
|
+
rev: 'v1.17.1'
|
|
29
|
+
hooks:
|
|
30
|
+
- id: mypy
|
|
31
|
+
additional_dependencies:
|
|
32
|
+
- types-requests
|
|
33
|
+
- types-docutils
|
|
34
|
+
- rich
|
|
35
|
+
- pytest
|
|
36
|
+
- requests-mock
|
|
37
|
+
- '.'
|
|
38
|
+
- repo: https://github.com/streetsidesoftware/cspell-cli
|
|
39
|
+
rev: v9.2.0
|
|
40
|
+
hooks:
|
|
41
|
+
- id: cspell
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Read the Docs configuration file for Sphinx projects
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
# Required
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
# Set the OS, Python version and other tools you might need
|
|
8
|
+
build:
|
|
9
|
+
os: ubuntu-lts-latest
|
|
10
|
+
tools:
|
|
11
|
+
python: "latest"
|
|
12
|
+
# You can also specify other tool versions:
|
|
13
|
+
# nodejs: "latest"
|
|
14
|
+
# rust: "latest"
|
|
15
|
+
# golang: "latest"
|
|
16
|
+
jobs:
|
|
17
|
+
pre_create_environment:
|
|
18
|
+
- >-
|
|
19
|
+
UV_INSTALL_DIR="${HOME}/.local/bin" &&
|
|
20
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
21
|
+
build:
|
|
22
|
+
html:
|
|
23
|
+
- ${HOME}/.local/bin/uvx nox -s docs
|
|
24
|
+
post_build:
|
|
25
|
+
- mkdir -p $READTHEDOCS_OUTPUT/html/
|
|
26
|
+
- mv docs/_build/html/* $READTHEDOCS_OUTPUT/html
|