summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-04-15 19:40:52 +0100
committerLars Wirzenius <liw@liw.fi>2014-04-15 19:40:52 +0100
commitcbfab73361f859b3dcad2512c528f9820c13a0c6 (patch)
treec7332a52452887451b16a194b2a42faf296f5856 /setup.py
parent1aea623572f2a88775ebf2a5f6e6c945472438dc (diff)
downloadobnam-cbfab73361f859b3dcad2512c528f9820c13a0c6.tar.gz
Move nitpicking code to separate tool
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/setup.py b/setup.py
index 498bc3f8..2c18716c 100644
--- a/setup.py
+++ b/setup.py
@@ -181,22 +181,13 @@ class Check(Command):
if self.nitpick:
sources = self.find_all_source_files()
- self.check_sources_for_long_lines(sources)
+ self.check_sources_for_nitpicks(sources)
self.check_copyright_statements(sources)
print "setup.py check done"
- def check_sources_for_long_lines(self, sources):
- for filename in sources:
- self.check_one_source_for_long_lines(filename)
-
- def check_one_source_for_long_lines(self, filename):
- max_line_length = 80
- with open(filename) as f:
- for i, line in enumerate(f):
- line = line.expandtabs()
- if len(line) >= max_line_length:
- print 'LONG: %s: %d: %s' % (filename, i+1, line),
+ def check_sources_for_nitpicks(self, sources):
+ cliapp.runcmd(['./nitpicker'] + sources, stdout=None, stderr=None)
def check_copyright_statements(self, sources):
if self.copylint_is_available():