File indexing completed on 2024-05-05 16:45:13
0001 /* 0002 SPDX-FileCopyrightText: 2016 Anton Anikin <anton.anikin@htower.ru> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef CPPCHECK_PARAMETERS_H 0008 #define CPPCHECK_PARAMETERS_H 0009 0010 #include <util/path.h> 0011 0012 namespace KDevelop 0013 { 0014 class IProject; 0015 } 0016 0017 namespace cppcheck 0018 { 0019 0020 namespace defaults 0021 { 0022 0023 // global settings 0024 static const bool hideOutputView = true; 0025 static const bool showXmlOutput = false; 0026 0027 // project settings 0028 static const bool checkStyle = false; 0029 static const bool checkPerformance = false; 0030 static const bool checkPortability = false; 0031 static const bool checkInformation = false; 0032 static const bool checkUnusedFunction = false; 0033 static const bool checkMissingInclude = false; 0034 static const bool inconclusiveAnalysis = false; 0035 static const bool forceCheck = false; 0036 static const bool checkConfig = false; 0037 0038 static const bool useProjectIncludes = true; 0039 static const bool useSystemIncludes = false; 0040 0041 } 0042 0043 class Parameters 0044 { 0045 public: 0046 explicit Parameters(KDevelop::IProject* project = nullptr); 0047 0048 QStringList commandLine() const; 0049 QStringList commandLine(QString& infoMessage) const; 0050 0051 // global settings 0052 QString executablePath; 0053 bool hideOutputView; 0054 bool showXmlOutput; 0055 0056 // project settings 0057 bool checkStyle; 0058 bool checkPerformance; 0059 bool checkPortability; 0060 bool checkInformation; 0061 bool checkUnusedFunction; 0062 bool checkMissingInclude; 0063 bool inconclusiveAnalysis; 0064 bool forceCheck; 0065 bool checkConfig; 0066 0067 bool useProjectIncludes; 0068 bool useSystemIncludes; 0069 QString ignoredIncludes; 0070 0071 QString extraParameters; 0072 0073 // runtime settings 0074 QString checkPath; 0075 0076 KDevelop::Path projectRootPath() const; 0077 0078 private: 0079 QString applyPlaceholders(const QString& text) const; 0080 0081 KDevelop::IProject* m_project; 0082 0083 KDevelop::Path m_projectRootPath; 0084 KDevelop::Path m_projectBuildPath; 0085 0086 QList<KDevelop::Path> m_includeDirectories; 0087 }; 0088 0089 } 0090 #endif