clang-tidy configuration cleanup

Define single .clang-tidy configuration with all used checks and use
NOLINT to selectively silence tool. That way cleanup should be easier.
third_part/ has its own configuration that disables clang-tidy for this
folder.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2022-05-09 17:40:30 +00:00
committed by Compute-Runtime-Automation
parent 910871a706
commit e9be9b64c6
235 changed files with 920 additions and 1169 deletions

View File

@ -1,32 +0,0 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.UndefinedBinaryOperatorResult'
# WarningsAsErrors: '.*'
HeaderFilterRegex: '^((?!^third_party\/).+)\.(h|hpp|inl)$'
AnalyzeTemporaryDtors: false
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-default-member-init.UseAssignment
value: '1'
...

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -66,11 +66,11 @@ using FullyDisabledClFileLogger = NEO::ClFileLogger<DebugFunctionalityLevel::Non
template <bool DebugFunctionality>
class TestLoggerApiEnterWrapper : public NEO::LoggerApiEnterWrapper<DebugFunctionality> {
public:
TestLoggerApiEnterWrapper(const char *functionName, int *errCode) : NEO::LoggerApiEnterWrapper<DebugFunctionality>(functionName, errCode), loggedEnter(false) {
TestLoggerApiEnterWrapper(const char *functionName, int *errCode) : NEO::LoggerApiEnterWrapper<DebugFunctionality>(functionName, errCode) {
if (DebugFunctionality) {
loggedEnter = true;
}
}
bool loggedEnter;
bool loggedEnter = false;
};