src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py

branch
eric7
changeset 10579
be997a4bd670
parent 10439
21c28b0f9e41
child 10594
6156d9675f62
child 10683
779cda568acb
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Wed Feb 14 10:21:59 2024 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py	Fri Feb 16 19:58:06 2024 +0100
@@ -204,8 +204,8 @@
 
     @param filename source filename
     @type str
-    @param source string containing the source code to check
-    @type str
+    @param source list of code lines to be checked
+    @type list of str
     @param args arguments used by the codeStyleCheck function (list of
         excludeMessages, includeMessages, repeatMessages, fixCodes,
         noFixCodes, fixIssues, maxLineLength, maxDocLineLength, blankLines,
@@ -323,8 +323,8 @@
 
     @param filename source filename
     @type str
-    @param source string containing the source code to check
-    @type str
+    @param source list of code lines to be checked
+    @type list of str
     @return tuple containing the error dictionary with syntax error details,
         a statistics dictionary and None or a tuple containing two None and
         the generated AST tree
@@ -366,8 +366,8 @@
 
     @param filename source filename
     @type str
-    @param source string containing the source code to check
-    @type str
+    @param source list of code lines to be checked
+    @type list of str
     @param args arguments used by the codeStyleCheck function (list of
         excludeMessages, includeMessages, repeatMessages, fixCodes,
         noFixCodes, fixIssues, maxLineLength, maxDocLineLength, blankLines,
@@ -465,7 +465,8 @@
                 max_doc_length=maxDocLineLength,
                 hang_closing=hangClosing,
             )
-            report = styleGuide.check_files([filename])
+            report = styleGuide.options.report
+            styleGuide.input_file(filename, lines=source)
             stats.update(report.counters)
             errors = report.errors
 

eric ide

mercurial