[totem] plugins: Add pylint to `make check` for all Python plugins
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] plugins: Add pylint to `make check` for all Python plugins
- Date: Tue, 5 Apr 2011 00:14:46 +0000 (UTC)
commit 72b30cdba63ddf722e74920f34341f6ae3db7a8f
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Mar 27 09:48:16 2011 +0100
plugins: Add pylint to `make check` for all Python plugins
Helps: bgo#645739
src/plugins/Makefile.plugins | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/Makefile.plugins b/src/plugins/Makefile.plugins
index 6b7ab07..c121c58 100644
--- a/src/plugins/Makefile.plugins
+++ b/src/plugins/Makefile.plugins
@@ -26,3 +26,22 @@ plugin_ldflags = \
plugin_libadd = \
$(top_builddir)/src/libtotem.la
+
+# Checking rules for Python plugins
+# Execute pylint on all the requisite files individually, returning non-zero
+# iff any of the calls to pylint returned non-zero.
+check-pylint: $(plugin_PYTHON)
+ @exitstatus=0; \
+ for py in $^; do \
+ pylint -i y $$py; \
+ \
+ newexitstatus=$$?; \
+ if [ $$exitstatus == 0 ]; then \
+ exitstatus=$$newexitstatus; \
+ fi; \
+ done; \
+ exit $$exitstatus
+
+check: check-pylint
+
+.PHONY: check-pylint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]