Continued changing the names of the various code style checkers to make them more appropriate to the broadened scope.

Fri, 04 Oct 2013 17:35:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 04 Oct 2013 17:35:44 +0200
changeset 2984
031cceaa8b01
parent 2983
f2f33024b001
child 2985
177b1858245f

Continued changing the names of the various code style checkers to make them more appropriate to the broadened scope.

Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py file | annotate | diff | comparison | revisions
UtilitiesPython2/CodeStyleChecker.py file | annotate | diff | comparison | revisions
UtilitiesPython2/DocStyleCheckerPy2.py file | annotate | diff | comparison | revisions
UtilitiesPython2/NamingStyleCheckerPy2.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Oct 04 17:35:44 2013 +0200
@@ -443,7 +443,7 @@
                         else:
                             ignore = []
                         
-                        # check PEP-8
+                        # check coding style
                         styleGuide = pep8.StyleGuide(
                             reporter=CodeStyleCheckerReport,
                             repeat=repeatMessages,
@@ -455,14 +455,14 @@
                         report = styleGuide.check_files([file])
                         stats.update(report.counters)
                         
-                        # check PEP-257
-                        pep257Checker = DocStyleChecker(
+                        # check documentation style
+                        docStyleChecker = DocStyleChecker(
                             source, file, select, ignore, [], repeatMessages,
                             maxLineLength=maxLineLength, docType=docType)
-                        pep257Checker.run()
-                        stats.update(pep257Checker.counters)
+                        docStyleChecker.run()
+                        stats.update(docStyleChecker.counters)
                         
-                        errors = report.errors + pep257Checker.errors
+                        errors = report.errors + docStyleChecker.errors
                     
                     deferredFixes = {}
                     for error in errors:
--- a/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Fri Oct 04 17:35:44 2013 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a checker for PEP-257 documentation string conventions.
+Module implementing a checker for documentation string conventions.
 """
 
 #
@@ -102,7 +102,7 @@
 
 class DocStyleChecker(object):
     """
-    Class implementing a checker for PEP-257 documentation string conventions.
+    Class implementing a checker for documentation string conventions.
     """
     Codes = [
         "D101", "D102", "D103", "D104", "D105",
@@ -429,7 +429,7 @@
     def run(self):
         """
         Public method to check the given source for violations of doc string
-        conventions according to PEP-257.
+        conventions.
         """
         if not self.__source or not self.__filename:
             # don't do anything, if essential data is missing
--- a/Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py	Fri Oct 04 17:35:44 2013 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a checker for PEP-8 naming conventions.
+Module implementing a checker for naming conventions.
 """
 
 import collections
@@ -17,7 +17,7 @@
 
 class NamingStyleChecker(object):
     """
-    Class implementing a checker for PEP-8 naming conventions.
+    Class implementing a checker for naming conventions.
     """
     LowercaseRegex = re.compile(r"[_a-z][_a-z0-9]*$")
     UppercaseRegexp = re.compile(r"[_A-Z][_A-Z0-9]*$")
--- a/UtilitiesPython2/CodeStyleChecker.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/UtilitiesPython2/CodeStyleChecker.py	Fri Oct 04 17:35:44 2013 +0200
@@ -120,7 +120,7 @@
         else:
             ignore = []
         
-        # check PEP-8
+        # check coding style
         styleGuide = pep8.StyleGuide(
             reporter=CodeStyleReport,
             repeat=repeat,
@@ -131,14 +131,14 @@
         )
         report = styleGuide.check_files([filename])
         
-        # check PEP-257
-        pep257Checker = DocStyleChecker(
+        # check documentation style
+        docStyleChecker = DocStyleChecker(
             source, filename, select, ignore, [], repeat,
             maxLineLength=max_line_length, docType=docType)
-        pep257Checker.run()
+        docStyleChecker.run()
         
         
-        errors = report.errors + pep257Checker.errors
+        errors = report.errors + docStyleChecker.errors
         
         if len(errors) > 0:
             errors.sort(key=lambda a: a[1])
@@ -156,9 +156,9 @@
             for key in report.counters:
                 if key.startswith(("E", "N", "W")):
                     print key, report.counters[key]
-            for key in pep257Checker.counters:
+            for key in docStyleChecker.counters:
                 if key.startswith("D"):
-                    print key, pep257Checker.counters[key]
+                    print key, docStyleChecker.counters[key]
         else:
             print "NO_PEP8"
             print filename
--- a/UtilitiesPython2/DocStyleCheckerPy2.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/UtilitiesPython2/DocStyleCheckerPy2.py	Fri Oct 04 17:35:44 2013 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a checker for PEP-257 documentation string conventions.
+Module implementing a checker for documentation string conventions.
 """
 
 #
@@ -100,7 +100,7 @@
 
 class DocStyleChecker(object):
     """
-    Class implementing a checker for PEP-257 and eric documentation string conventions.
+    Class implementing a checker for documentation string conventions.
     """
     Codes = [
         "D101", "D102", "D103", "D104", "D105",
@@ -294,7 +294,7 @@
     def run(self):
         """
         Public method to check the given source for violations of doc string
-        conventions according to PEP-257.
+        conventions.
         """
         if not self.__source or not self.__filename:
             # don't do anything, if essential data is missing
--- a/UtilitiesPython2/NamingStyleCheckerPy2.py	Fri Oct 04 17:21:14 2013 +0200
+++ b/UtilitiesPython2/NamingStyleCheckerPy2.py	Fri Oct 04 17:35:44 2013 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a checker for PEP-8 naming conventions for Python2.
+Module implementing a checker for naming conventions for Python2.
 """
 
 import collections
@@ -15,7 +15,7 @@
 
 class NamingStyleChecker(object):
     """
-    Class implementing a checker for PEP-8 naming conventions for Python2.
+    Class implementing a checker for naming conventions for Python2.
     """
     LowercaseRegex = re.compile(r"[_a-z][_a-z0-9]*$")
     UppercaseRegexp = re.compile(r"[_A-Z][_A-Z0-9]*$")

eric ide

mercurial