This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MXNET-859] Add a clang-tidy stage to CI (#12282)
- Loading branch information
1 parent
308ada1
commit 2f73958
Showing
5 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# The checks defined here will be run and will display by default as warnings. | ||
Checks: > | ||
-*, cppcoreguidelines-c-copy-assignment-signature, | ||
cppcoreguidelines-interfaces-global-init, cppcoreguidelines-no-malloc, | ||
cppcoreguidelines-pro-bounds-constant-array-index, cppcoreguidelines-pro-type-const-cast, | ||
cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-type-member-init, | ||
cppcoreguidelines-pro-type-static-cast-downcast, cppcoreguidelines-pro-type-union-access, | ||
cppcoreguidelines-pro-type-vararg, cppcoreguidelines-slicing, | ||
cppcoreguidelines-special-member-functions, clang-analyzer-security.FloatLoopCounter, | ||
clang-analyzer-security.insecureAPI.*, clang-analyzer-core.CallAndMessage, | ||
clang-analyzer-core.DivideZero, clang-analyzer-core.DynamicTypePropagation, | ||
clang-analyzer-core.NonNullParamChecker, clang-analyzer-core.NullDereference, | ||
clang-analyzer-core.StackAddressEscape, clang-analyzer-core.UndefinedBinaryOperatorResult, | ||
clang-analyzer-core.VLASize, clang-analyzer-core.builtin.BuiltinFunctions, | ||
clang-analyzer-core.builtin.NoReturnFunctions, clang-analyzer-core.uninitialized.ArraySubscript, | ||
clang-analyzer-core.uninitialized.Assign, clang-analyzer-core.uninitialized.Branch, | ||
clang-analyzer-core.uninitialized.CapturedBlockVariable, | ||
clang-analyzer-core.uninitialized.UndefReturn, clang-analyzer-cplusplus.NewDelete, | ||
clang-analyzer-cplusplus.NewDeleteLeaks, clang-analyzer-cplusplus.SelfAssignment, | ||
clang-analyzer-deadcode.DeadStores, modernize-avoid-bind, modernize-deprecated-headers, | ||
modernize-loop-convert, modernize-make-shared, modernize-pass-by-value, | ||
modernize-raw-string-literal, modernize-redundant-void-arg, modernize-replace-auto-ptr, | ||
modernize-replace-random-shuffle, modernize-return-braced-init-list, modernize-shrink-to-fit, | ||
modernize-unary-static-assert, modernize-use-bool-literals, modernize-use-default-member-init, | ||
modernize-use-emplace, modernize-use-equals-default, modernize-use-equals-delete, | ||
modernize-use-noexcept, modernize-use-nullptr, modernize-use-override, | ||
modernize-use-transparent-functors, modernize-use-using, performance-* | ||
# cppcoreguidelines checks not enabled: | ||
# cppcoreguidelines-pro-bounds-pointer-arithmetic | ||
# cppcoreguidelines-pro-bounds-array-to-pointer-decay | ||
# cppcoreguidelines-pro-type-reinterpret-cast | ||
|
||
# modernize checks not enabled: | ||
# modernize-use-auto | ||
# modernize-make-unique (C++14 and newer only) | ||
|
||
# In order to trigger an error, you must have a rule defined both in checks and in this section. | ||
WarningsAsErrors: > | ||
cppcoreguidelines-no-malloc | ||
# Todo: define a better regex match that includes most project headers, but excludes third party | ||
# code. | ||
HeaderFilterRegex: '^src/.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# Disable most clang-tidy checks in the c_api folder. | ||
Checks: -*,readability-non-const-parameter |