Changeset View
Changeset View
Standalone View
Standalone View
addons/project/tools/kateprojectcodeanalysistoolcppcheck.cpp
Show All 30 Lines | |||||
31 | 31 | | |||
32 | KateProjectCodeAnalysisToolCppcheck::~KateProjectCodeAnalysisToolCppcheck() | 32 | KateProjectCodeAnalysisToolCppcheck::~KateProjectCodeAnalysisToolCppcheck() | ||
33 | { | 33 | { | ||
34 | 34 | | |||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | QString KateProjectCodeAnalysisToolCppcheck::name() | 37 | QString KateProjectCodeAnalysisToolCppcheck::name() | ||
38 | { | 38 | { | ||
39 | return i18n("cppcheck"); | 39 | return i18n("cppcheck (C++)"); | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | QString KateProjectCodeAnalysisToolCppcheck::fileExtensions() | 42 | QString KateProjectCodeAnalysisToolCppcheck::fileExtensions() | ||
43 | { | 43 | { | ||
44 | return QStringLiteral("cpp|cxx|cc|c++|c|tpp|txx"); | 44 | return QStringLiteral("cpp|cxx|cc|c++|c|tpp|txx"); | ||
ngraham: Does this need to be in quotes? | |||||
I was not sure, because I grabbed the exact text from the projects web site. gregormi: I was not sure, because I grabbed the exact text from the projects web site. | |||||
ngraham: I think we can omit the quotation marks. | |||||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | QStringList KateProjectCodeAnalysisToolCppcheck::filter(const QStringList &files) | 47 | QStringList KateProjectCodeAnalysisToolCppcheck::filter(const QStringList &files) | ||
48 | { | 48 | { | ||
49 | // c++ files | 49 | // c++ files | ||
50 | return files.filter(QRegularExpression(QStringLiteral("\\.(") | 50 | return files.filter(QRegularExpression(QStringLiteral("\\.(") | ||
51 | + fileExtensions().replace(QStringLiteral("+"), QStringLiteral("\\+")) | 51 | + fileExtensions().replace(QStringLiteral("+"), QStringLiteral("\\+")) | ||
52 | + QStringLiteral(")$"))); | 52 | + QStringLiteral(")$"))); | ||
Show All 30 Lines | |||||
83 | QString KateProjectCodeAnalysisToolCppcheck::stdinMessages() | 83 | QString KateProjectCodeAnalysisToolCppcheck::stdinMessages() | ||
84 | { | 84 | { | ||
85 | // filenames are written to stdin (--file-list=-) | 85 | // filenames are written to stdin (--file-list=-) | ||
86 | 86 | | |||
87 | if (!m_project) { | 87 | if (!m_project) { | ||
88 | return QString(); | 88 | return QString(); | ||
89 | } | 89 | } | ||
90 | 90 | | |||
91 | return filter(m_project->files()).join(QStringLiteral("\n")); | 91 | auto&& fileList = filter(m_project->files()); | ||
92 | setActualFilesCount(fileList.size()); | ||||
93 | return fileList.join(QStringLiteral("\n")); | ||||
92 | } | 94 | } |
Does this need to be in quotes?