Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
7c3a0317
Unverified
Commit
7c3a0317
authored
Jul 13, 2022
by
Henry Schreiner
Committed by
GitHub
Jul 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: bump clang-tidy to 13 (#3997)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
parent
023b3f32
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
72 deletions
+73
-72
.clang-tidy
+61
-63
.github/CONTRIBUTING.md
+5
-3
.github/workflows/ci.yml
+2
-0
.github/workflows/format.yml
+2
-2
tests/test_embed/CMakeLists.txt
+1
-1
tests/test_virtual_functions.cpp
+2
-3
No files found.
.clang-tidy
View file @
7c3a0317
FormatStyle: file
FormatStyle: file
Checks:
'
Checks:
|
*bugprone*,
*bugprone*,
clang-analyzer-optin.performance.Padding
,
*performance*
,
clang-analyzer-optin.cplusplus.VirtualCall,
clang-analyzer-optin.cplusplus.VirtualCall,
cppcoreguidelines-init-variables
,
clang-analyzer-optin.performance.Padding
,
cppcoreguidelines-prefer-member-initializer
,
cppcoreguidelines-init-variables
,
cppcoreguidelines-pro-type-static-cast-downcast
,
cppcoreguidelines-prefer-member-initializer
,
cppcoreguidelines-slicing
,
cppcoreguidelines-pro-type-static-cast-downcast
,
google-explicit-constructor
,
cppcoreguidelines-slicing
,
llvm-namespace-comment
,
google-explicit-constructor
,
misc-definitions-in-headers
,
llvm-namespace-comment
,
misc-misplaced-const
,
misc-definitions-in-headers
,
misc-non-copyable-objects
,
misc-misplaced-const
,
misc-static-assert
,
misc-non-copyable-objects
,
misc-throw-by-value-catch-by-reference
,
misc-static-assert
,
misc-uniqueptr-reset-releas
e,
misc-throw-by-value-catch-by-referenc
e,
misc-unused-parameters
,
misc-uniqueptr-reset-release
,
modernize-avoid-bind
,
misc-unused-parameters
,
modernize-loop-convert
,
modernize-avoid-bind
,
modernize-make-shared
,
modernize-loop-convert
,
modernize-redundant-void-arg
,
modernize-make-shared
,
modernize-replace-auto-ptr
,
modernize-redundant-void-arg
,
modernize-replace-disallow-copy-and-assign-macro
,
modernize-replace-auto-ptr
,
modernize-replace-random-shuffle
,
modernize-replace-disallow-copy-and-assign-macro
,
modernize-shrink-to-fit
,
modernize-replace-random-shuffle
,
modernize-use-auto
,
modernize-shrink-to-fit
,
modernize-use-bool-literals
,
modernize-use-auto
,
modernize-use-default-member-init
,
modernize-use-bool-literals
,
modernize-use-equals-defaul
t,
modernize-use-default-member-ini
t,
modernize-use-equals-delet
e,
modernize-use-emplac
e,
modernize-use-emplace
,
modernize-use-equals-default
,
modernize-use-noexcept
,
modernize-use-equals-delete
,
modernize-use-nullptr
,
modernize-use-noexcept
,
modernize-use-override
,
modernize-use-nullptr
,
modernize-use-using
,
modernize-use-override
,
*performance*
,
modernize-use-using
,
readability-avoid-const-params-in-decls,
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-braces-around-statements,
readability-const-return-type,
readability-const-return-type,
readability-container-size-empty,
readability-container-size-empty,
readability-delete-null-pointer,
readability-delete-null-pointer,
readability-else-after-return,
readability-else-after-return,
readability-implicit-bool-conversion,
readability-implicit-bool-conversion,
readability-inconsistent-declaration-parameter-name,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-make-member-function-const,
readability-misplaced-array-index,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-non-const-parameter,
readability-qualified-auto,
readability-qualified-auto,
readability-redundant-function-ptr-dereference,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-cstr,
readability-simplify-subscript-expr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-string-compare,
readability-suspicious-call-argument,
readability-suspicious-call-argument,
readability-uniqueptr-delete-release,
readability-uniqueptr-delete-release,
-bugprone-exception-escape
,
-bugprone-easily-swappable-parameters
,
-bugprone-reserved-identifier
,
-bugprone-exception-escape
,
-bugprone-unused-raii
,
-bugprone-reserved-identifier
,
'
-bugprone-unused-raii,
CheckOptions:
CheckOptions:
- key: performance-for-range-copy.WarnOnAllAutoCopies
- key: performance-for-range-copy.WarnOnAllAutoCopies
...
@@ -73,5 +73,3 @@ CheckOptions:
...
@@ -73,5 +73,3 @@ CheckOptions:
value: true
value: true
HeaderFilterRegex: 'pybind11/.*h'
HeaderFilterRegex: 'pybind11/.*h'
WarningsAsErrors: '*'
.github/CONTRIBUTING.md
View file @
7c3a0317
...
@@ -235,12 +235,14 @@ directory inside your pybind11 git clone. Files will be modified in place,
...
@@ -235,12 +235,14 @@ directory inside your pybind11 git clone. Files will be modified in place,
so you can use git to monitor the changes.
so you can use git to monitor the changes.
```
bash
```
bash
docker run
--rm
-v
$PWD
:/mounted_pybind11
-it
silkeh/clang:1
2
docker run
--rm
-v
$PWD
:/mounted_pybind11
-it
silkeh/clang:1
3
apt-get update
&&
apt-get install
-y
python3-dev python3-pytest
apt-get update
&&
apt-get install
-y
python3-dev python3-pytest
cmake
-S
/mounted_pybind11/
-B
build
-DCMAKE_CXX_CLANG_TIDY
=
"
$(
which clang-tidy
)
;-
fix
"
-DDOWNLOAD_EIGEN
=
ON
-DDOWNLOAD_CATCH
=
ON
-DCMAKE_CXX_STANDARD
=
17
cmake
-S
/mounted_pybind11/
-B
build
-DCMAKE_CXX_CLANG_TIDY
=
"
$(
which clang-tidy
)
;-
-use-color
"
-DDOWNLOAD_EIGEN
=
ON
-DDOWNLOAD_CATCH
=
ON
-DCMAKE_CXX_STANDARD
=
17
cmake
--build
build
-j
2
--
--keep-going
cmake
--build
build
-j
2
```
```
You can add
`--fix`
to the options list if you want.
### Include what you use
### Include what you use
To run include what you use, install (
`brew install include-what-you-use`
on
To run include what you use, install (
`brew install include-what-you-use`
on
...
...
.github/workflows/ci.yml
View file @
7c3a0317
...
@@ -281,6 +281,8 @@ jobs:
...
@@ -281,6 +281,8 @@ jobs:
std
:
20
std
:
20
-
clang
:
10
-
clang
:
10
std
:
17
std
:
17
-
clang
:
14
std
:
20
name
:
"
🐍
3
•
Clang
${{
matrix.clang
}}
•
C++${{
matrix.std
}}
•
x64"
name
:
"
🐍
3
•
Clang
${{
matrix.clang
}}
•
C++${{
matrix.std
}}
•
x64"
container
:
"
silkeh/clang:${{
matrix.clang
}}"
container
:
"
silkeh/clang:${{
matrix.clang
}}"
...
...
.github/workflows/format.yml
View file @
7c3a0317
...
@@ -36,7 +36,7 @@ jobs:
...
@@ -36,7 +36,7 @@ jobs:
# in .github/CONTRIBUTING.md and update as needed.
# in .github/CONTRIBUTING.md and update as needed.
name
:
Clang-Tidy
name
:
Clang-Tidy
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
container
:
silkeh/clang:1
2
container
:
silkeh/clang:1
3
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
...
@@ -46,7 +46,7 @@ jobs:
...
@@ -46,7 +46,7 @@ jobs:
-
name
:
Configure
-
name
:
Configure
run
:
>
run
:
>
cmake -S . -B build
cmake -S . -B build
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)"
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)
;--use-color;--warnings-as-errors=*
"
-DDOWNLOAD_EIGEN=ON
-DDOWNLOAD_EIGEN=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_STANDARD=17
...
...
tests/test_embed/CMakeLists.txt
View file @
7c3a0317
...
@@ -7,7 +7,7 @@ if("${PYTHON_MODULE_EXTENSION}" MATCHES "pypy" OR "${Python_INTERPRETER_ID}" STR
...
@@ -7,7 +7,7 @@ if("${PYTHON_MODULE_EXTENSION}" MATCHES "pypy" OR "${Python_INTERPRETER_ID}" STR
return
()
return
()
endif
()
endif
()
find_package
(
Catch 2.13.
5
)
find_package
(
Catch 2.13.
9
)
if
(
CATCH_FOUND
)
if
(
CATCH_FOUND
)
message
(
STATUS
"Building interpreter tests using Catch v
${
CATCH_VERSION
}
"
)
message
(
STATUS
"Building interpreter tests using Catch v
${
CATCH_VERSION
}
"
)
...
...
tests/test_virtual_functions.cpp
View file @
7c3a0317
...
@@ -342,9 +342,8 @@ TEST_SUBMODULE(virtual_functions, m) {
...
@@ -342,9 +342,8 @@ TEST_SUBMODULE(virtual_functions, m) {
const
AdderBase
&
adder
,
const
AdderBase
&
adder
,
const
AdderBase
::
DataVisitor
&
visitor
)
{
const
AdderBase
::
DataVisitor
&
visitor
)
{
adder
(
first
,
second
,
[
&
](
const
AdderBase
::
Data
&
first_plus_second
)
{
adder
(
first
,
second
,
[
&
](
const
AdderBase
::
Data
&
first_plus_second
)
{
adder
(
first_plus_second
,
// NOLINTNEXTLINE(readability-suspicious-call-argument)
third
,
adder
(
first_plus_second
,
third
,
visitor
);
visitor
);
// NOLINT(readability-suspicious-call-argument)
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment