From de6654cf2c0d25f9166167927a18a6ce24a2b9f4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Morin Date: Sat, 2 Mar 2019 20:30:31 -0500 Subject: [PATCH] Pylint: add proper support for packages and modules --- .../jenkins/plugins/analysis/core/model/TabLabelProvider.java | 2 +- src/main/java/io/jenkins/plugins/analysis/warnings/PyLint.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/analysis/core/model/TabLabelProvider.java b/src/main/java/io/jenkins/plugins/analysis/core/model/TabLabelProvider.java index f30ec526fc..8f3f0f1f4d 100644 --- a/src/main/java/io/jenkins/plugins/analysis/core/model/TabLabelProvider.java +++ b/src/main/java/io/jenkins/plugins/analysis/core/model/TabLabelProvider.java @@ -105,7 +105,7 @@ private String getPackageOrNamespace(final String packageText, final String name if (fileTypes.contains("cs")) { return nameSpaceText; } - else if (fileTypes.contains("java")) { + else if (fileTypes.contains("java") || fileTypes.contains("py")) { return packageText; } } diff --git a/src/main/java/io/jenkins/plugins/analysis/warnings/PyLint.java b/src/main/java/io/jenkins/plugins/analysis/warnings/PyLint.java index 2e64bb0b95..028253d608 100644 --- a/src/main/java/io/jenkins/plugins/analysis/warnings/PyLint.java +++ b/src/main/java/io/jenkins/plugins/analysis/warnings/PyLint.java @@ -85,7 +85,7 @@ public String getDisplayName() { @Override public String getHelp() { return "

Create a ./pylintrc that contains:" - + "

msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}

" + + "

msg-template={path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}

" + "

" + "

Start pylint using the command:" + "

pylint --rcfile=./pylintrc CODE > pylint.log

"