clang-tidy: Blacklist violations for version 8
Check the codebase with clang-tidy version 8, fix the low hanging fruits, blacklist the rest.
This commit is contained in:
parent
473f288e97
commit
4af094c8df
@ -3,16 +3,21 @@ Checks: "-*,\
|
||||
bugprone-*,\
|
||||
-bugprone-macro-parentheses,\
|
||||
-bugprone-misplaced-widening-cast,\
|
||||
-bugprone-narrowing-conversions,\
|
||||
-bugprone-too-small-loop-variable,\
|
||||
google-readability-casting,\
|
||||
misc-*,\
|
||||
-misc-incorrect-roundings,\
|
||||
-misc-macro-parentheses,\
|
||||
-misc-misplaced-widening-cast,\
|
||||
-misc-non-private-member-variables-in-classes,\
|
||||
-misc-static-assert,\
|
||||
modernize-*,\
|
||||
-modernize-avoid-c-arrays,\
|
||||
-modernize-deprecated-headers,\
|
||||
-modernize-return-braced-init-list,\
|
||||
-modernize-use-auto,\
|
||||
-modernize-use-nodiscard,\
|
||||
-modernize-use-noexcept,\
|
||||
-modernize-use-transparent-functors,\
|
||||
-modernize-use-using,\
|
||||
@ -24,8 +29,11 @@ readability-*,\
|
||||
-readability-implicit-bool-cast,\
|
||||
-readability-implicit-bool-conversion,\
|
||||
-readability-inconsistent-declaration-parameter-name,\
|
||||
-readability-isolate-declaration,\
|
||||
-readability-magic-numbers,\
|
||||
-readability-named-parameter,\
|
||||
-readability-redundant-declaration,\
|
||||
-readability-uppercase-literal-suffix,\
|
||||
"
|
||||
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
|
||||
CheckOptions:
|
||||
|
@ -110,7 +110,8 @@ cmParseBlanketJSCoverage::cmParseBlanketJSCoverage(
|
||||
{
|
||||
}
|
||||
|
||||
bool cmParseBlanketJSCoverage::LoadCoverageData(std::vector<std::string> files)
|
||||
bool cmParseBlanketJSCoverage::LoadCoverageData(
|
||||
std::vector<std::string> const& files)
|
||||
{
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Found " << files.size() << " Files" << std::endl,
|
||||
|
@ -29,7 +29,7 @@ class cmParseBlanketJSCoverage
|
||||
public:
|
||||
cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont,
|
||||
cmCTest* ctest);
|
||||
bool LoadCoverageData(std::vector<std::string> files);
|
||||
bool LoadCoverageData(std::vector<std::string> const& files);
|
||||
// Read the JSON output
|
||||
bool ReadJSONFile(std::string const& file);
|
||||
|
||||
|
@ -684,7 +684,6 @@ void cmFileAPI::BuildClientRequestCodeModel(
|
||||
|
||||
Json::Value cmFileAPI::BuildCodeModel(Object const& object)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
Json::Value codemodel = cmFileAPICodemodelDump(*this, object.Version);
|
||||
codemodel["kind"] = this->ObjectKindName(object.Kind);
|
||||
|
||||
@ -719,7 +718,6 @@ void cmFileAPI::BuildClientRequestCache(
|
||||
|
||||
Json::Value cmFileAPI::BuildCache(Object const& object)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
Json::Value cache = cmFileAPICacheDump(*this, object.Version);
|
||||
cache["kind"] = this->ObjectKindName(object.Kind);
|
||||
|
||||
@ -754,7 +752,6 @@ void cmFileAPI::BuildClientRequestCMakeFiles(
|
||||
|
||||
Json::Value cmFileAPI::BuildCMakeFiles(Object const& object)
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
Json::Value cmakeFiles = cmFileAPICMakeFilesDump(*this, object.Version);
|
||||
cmakeFiles["kind"] = this->ObjectKindName(object.Kind);
|
||||
|
||||
|
@ -287,7 +287,7 @@ class Target
|
||||
Json::ArrayIndex si);
|
||||
void AddBacktrace(Json::Value& object, cmListFileBacktrace const& bt);
|
||||
Json::Value DumpPaths();
|
||||
Json::Value DumpCompileData(CompileData cd);
|
||||
Json::Value DumpCompileData(CompileData const& cd);
|
||||
Json::Value DumpInclude(CompileData::IncludeEntry const& inc);
|
||||
Json::Value DumpDefine(BT<std::string> const& def);
|
||||
Json::Value DumpSources();
|
||||
@ -915,7 +915,7 @@ Json::Value Target::DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
|
||||
return source;
|
||||
}
|
||||
|
||||
Json::Value Target::DumpCompileData(CompileData cd)
|
||||
Json::Value Target::DumpCompileData(CompileData const& cd)
|
||||
{
|
||||
Json::Value result = Json::objectValue;
|
||||
|
||||
|
@ -41,7 +41,7 @@ bool cmNewLineStyle::ReadFromArguments(const std::vector<std::string>& args,
|
||||
return true;
|
||||
}
|
||||
|
||||
const std::string cmNewLineStyle::GetCharacters() const
|
||||
std::string cmNewLineStyle::GetCharacters() const
|
||||
{
|
||||
switch (NewLineStyle) {
|
||||
case Invalid:
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
bool ReadFromArguments(const std::vector<std::string>& args,
|
||||
std::string& errorString);
|
||||
|
||||
const std::string GetCharacters() const;
|
||||
std::string GetCharacters() const;
|
||||
|
||||
private:
|
||||
Style NewLineStyle = Invalid;
|
||||
|
@ -378,8 +378,7 @@ void cmServerProtocol1::HandleCMakeFileChanges(const std::string& path,
|
||||
SendSignal(kFILE_CHANGE_SIGNAL, obj);
|
||||
}
|
||||
|
||||
const cmServerResponse cmServerProtocol1::Process(
|
||||
const cmServerRequest& request)
|
||||
cmServerResponse cmServerProtocol1::Process(const cmServerRequest& request)
|
||||
{
|
||||
assert(this->m_State >= STATE_ACTIVE);
|
||||
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
|
||||
virtual std::pair<int, int> ProtocolVersion() const = 0;
|
||||
virtual bool IsExperimental() const = 0;
|
||||
virtual const cmServerResponse Process(const cmServerRequest& request) = 0;
|
||||
virtual cmServerResponse Process(const cmServerRequest& request) = 0;
|
||||
|
||||
bool Activate(cmServer* server, const cmServerRequest& request,
|
||||
std::string* errorMessage);
|
||||
@ -106,7 +106,7 @@ class cmServerProtocol1 : public cmServerProtocol
|
||||
public:
|
||||
std::pair<int, int> ProtocolVersion() const override;
|
||||
bool IsExperimental() const override;
|
||||
const cmServerResponse Process(const cmServerRequest& request) override;
|
||||
cmServerResponse Process(const cmServerRequest& request) override;
|
||||
|
||||
private:
|
||||
bool DoActivate(const cmServerRequest& request,
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
operator cmGeneratorTarget const*() const { return this->Target; }
|
||||
cmGeneratorTarget const* operator->() const { return this->Target; }
|
||||
cmGeneratorTarget const& operator*() const { return *this->Target; }
|
||||
friend bool operator<(cmTargetDepend l, cmTargetDepend r)
|
||||
friend bool operator<(cmTargetDepend const& l, cmTargetDepend const& r)
|
||||
{
|
||||
return l.Target < r.Target;
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ void cmake::LoadEnvironmentPresets()
|
||||
this->EnvironmentGenerator = envGenVar;
|
||||
}
|
||||
|
||||
auto readGeneratorVar = [&](std::string name, std::string& key) {
|
||||
auto readGeneratorVar = [&](std::string const& name, std::string& key) {
|
||||
std::string varValue;
|
||||
if (cmSystemTools::GetEnv(name, varValue)) {
|
||||
if (hasEnvironmentGenerator) {
|
||||
|
Loading…
Reference in New Issue
Block a user