--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleTopicChecker.html Thu Feb 27 14:42:39 2025 +0100 @@ -0,0 +1,233 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleTopicChecker</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleTopicChecker</h1> +<p> +Module implementing the topic checker base class containing common methods. +</p> + +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Classes</h3> +<table> +<tr> +<td><a href="#CodeStyleTopicChecker">CodeStyleTopicChecker</a></td> +<td>Class implementing the topic checker base class.</td> +</tr> +</table> + +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> + +<hr /> +<hr /> +<a NAME="CodeStyleTopicChecker" ID="CodeStyleTopicChecker"></a> +<h2>CodeStyleTopicChecker</h2> +<p> + Class implementing the topic checker base class. +</p> + +<h3>Derived from</h3> +None +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Methods</h3> +<table> +<tr> +<td><a href="#CodeStyleTopicChecker.__init__">CodeStyleTopicChecker</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#CodeStyleTopicChecker._ignoreCode">_ignoreCode</a></td> +<td>Protected method to check if the message code should be ignored.</td> +</tr> +<tr> +<td><a href="#CodeStyleTopicChecker._initializeCheckers">_initializeCheckers</a></td> +<td>Protected method to determine the list of check methods to be run.</td> +</tr> +<tr> +<td><a href="#CodeStyleTopicChecker.addError">addError</a></td> +<td>Public method to record an issue.</td> +</tr> +<tr> +<td><a href="#CodeStyleTopicChecker.addErrorFromNode">addErrorFromNode</a></td> +<td>Public method to record an issue given the faulty ast node.</td> +</tr> +<tr> +<td><a href="#CodeStyleTopicChecker.run">run</a></td> +<td>Public method to execute the relevant checks.</td> +</tr> +</table> + +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + + +<a NAME="CodeStyleTopicChecker.__init__" ID="CodeStyleTopicChecker.__init__"></a> +<h4>CodeStyleTopicChecker (Constructor)</h4> +<b>CodeStyleTopicChecker</b>(<i>category, source, filename, tree, select, ignore, expected, repeat, args</i>) +<p> + Constructor +</p> + +<dl> + +<dt><i>category</i> (str)</dt> +<dd> +checker category code (one to three uppercase characters +</dd> +<dt><i>source</i> (list of str)</dt> +<dd> +source code to be checked +</dd> +<dt><i>filename</i> (str)</dt> +<dd> +name of the source file +</dd> +<dt><i>tree</i> (ast.Module)</dt> +<dd> +AST tree of the source code +</dd> +<dt><i>select</i> (list of str)</dt> +<dd> +list of selected codes +</dd> +<dt><i>ignore</i> (list of str)</dt> +<dd> +list of codes to be ignored +</dd> +<dt><i>expected</i> (list of str)</dt> +<dd> +list of expected codes +</dd> +<dt><i>repeat</i> (bool)</dt> +<dd> +flag indicating to report each occurrence of a code +</dd> +<dt><i>args</i> (dict)</dt> +<dd> +dictionary of arguments for the various checks +</dd> +</dl> +<a NAME="CodeStyleTopicChecker._ignoreCode" ID="CodeStyleTopicChecker._ignoreCode"></a> +<h4>CodeStyleTopicChecker._ignoreCode</h4> +<b>_ignoreCode</b>(<i>code</i>) +<p> + Protected method to check if the message code should be ignored. +</p> + +<dl> + +<dt><i>code</i> (str)</dt> +<dd> +message code to check for +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating to ignore the given code +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<a NAME="CodeStyleTopicChecker._initializeCheckers" ID="CodeStyleTopicChecker._initializeCheckers"></a> +<h4>CodeStyleTopicChecker._initializeCheckers</h4> +<b>_initializeCheckers</b>(<i>checkersWithCodes</i>) +<p> + Protected method to determine the list of check methods to be run. +</p> +<p> + This list is determined considering the list if selected and ignored issue + codes. +</p> + +<dl> + +<dt><i>checkersWithCodes</i> (TYPE)</dt> +<dd> +DESCRIPTION +</dd> +</dl> +<a NAME="CodeStyleTopicChecker.addError" ID="CodeStyleTopicChecker.addError"></a> +<h4>CodeStyleTopicChecker.addError</h4> +<b>addError</b>(<i>lineNumber, offset, msgCode, *args</i>) +<p> + Public method to record an issue. +</p> + +<dl> + +<dt><i>lineNumber</i> (int)</dt> +<dd> +line number of the issue (one based) +</dd> +<dt><i>offset</i> (int)</dt> +<dd> +position within line of the issue +</dd> +<dt><i>msgCode</i> (str)</dt> +<dd> +message code +</dd> +<dt><i>args</i> (list)</dt> +<dd> +arguments for the message +</dd> +</dl> +<a NAME="CodeStyleTopicChecker.addErrorFromNode" ID="CodeStyleTopicChecker.addErrorFromNode"></a> +<h4>CodeStyleTopicChecker.addErrorFromNode</h4> +<b>addErrorFromNode</b>(<i>node, msgCode, *args</i>) +<p> + Public method to record an issue given the faulty ast node. +</p> + +<dl> + +<dt><i>node</i> (ast.AST)</dt> +<dd> +reference to the node containing the issue +</dd> +<dt><i>msgCode</i> (str)</dt> +<dd> +message code +</dd> +<dt><i>args</i> (list)</dt> +<dd> +arguments for the message +</dd> +</dl> +<a NAME="CodeStyleTopicChecker.run" ID="CodeStyleTopicChecker.run"></a> +<h4>CodeStyleTopicChecker.run</h4> +<b>run</b>(<i></i>) +<p> + Public method to execute the relevant checks. +</p> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html>