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 | } | 40 | } | ||
41 | 41 | | |||
42 | QString KateProjectCodeAnalysisToolFlake8::fileExtensions() | 42 | QString KateProjectCodeAnalysisToolFlake8::fileExtensions() | ||
43 | { | 43 | { | ||
44 | return QStringLiteral("py"); | 44 | return QStringLiteral("py"); | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | 47 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | ||
Show All 19 Lines | 64 | { | |||
67 | _args << QStringLiteral("--exit-zero") | 67 | _args << QStringLiteral("--exit-zero") | ||
68 | /* | 68 | /* | ||
69 | * translating a flake8 code to a severity level is subjective, | 69 | * translating a flake8 code to a severity level is subjective, | ||
70 | * so the code is provided as a severity level. | 70 | * so the code is provided as a severity level. | ||
71 | */ | 71 | */ | ||
72 | << QStringLiteral("--format=%(path)s////%(row)d////%(code)s////%(text)s"); | 72 | << QStringLiteral("--format=%(path)s////%(row)d////%(code)s////%(text)s"); | ||
73 | 73 | | |||
74 | if (m_project) { | 74 | if (m_project) { | ||
75 | _args.append(filter(m_project->files())); | 75 | auto&& fileList = filter(m_project->files()); | ||
76 | setActualFilesCount(fileList.size()); | ||||
77 | _args.append(fileList); | ||||
76 | } | 78 | } | ||
77 | 79 | | |||
78 | return _args; | 80 | return _args; | ||
79 | } | 81 | } | ||
80 | 82 | | |||
81 | QString KateProjectCodeAnalysisToolFlake8::notInstalledMessage() | 83 | QString KateProjectCodeAnalysisToolFlake8::notInstalledMessage() | ||
82 | { | 84 | { | ||
83 | return i18n("Please install 'flake8'."); | 85 | return i18n("Please install 'flake8'."); | ||
Show All 11 Lines |