cppcheck 1.0.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.
Files changed (82) hide show
  1. cppcheck-1.0.0/.clang-format +228 -0
  2. cppcheck-1.0.0/.clang-tidy +78 -0
  3. cppcheck-1.0.0/.copier-answers.yml +25 -0
  4. cppcheck-1.0.0/.cppcheck-suppressions.txt +2 -0
  5. cppcheck-1.0.0/.devcontainer/devcontainer.json +38 -0
  6. cppcheck-1.0.0/.editorconfig +20 -0
  7. cppcheck-1.0.0/.gitattributes +7 -0
  8. cppcheck-1.0.0/.github/codecov.yml +12 -0
  9. cppcheck-1.0.0/.github/codeql-config.yml +11 -0
  10. cppcheck-1.0.0/.github/matchers/pylint.json +32 -0
  11. cppcheck-1.0.0/.github/workflows/cd.yml +114 -0
  12. cppcheck-1.0.0/.github/workflows/ci.yml +138 -0
  13. cppcheck-1.0.0/.github/workflows/codeql.yml +71 -0
  14. cppcheck-1.0.0/.github/workflows/renovate.yml +52 -0
  15. cppcheck-1.0.0/.github/workflows/semantic-release.yml +60 -0
  16. cppcheck-1.0.0/.gitignore +366 -0
  17. cppcheck-1.0.0/.markdownlint.yaml +10 -0
  18. cppcheck-1.0.0/.pre-commit-config.yaml +151 -0
  19. cppcheck-1.0.0/.releaserc.js +67 -0
  20. cppcheck-1.0.0/.renovaterc.json +133 -0
  21. cppcheck-1.0.0/.vscode/launch.json +32 -0
  22. cppcheck-1.0.0/.vscode/settings.json +107 -0
  23. cppcheck-1.0.0/CMakeLists.txt +46 -0
  24. cppcheck-1.0.0/CMakePresets.json +19 -0
  25. cppcheck-1.0.0/LICENSE +201 -0
  26. cppcheck-1.0.0/PKG-INFO +80 -0
  27. cppcheck-1.0.0/README.md +37 -0
  28. cppcheck-1.0.0/cmake/ConfigureWarningsAndHardening.cmake +117 -0
  29. cppcheck-1.0.0/cmake/presets/arch/x64.json +20 -0
  30. cppcheck-1.0.0/cmake/presets/base.json +48 -0
  31. cppcheck-1.0.0/cmake/presets/compilers/gcc.json +13 -0
  32. cppcheck-1.0.0/cmake/presets/compilers/llvm.json +21 -0
  33. cppcheck-1.0.0/cmake/presets/compilers/mingw.json +9 -0
  34. cppcheck-1.0.0/cmake/presets/compilers/msvc.json +18 -0
  35. cppcheck-1.0.0/cmake/presets/default.json +47 -0
  36. cppcheck-1.0.0/cmake/presets/generators/ninja.json +41 -0
  37. cppcheck-1.0.0/cmake/presets/os/darwin.json +28 -0
  38. cppcheck-1.0.0/cmake/presets/os/linux.json +28 -0
  39. cppcheck-1.0.0/cmake/presets/os/windows.json +28 -0
  40. cppcheck-1.0.0/cmake/presets/toolchains/vcpkg.json +16 -0
  41. cppcheck-1.0.0/cmake/presets/triplets/x64-linux.json +18 -0
  42. cppcheck-1.0.0/cmake/presets/triplets/x64-mingw-dynamic.json +18 -0
  43. cppcheck-1.0.0/cmake/presets/triplets/x64-mingw-static.json +18 -0
  44. cppcheck-1.0.0/cmake/presets/triplets/x64-osx.json +18 -0
  45. cppcheck-1.0.0/cmake/presets/triplets/x64-windows.json +18 -0
  46. cppcheck-1.0.0/cmake/presets/x64-linux-gcc.json +53 -0
  47. cppcheck-1.0.0/cmake/presets/x64-linux-llvm.json +53 -0
  48. cppcheck-1.0.0/cmake/presets/x64-mingw-dynamic-windows-mingw.json +54 -0
  49. cppcheck-1.0.0/cmake/presets/x64-mingw-static-windows-mingw.json +53 -0
  50. cppcheck-1.0.0/cmake/presets/x64-osx-gcc.json +53 -0
  51. cppcheck-1.0.0/cmake/presets/x64-osx-llvm.json +53 -0
  52. cppcheck-1.0.0/cmake/presets/x64-windows-llvm.json +56 -0
  53. cppcheck-1.0.0/cmake/presets/x64-windows-msvc.json +53 -0
  54. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg-config.cmake +20 -0
  55. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake +191 -0
  56. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_chainload_toolchain.cmake +45 -0
  57. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_configure.cmake +55 -0
  58. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_export_mode.cmake +97 -0
  59. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_load_triplet.cmake +219 -0
  60. cppcheck-1.0.0/cmake/vcpkg/bootstrap/vcpkg_skip_install_on_reconfigure.cmake +47 -0
  61. cppcheck-1.0.0/cmake/vcpkg/ports/README.md +3 -0
  62. cppcheck-1.0.0/cmake/vcpkg/ports/cppcheck/portfile.cmake +31 -0
  63. cppcheck-1.0.0/cmake/vcpkg/ports/cppcheck/vcpkg.json +17 -0
  64. cppcheck-1.0.0/cmake/vcpkg/ports/python3/portfile.cmake +3 -0
  65. cppcheck-1.0.0/cmake/vcpkg/ports/python3/vcpkg.json +12 -0
  66. cppcheck-1.0.0/cmake/vcpkg/scripts/build_type.cmake +26 -0
  67. cppcheck-1.0.0/cmake/vcpkg/scripts/toolchains/README.md +3 -0
  68. cppcheck-1.0.0/cmake/vcpkg/triplets/README.md +22 -0
  69. cppcheck-1.0.0/cmake/vcpkg/vcpkg.toolchain.cmake +47 -0
  70. cppcheck-1.0.0/docs/api/index.md +8 -0
  71. cppcheck-1.0.0/docs/conf.py +122 -0
  72. cppcheck-1.0.0/docs/index.md +35 -0
  73. cppcheck-1.0.0/noxfile.py +93 -0
  74. cppcheck-1.0.0/pyproject.toml +161 -0
  75. cppcheck-1.0.0/src/CMakeLists.txt +12 -0
  76. cppcheck-1.0.0/src/cppcheck/__init__.py +71 -0
  77. cppcheck-1.0.0/src/cppcheck/__main__.py +9 -0
  78. cppcheck-1.0.0/src/cppcheck/_version.py +16 -0
  79. cppcheck-1.0.0/src/cppcheck/_version.pyi +4 -0
  80. cppcheck-1.0.0/src/cppcheck/py.typed +0 -0
  81. cppcheck-1.0.0/tests/test_package.py +14 -0
  82. cppcheck-1.0.0/vcpkg.json +46 -0
@@ -0,0 +1,228 @@
1
+ ---
2
+ # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3
+ ---
4
+ Language: Cpp
5
+ # Do not offset access specifiers (public, protected, private)
6
+ AccessModifierOffset: -4
7
+ # Align parameters after opening brackets (round, angle, square)
8
+ AlignAfterOpenBracket: Align
9
+ # Do not align consecutive assignments
10
+ AlignConsecutiveAssignments: false
11
+ # Do not align consecutive declarations
12
+ AlignConsecutiveDeclarations: false
13
+ # Align consecutive macros
14
+ AlignConsecutiveMacros: true
15
+ # Align escaped newlines to the left
16
+ AlignEscapedNewlines: Left
17
+ # Align operands of binary and ternary expressions horizontally
18
+ AlignOperands: true
19
+ # Align trailing comments
20
+ AlignTrailingComments: true
21
+ # Allow all function arguments on the next line
22
+ AllowAllArgumentsOnNextLine: false
23
+ AllowAllConstructorInitializersOnNextLine: false
24
+ AllowAllParametersOfDeclarationOnNextLine: false
25
+ # Do not allow short blocks (e.g., while blocks) on a single line
26
+ AllowShortBlocksOnASingleLine: false
27
+ # Do not allow short case labels on a single line
28
+ AllowShortCaseLabelsOnASingleLine: false
29
+ # Do not allow non-empty functions defined outside of a class on a single line
30
+ AllowShortFunctionsOnASingleLine: Inline
31
+ # Do not allow short if statements on a single line
32
+ AllowShortIfStatementsOnASingleLine: false
33
+ # Do not allow short loop blocks on a single line
34
+ AllowShortLoopsOnASingleLine: false
35
+ # Do not break after the return type in function definitions, unless it exceeds the column limit
36
+ AlwaysBreakAfterDefinitionReturnType: None
37
+ AlwaysBreakAfterReturnType: None
38
+ # Do not break before multiline strings
39
+ AlwaysBreakBeforeMultilineStrings: false
40
+ # Always break after template declarations
41
+ AlwaysBreakTemplateDeclarations: Yes
42
+ # Do not require each function argument to be on a separate line
43
+ BinPackArguments: false
44
+ # Do not require each function parameter to be on a separate line
45
+ BinPackParameters: false
46
+ # Configure brace wrapping style
47
+ BraceWrapping:
48
+ # Do not break after case labels
49
+ AfterCaseLabel: false
50
+ # Do not break after class definitions
51
+ AfterClass: false
52
+ # Do not break after control statements
53
+ AfterControlStatement: false
54
+ # Do not break after enum definitions
55
+ AfterEnum: false
56
+ # Do not break after function definitions
57
+ AfterFunction: false
58
+ # Do not break after namespace definitions
59
+ AfterNamespace: false
60
+ # Do not break after struct definitions
61
+ AfterStruct: false
62
+ # Do not break after union definitions
63
+ AfterUnion: false
64
+ # Do not break after extern blocks
65
+ AfterExternBlock: false
66
+ # Break before catch statements
67
+ BeforeCatch: true
68
+ # Break before else statements
69
+ BeforeElse: true
70
+ # Do not break before lambda bodies
71
+ BeforeLambdaBody: false
72
+ # Break before while statements
73
+ BeforeWhile: true
74
+ # Do not indent braces
75
+ IndentBraces: false
76
+ # Allow empty function bodies on a single line
77
+ SplitEmptyFunction: false
78
+ # Allow empty statements on a single line
79
+ SplitEmptyRecord: false
80
+ # Allow empty namespaces on a single line
81
+ SplitEmptyNamespace: false
82
+ # Break before binary operators, except for assignment operators
83
+ BreakBeforeBinaryOperators: NonAssignment
84
+ # Customize break before braces in BraceWrapping
85
+ BreakBeforeBraces: Custom
86
+ # Do not break after commas in inheritance lists
87
+ BreakBeforeInheritanceComma: false
88
+ # Break before colons in inheritance lists, but not before commas
89
+ BreakInheritanceList: BeforeColon
90
+ # Break before ternary operators
91
+ BreakBeforeTernaryOperators: true
92
+ # Do not break after commas in constructor initializer lists
93
+ BreakConstructorInitializersBeforeComma: false
94
+ # Break before colons in constructor initializer lists, but not before commas
95
+ BreakConstructorInitializers: BeforeColon
96
+ # Allow breaking string literals
97
+ BreakStringLiterals: true
98
+ # Column limit for each line
99
+ ColumnLimit: 120
100
+ CommentPragmas: '^ IWYU pragma:'
101
+ # Do not allow different namespaces to be defined on the same line
102
+ CompactNamespaces: false
103
+ # Constructor initializer lists should either be all on one line or one per line
104
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
105
+ # Indent constructor initializer lists by 4 spaces
106
+ ConstructorInitializerIndentWidth: 4
107
+ # Indent continuation lines by 4 spaces
108
+ ContinuationIndentWidth: 4
109
+ # No spaces around variable initialization lists
110
+ Cpp11BracedListStyle: true
111
+ DerivePointerAlignment: true
112
+ DisableFormat: false
113
+ ExperimentalAutoDetectBinPacking: false
114
+ # Automatically add comments at the end of namespaces
115
+ FixNamespaceComments: true
116
+ ForEachMacros:
117
+ - foreach
118
+ - Q_FOREACH
119
+ - BOOST_FOREACH
120
+ IncludeBlocks: Preserve
121
+ IncludeCategories:
122
+ - Regex: ^<ext/.*\.h>
123
+ Priority: 2
124
+ - Regex: StdAfx.h
125
+ Priority: -1
126
+ - Regex: ^<.*\.h>
127
+ Priority: 1
128
+ - Regex: ^<.*
129
+ Priority: 2
130
+ - Regex: .*
131
+ Priority: 3
132
+ IncludeIsMainRegex: ([-_](test|unittest))?$
133
+ # Indent case labels inside switch statements
134
+ IndentCaseLabels: true
135
+ # Indent code blocks inside extern blocks
136
+ IndentExternBlock: Indent
137
+ # Do not indent preprocessor directives
138
+ IndentPPDirectives: None
139
+ # Use 4 spaces for indentation
140
+ IndentWidth: 4
141
+ # Do not indent wrapped function names after the return type
142
+ IndentWrappedFunctionNames: false
143
+ # Do not keep empty lines at the start of code blocks
144
+ KeepEmptyLinesAtTheStartOfBlocks: false
145
+ MacroBlockBegin: ''
146
+ MacroBlockEnd: ''
147
+ # Do not allow consecutive empty lines
148
+ MaxEmptyLinesToKeep: 1
149
+ # Do not indent contents inside namespaces
150
+ NamespaceIndentation: None
151
+ PenaltyBreakAssignment: 2
152
+ PenaltyBreakBeforeFirstCallParameter: 1
153
+ PenaltyBreakComment: 300
154
+ PenaltyBreakFirstLessLess: 120
155
+ PenaltyBreakString: 1000
156
+ PenaltyBreakTemplateDeclaration: 10
157
+ PenaltyExcessCharacter: 1000000
158
+ PenaltyReturnTypeOnItsOwnLine: 200
159
+ # * and & should be placed next to the type name
160
+ PointerAlignment: Left
161
+ RawStringFormats:
162
+ - Language: Cpp
163
+ Delimiters:
164
+ - cc
165
+ - CC
166
+ - cpp
167
+ - Cpp
168
+ - CPP
169
+ - c++
170
+ - C++
171
+ CanonicalDelimiter: ''
172
+ BasedOnStyle: google
173
+ - Language: TextProto
174
+ Delimiters:
175
+ - pb
176
+ - PB
177
+ - proto
178
+ - PROTO
179
+ EnclosingFunctions:
180
+ - EqualsProto
181
+ - EquivToProto
182
+ - PARSE_PARTIAL_TEXT_PROTO
183
+ - PARSE_TEST_PROTO
184
+ - PARSE_TEXT_PROTO
185
+ - ParseTextOrDie
186
+ - ParseTextProtoOrDie
187
+ CanonicalDelimiter: ''
188
+ BasedOnStyle: google
189
+ # Allow reflowing of comments
190
+ ReflowComments: true
191
+ # Allow sorting of #include statements
192
+ SortIncludes: true
193
+ # Allow sorting of using declarations
194
+ SortUsingDeclarations: true
195
+ # Do not include spaces after C-style casts
196
+ SpaceAfterCStyleCast: false
197
+ # Require a space after the template keyword
198
+ SpaceAfterTemplateKeyword: true
199
+ # Require spaces around assignment operators
200
+ SpaceBeforeAssignmentOperators: true
201
+ # Do not include spaces before C++11 braced initializer lists
202
+ SpaceBeforeCpp11BracedList: false
203
+ # Require a space before the colon in constructor initializers
204
+ SpaceBeforeCtorInitializerColon: true
205
+ # Require a space before the colon in inheritance statements
206
+ SpaceBeforeInheritanceColon: true
207
+ # Require a space after control statement keywords (if, for, while, etc.)
208
+ SpaceBeforeParens: ControlStatements
209
+ # Require a space before the colon in range-based for loops
210
+ SpaceBeforeRangeBasedForLoopColon: true
211
+ # Do not include spaces inside empty parentheses
212
+ SpaceInEmptyParentheses: false
213
+ # Require a space before // in trailing comments
214
+ SpacesBeforeTrailingComments: 1
215
+ # Do not include spaces around angle brackets
216
+ SpacesInAngles: false
217
+ # Do not include spaces around C-style cast parentheses
218
+ SpacesInCStyleCastParentheses: false
219
+ # Do not include spaces around parentheses
220
+ SpacesInParentheses: false
221
+ # Do not include spaces around square brackets
222
+ SpacesInSquareBrackets: false
223
+ Standard: Auto
224
+ StatementMacros:
225
+ - Q_UNUSED
226
+ - QT_REQUIRE_VERSION
227
+ TabWidth: 4
228
+ UseTab: Never
@@ -0,0 +1,78 @@
1
+ Checks: >
2
+ *,
3
+ -abseil-*,
4
+ -altera-*,
5
+ -android-*,
6
+ -boost-*,
7
+ -cert-*,
8
+ -cppcoreguidelines-*,
9
+ -darwin-*,
10
+ -fuchsia-*,
11
+ -google-*,
12
+ -hicpp-*,
13
+ -linuxkernel-*,
14
+ -llvm-*,
15
+ -llvmlibc-*,
16
+ -mpi-*,
17
+ -objc-*,
18
+ -openmp-*,
19
+ -zircon-*,
20
+ cert-err34-c,
21
+ google-explicit-constructor,
22
+ cppcoreguidelines-rvalue-reference-param-not-moved,
23
+ -bugprone-assignment-in-if-condition,
24
+ -bugprone-branch-clone,
25
+ -bugprone-easily-swappable-parameters,
26
+ -bugprone-empty-catch,
27
+ -bugprone-macro-parentheses,
28
+ -bugprone-narrowing-conversions,
29
+ -bugprone-signed-char-misuse,
30
+ -bugprone-switch-missing-default-case,
31
+ -bugprone-unchecked-optional-access,
32
+ -clang-analyzer-*,
33
+ -concurrency-mt-unsafe,
34
+ -misc-const-correctness,
35
+ -misc-no-recursion,
36
+ -misc-non-private-member-variables-in-classes,
37
+ -misc-throw-by-value-catch-by-reference,
38
+ -misc-use-anonymous-namespace,
39
+ -misc-include-cleaner,
40
+ -misc-unused-using-decls,
41
+ -modernize-avoid-c-arrays,
42
+ -modernize-deprecated-ios-base-aliases,
43
+ -modernize-loop-convert,
44
+ -modernize-macro-to-enum,
45
+ -modernize-raw-string-literal,
46
+ -modernize-replace-auto-ptr,
47
+ -modernize-return-braced-init-list,
48
+ -modernize-type-traits,
49
+ -modernize-use-auto,
50
+ -modernize-use-nodiscard,
51
+ -modernize-use-trailing-return-type,
52
+ -modernize-concat-nested-namespaces,
53
+ -performance-avoid-endl,
54
+ -performance-enum-size,
55
+ -performance-inefficient-string-concatenation,
56
+ -performance-no-automatic-move,
57
+ -performance-noexcept-swap,
58
+ -portability-simd-intrinsics,
59
+ -portability-std-allocator-const,
60
+ -readability-avoid-const-params-in-decls,
61
+ -readability-avoid-nested-conditional-operator,
62
+ -readability-braces-around-statements,
63
+ -readability-container-data-pointer,
64
+ -readability-function-cognitive-complexity,
65
+ -readability-function-size,
66
+ -readability-identifier-length,
67
+ -readability-identifier-naming,
68
+ -readability-implicit-bool-conversion,
69
+ -readability-isolate-declaration,
70
+ -readability-magic-numbers,
71
+ -readability-suspicious-call-argument,
72
+ -readability-uppercase-literal-suffix
73
+ HeaderFilterRegex: (src)\/[a-z]+\.hpp
74
+ CheckOptions:
75
+ - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
76
+ value: '1'
77
+ - key: readability-simplify-boolean-expr.SimplifyDeMorgan
78
+ value: '0'
@@ -0,0 +1,25 @@
1
+ _commit: a010dcf
2
+ _src_path: .
3
+ author_email: msclock@126.com
4
+ author_name: msclock
5
+ codecov_notify_builds: 1
6
+ codecov_threshold: 5%
7
+ copyright_holder: msclock
8
+ copyright_license: Apache Software License
9
+ copyright_year: '2024'
10
+ create_devcontainer: true
11
+ default_py: '3.10'
12
+ docs_type: sphinx
13
+ max_py: '3.13'
14
+ min_py: '3.7'
15
+ module_name: cppcheck
16
+ organization_name: msclock
17
+ project_description: Package cppcheck as a python wheel.
18
+ project_name: Cppcheck Wheel
19
+ repo_name: cppcheck-wheel
20
+ repo_namespace: msclock
21
+ repo_platform: github
22
+ use_codecov: true
23
+ use_codeql: true
24
+ use_conan: false
25
+ use_cpm: false
@@ -0,0 +1,2 @@
1
+ // Limit analysis of branches. Use --check-level=exhaustive to analyze all branches.
2
+ normalCheckLevelMaxBranches
@@ -0,0 +1,38 @@
1
+ // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2
+ // https://github.com/devcontainers/images/tree/main/src/base-ubuntu
3
+ {
4
+ "name": "cppcheck-wheel",
5
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
6
+ "capAdd": [
7
+ // Enable ptrace-based debugging for C++
8
+ "SYS_PTRACE"
9
+ ],
10
+ "securityOpt": [
11
+ "seccomp=unconfined"
12
+ ],
13
+ // https://github.com/devcontainers/features
14
+ // Using features in vscode requires access github with uncomment the below
15
+ "features": {
16
+ "ghcr.io/devcontainers/features/common-utils:2": {
17
+ "username": "vscode"
18
+ },
19
+ "ghcr.io/devcontainers/features/docker-in-docker:2": {},
20
+ "ghcr.io/devcontainers/features/python:1": {},
21
+ "ghcr.io/msclock/features/vcpkg:2": {}
22
+ },
23
+ "customizations": {
24
+ "vscode": {
25
+ "extensions": [
26
+ "EditorConfig.EditorConfig",
27
+ "mhutchie.git-graph",
28
+ "ms-vscode.cmake-tools"
29
+ ]
30
+ }
31
+ },
32
+ // Use 'postCreateCommand' to run commands after the container is created.
33
+ "postCreateCommand": {
34
+ "git-completions": "echo 'source /usr/share/bash-completion/completions/git' >> ~/.bashrc"
35
+ },
36
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37
+ "remoteUser": "vscode"
38
+ }
@@ -0,0 +1,20 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ indent_size = 4
9
+ indent_style = space
10
+ insert_final_newline = true
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.{yml,yaml,json,toml,jinja,css,js,cmake}]
14
+ indent_size = 2
15
+
16
+ [CMakeLists.txt]
17
+ indent_size = 2
18
+
19
+ [Makefile]
20
+ indent_style = tab
@@ -0,0 +1,7 @@
1
+ # Keep compatilibity between windows and unix-like OS
2
+ * text=auto eol=lf
3
+ *.{cmd,[cC][mM][dD]} text eol=crlf
4
+ *.{bat,[bB][aA][tT]} text eol=crlf
5
+
6
+ # Archive Format
7
+ *.tar.gz filter=lfs diff=lfs merge=lfs -text
@@ -0,0 +1,12 @@
1
+ codecov:
2
+ notify:
3
+ after_n_builds: 1
4
+ coverage:
5
+ status:
6
+ project:
7
+ default:
8
+ target: auto
9
+ threshold: 5%
10
+ patch:
11
+ default:
12
+ informational: true
@@ -0,0 +1,11 @@
1
+ name: CodeQL config
2
+
3
+ query-filters:
4
+ - exclude:
5
+ id: cpp/commented-out-code
6
+ - exclude:
7
+ id: cpp/include-non-header
8
+ - exclude:
9
+ id: cpp/loop-variable-changed
10
+ - exclude:
11
+ id: cpp/useless-expression
@@ -0,0 +1,32 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "severity": "warning",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
8
+ "file": 1,
9
+ "line": 2,
10
+ "column": 3,
11
+ "code": 4,
12
+ "message": 5
13
+ }
14
+ ],
15
+ "owner": "pylint-warning"
16
+ },
17
+ {
18
+ "severity": "error",
19
+ "pattern": [
20
+ {
21
+ "regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
22
+ "file": 1,
23
+ "line": 2,
24
+ "column": 3,
25
+ "code": 4,
26
+ "message": 5
27
+ }
28
+ ],
29
+ "owner": "pylint-error"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,114 @@
1
+ name: CD
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - master
8
+ release:
9
+ types:
10
+ - published
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ env:
17
+ FORCE_COLOR: 3
18
+
19
+ jobs:
20
+ make_sdist:
21
+ name: Make SDist
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+
28
+ - name: Build SDist
29
+ run: pipx run build --sdist
30
+
31
+ - uses: actions/upload-artifact@v4
32
+ with:
33
+ name: cibw-sdist
34
+ path: dist/*.tar.gz
35
+
36
+ build_wheels:
37
+ name: Wheel on ${{ matrix.os }}
38
+ runs-on: ${{ matrix.os }}
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ os: [ubuntu-22.04, windows-2022, macos-14]
43
+
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+ with:
47
+ fetch-depth: 0
48
+
49
+ - uses: pypa/cibuildwheel@v2.21
50
+
51
+ - name: Upload wheels
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
55
+ path: wheelhouse/*.whl
56
+
57
+ upload_all:
58
+ needs: [build_wheels, make_sdist]
59
+ environment: pypi
60
+ permissions:
61
+ id-token: write
62
+ runs-on: ubuntu-latest
63
+ if: github.event_name == 'release' && github.event.action == 'published'
64
+
65
+ steps:
66
+ - uses: actions/download-artifact@v4
67
+ with:
68
+ pattern: cibw-*
69
+ path: dist
70
+ merge-multiple: true
71
+
72
+ - uses: pypa/gh-action-pypi-publish@release/v1
73
+ env:
74
+ PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
75
+ with:
76
+ password: ${{ secrets.PYPI_API_TOKEN }}
77
+
78
+ pages:
79
+ name: Deploy to GitHub Pages
80
+ runs-on: ubuntu-22.04
81
+ if: ${{ github.ref_name == github.event.repository.default_branch || (github.event_name == 'release' && github.event.action == 'published') }}
82
+ permissions:
83
+ contents: write
84
+ id-token: write
85
+ timeout-minutes: 15
86
+
87
+ steps:
88
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
89
+ with:
90
+ token: ${{ secrets.GITHUB_TOKEN }}
91
+ ref: ${{ github.head_ref }}
92
+
93
+ - name: Cache
94
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
95
+ with:
96
+ path: |
97
+ ~/vcpkg
98
+ ~/.cache/pip
99
+ ~/.cache/vcpkg
100
+ key: cd-pages-${{ hashFiles('vcpkg.json') }}
101
+ restore-keys: cd-pages-${{ hashFiles('vcpkg.json') }}
102
+
103
+ - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
104
+ with:
105
+ python-version: 3.x
106
+
107
+ - name: Build Docs
108
+ run: pipx run nox -s docs
109
+
110
+ - name: Deploy to GitHub Pages
111
+ uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
112
+ with:
113
+ github_token: ${{ secrets.GITHUB_TOKEN }}
114
+ publish_dir: ./docs/_build/html