Changeset View
Changeset View
Standalone View
Standalone View
addons/project/tools/kateprojectcodeanalysistoolflake8.cpp
Show All 33 Lines | |||||
34 | 34 | | |||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | QString KateProjectCodeAnalysisToolFlake8::name() | 37 | QString KateProjectCodeAnalysisToolFlake8::name() | ||
38 | { | 38 | { | ||
39 | return i18n("flake8"); | 39 | return i18n("flake8"); | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | QString KateProjectCodeAnalysisToolFlake8::fileExtensions() | ||||
43 | { | ||||
44 | return QStringLiteral("py"); | ||||
45 | } | ||||
46 | | ||||
42 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | 47 | QStringList KateProjectCodeAnalysisToolFlake8::filter(const QStringList &files) | ||
43 | { | 48 | { | ||
44 | // for now we expect files with extension | 49 | // for now we expect files with extension | ||
45 | return files.filter(QRegularExpression(QStringLiteral("\\.py$"))); | 50 | return files.filter(QRegularExpression(QStringLiteral("\\.(") + fileExtensions() + QStringLiteral(")$"))); | ||
46 | } | 51 | } | ||
47 | 52 | | |||
48 | QString KateProjectCodeAnalysisToolFlake8::path() | 53 | QString KateProjectCodeAnalysisToolFlake8::path() | ||
49 | { | 54 | { | ||
50 | /* | 55 | /* | ||
51 | * for now, only the executable in the path can be called, | 56 | * for now, only the executable in the path can be called, | ||
52 | * but it would be great to be able to specify a version | 57 | * but it would be great to be able to specify a version | ||
53 | * installed in a virtual environment | 58 | * installed in a virtual environment | ||
Show All 36 Lines |