Changeset View
Changeset View
Standalone View
Standalone View
addons/project/tools/kateprojectcodeanalysistoolflake8.cpp
Show All 30 Lines | |||||
31 | 31 | | |||
32 | KateProjectCodeAnalysisToolFlake8::~KateProjectCodeAnalysisToolFlake8() | 32 | KateProjectCodeAnalysisToolFlake8::~KateProjectCodeAnalysisToolFlake8() | ||
33 | { | 33 | { | ||
34 | 34 | | |||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | QString KateProjectCodeAnalysisToolFlake8::name() | 37 | QString KateProjectCodeAnalysisToolFlake8::name() | ||
38 | { | 38 | { | ||
39 | return i18n("flake8"); | 39 | return i18n("Flake8 (Python)"); | ||
40 | } | ||||
41 | | ||||
42 | QString KateProjectCodeAnalysisToolFlake8::description() const | ||||
43 | { | ||||
44 | return i18n("Flake8: Your Tool For Style Guide Enforcement for Python"); | ||||
40 | } | 45 | } | ||
41 | 46 | | |||
42 | QString KateProjectCodeAnalysisToolFlake8::fileExtensions() | 47 | QString KateProjectCodeAnalysisToolFlake8::fileExtensions() | ||
43 | { | 48 | { | ||
44 | return QStringLiteral("py"); | 49 | return QStringLiteral("py"); | ||
45 | } | 50 | } | ||
46 | 51 | | |||
47 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | 52 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | ||
Show All 19 Lines | 69 | { | |||
67 | _args << QStringLiteral("--exit-zero") | 72 | _args << QStringLiteral("--exit-zero") | ||
68 | /* | 73 | /* | ||
69 | * translating a flake8 code to a severity level is subjective, | 74 | * translating a flake8 code to a severity level is subjective, | ||
70 | * so the code is provided as a severity level. | 75 | * so the code is provided as a severity level. | ||
71 | */ | 76 | */ | ||
72 | << QStringLiteral("--format=%(path)s////%(row)d////%(code)s////%(text)s"); | 77 | << QStringLiteral("--format=%(path)s////%(row)d////%(code)s////%(text)s"); | ||
73 | 78 | | |||
74 | if (m_project) { | 79 | if (m_project) { | ||
75 | _args.append(filter(m_project->files())); | 80 | auto&& fileList = filter(m_project->files()); | ||
81 | setActualFilesCount(fileList.size()); | ||||
82 | _args.append(fileList); | ||||
76 | } | 83 | } | ||
77 | 84 | | |||
78 | return _args; | 85 | return _args; | ||
79 | } | 86 | } | ||
80 | 87 | | |||
81 | QString KateProjectCodeAnalysisToolFlake8::notInstalledMessage() | 88 | QString KateProjectCodeAnalysisToolFlake8::notInstalledMessage() | ||
82 | { | 89 | { | ||
83 | return i18n("Please install 'flake8'."); | 90 | return i18n("Please install 'flake8'."); | ||
Show All 11 Lines |