Sat, 27 Sep 2014 11:22:39 +0200
Fixed issues in the style checker checking projects with empty files.
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sun Sep 21 12:47:20 2014 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Sep 27 11:22:39 2014 +0200 @@ -475,7 +475,7 @@ fname, lineno, position, text = error if lineno > len(source): lineno = len(source) - if "__IGNORE_WARNING__" not in \ + if lineno == 0 or "__IGNORE_WARNING__" not in \ Utilities.extractLineFlags( source[lineno - 1].strip()): self.noResults = False
--- a/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Sun Sep 21 12:47:20 2014 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Sat Sep 27 11:22:39 2014 +0200 @@ -1516,7 +1516,7 @@ # extended API for eric5 integration checker = cls(tree, self.filename, self.options) for lineno, offset, code, check, *args in checker.run(): - if not noqa(self.lines[lineno - 1]): + if lineno == 0 or not noqa(self.lines[lineno - 1]): self.report_error_args(lineno, offset, code, check, *args) def generate_tokens(self):