Changeset View
Changeset View
Standalone View
Standalone View
addons/project/tools/kateprojectcodeanalysistoolcppcheck2.cpp
- This file was added.
1 | /* This file is part of the Kate project. | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * Copyright (C) 2018 Gregor Mi <codestruct@posteo.org> | ||||
4 | * | ||||
5 | * This library is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU Library General Public | ||||
7 | * License as published by the Free Software Foundation; either | ||||
8 | * version 2 of the License, or (at your option) any later version. | ||||
9 | * | ||||
10 | * This library is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
13 | * Library General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU Library General Public License | ||||
16 | * along with this library; see the file COPYING.LIB. If not, write to | ||||
17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||||
18 | * Boston, MA 02110-1301, USA. | ||||
19 | */ | ||||
20 | | ||||
21 | #include "kateprojectcodeanalysistoolcppcheck2.h" | ||||
22 | | ||||
23 | #include <QRegularExpression> | ||||
24 | #include <klocalizedstring.h> | ||||
25 | | ||||
26 | KateProjectCodeAnalysisToolCppcheck2::KateProjectCodeAnalysisToolCppcheck2(QObject *parent) | ||||
27 | : KateProjectCodeAnalysisToolCppcheck(parent) | ||||
28 | { | ||||
29 | | ||||
30 | } | ||||
31 | | ||||
32 | KateProjectCodeAnalysisToolCppcheck2::~KateProjectCodeAnalysisToolCppcheck2() | ||||
33 | { | ||||
34 | | ||||
35 | } | ||||
36 | | ||||
37 | QString KateProjectCodeAnalysisToolCppcheck2::name() | ||||
38 | { | ||||
39 | return i18n("Cppcheck (C++ only)"); | ||||
40 | } | ||||
41 | | ||||
42 | QString KateProjectCodeAnalysisToolCppcheck2::description() | ||||
43 | { | ||||
44 | return i18n("Cppcheck with --language=c++. Filtered files also contain header files which might find more issues."); | ||||
45 | } | ||||
46 | | ||||
47 | QString KateProjectCodeAnalysisToolCppcheck2::fileExtensions() | ||||
48 | { | ||||
49 | return QStringLiteral("h|hpp|cpp|cxx|cc|c++|c|tpp|txx"); | ||||
50 | } | ||||
51 | | ||||
52 | QStringList KateProjectCodeAnalysisToolCppcheck2::arguments() | ||||
53 | { | ||||
54 | QStringList _args; | ||||
55 | | ||||
56 | _args << QStringLiteral("-q") | ||||
57 | << QStringLiteral("--language=c++") | ||||
58 | << QStringLiteral("--inline-suppr") | ||||
59 | << QStringLiteral("--enable=all") | ||||
60 | << QStringLiteral("--template={file}////{line}////{severity}////{message}") | ||||
61 | << QStringLiteral("--file-list=-"); | ||||
62 | | ||||
63 | return _args; | ||||
64 | } | ||||
65 | |