[Pkg-debile-commits] [debile-slave] 63/100: Add in perlcritic
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:53:09 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-slave.
commit a5156109e414060e6bd7fc39a7c85f32e5ec3fe3
Author: Paul Tagliamonte <tag at pault.ag>
Date: Sat Jun 8 23:48:43 2013 -0400
Add in perlcritic
---
ethel/commands/__init__.py | 1 +
ethel/commands/perlcritic.py | 5 +++++
ethel/runners/perlcritic.py | 20 ++++++++++++++++++++
3 files changed, 26 insertions(+)
diff --git a/ethel/commands/__init__.py b/ethel/commands/__init__.py
index ee14ede..2c75564 100644
--- a/ethel/commands/__init__.py
+++ b/ethel/commands/__init__.py
@@ -4,6 +4,7 @@ import importlib
PLUGINS = {
"build": "ethel.commands.build",
"pep8": "ethel.commands.pep8",
+ "perlcritic": "ethel.commands.perlcritic",
"lintian": "ethel.commands.lintian",
"lintian4py": "ethel.commands.lintian4py",
diff --git a/ethel/commands/perlcritic.py b/ethel/commands/perlcritic.py
new file mode 100644
index 0000000..8cb2421
--- /dev/null
+++ b/ethel/commands/perlcritic.py
@@ -0,0 +1,5 @@
+from ethel.runners.perlcritic import perlcritic
+
+
+def run(dsc, package, job, firehose):
+ return perlcritic(dsc, firehose)
diff --git a/ethel/runners/perlcritic.py b/ethel/runners/perlcritic.py
new file mode 100644
index 0000000..f8a3987
--- /dev/null
+++ b/ethel/runners/perlcritic.py
@@ -0,0 +1,20 @@
+from ethel.wrappers.perlcritic import parse_perlcritic
+from ethel.utils import run_command, cd
+import os
+
+
+def perlcritic(dsc, analysis):
+ run_command(["dpkg-source", "-x", dsc, "source"])
+ with cd('source'):
+ out, err, ret = run_command([
+ 'perlcritic', '--brutal', '.', '--verbose',
+ '%f:%l:%c %s %p %m\n'
+ ])
+ if ret == 1:
+ raise Exception("Perlcritic had an internal error")
+
+ failed = ret == 2
+ for issue in parse_perlcritic(out.splitlines()):
+ analysis.results.append(issue)
+
+ return (analysis, out, failed)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git
More information about the Pkg-debile-commits
mailing list