Sat, 26 Sep 2015 18:55:13 +0200
Some optimizations to the cyclomatic complexity dialog.
--- a/ChangeLog Sat Sep 26 12:26:32 2015 +0200 +++ b/ChangeLog Sat Sep 26 18:55:13 2015 +0200 @@ -1,5 +1,11 @@ ChangeLog --------- +Version 0.4.0: +- added a selection of the minimum rank of items to be shown to the + cyclomatic complexity dialog because the generation of items slows down + considerably when the list growth +- bug fixes + Version 0.3.0: - added support for Python 3.5 - added Russian translations provided by Alexander Barkoff
--- a/PluginMetricsRadon.e4p Sat Sep 26 12:26:32 2015 +0200 +++ b/PluginMetricsRadon.e4p Sat Sep 26 18:55:13 2015 +0200 @@ -197,6 +197,7 @@ <string>_ropeproject</string> <string>.eric6project</string> <string>_eric6project</string> + <string>radon</string> </list> </value> <key>
--- a/PluginMetricsRadon.py Sat Sep 26 12:26:32 2015 +0200 +++ b/PluginMetricsRadon.py Sat Sep 26 18:55:13 2015 +0200 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "0.3.0" +version = "0.4.0" className = "RadonMetricsPlugin" packageName = "RadonMetrics" shortDescription = "Code metrics plugin using radon package"
--- a/RadonMetrics/CyclomaticComplexityDialog.py Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/CyclomaticComplexityDialog.py Sat Sep 26 18:55:13 2015 +0200 @@ -60,6 +60,10 @@ self.resultList.headerItem().setText(self.resultList.columnCount(), "") + self.rankComboBox.addItems(["A", "B", "C", "D", "E", "F"]) + self.rankComboBox.setCurrentText("D") + self.__minimumRank = "D" + self.radonService = radonService self.radonService.complexityDone.connect(self.__processResult) self.radonService.error.connect(self.__processError) @@ -145,10 +149,7 @@ @rtype QTreeWidgetItem """ itm = QTreeWidgetItem( - self.resultList, [self.__project.getRelativePath(filename)]) - itm.setExpanded(True) - itm.setFirstColumnSpanned(True) itm.setData(0, self.FilePathRole, filename) itm.setData(0, self.LineNumberRole, 1) return itm @@ -162,33 +163,32 @@ @param values values to be displayed @type dict """ - itm = QTreeWidgetItem(parentItem, [ - self.__mappedType[values["type"]], - values["fullname"], - "{0:3}".format(values["complexity"]), - values["rank"], - "{0:6}".format(values["lineno"]), - ]) - itm.setTextAlignment(2, Qt.Alignment(Qt.AlignRight)) - itm.setTextAlignment(3, Qt.Alignment(Qt.AlignHCenter)) - itm.setTextAlignment(4, Qt.Alignment(Qt.AlignRight)) - if values["rank"] in self.__rankColors: - itm.setBackground(3, self.__rankColors[values["rank"]]) - if values["type"] in self.__typeColors: - itm.setForeground(0, self.__typeColors[values["type"]]) - itm.setData(0, self.FilePathRole, - parentItem.data(0, self.FilePathRole)) - itm.setData(0, self.LineNumberRole, values["lineno"]) + if values["rank"] >= self.__minimumRank: + itm = QTreeWidgetItem(parentItem, [ + self.__mappedType[values["type"]], + values["fullname"], + "{0:3}".format(values["complexity"]), + values["rank"], + "{0:6}".format(values["lineno"]), + ]) + itm.setTextAlignment(2, Qt.Alignment(Qt.AlignRight)) + itm.setTextAlignment(3, Qt.Alignment(Qt.AlignHCenter)) + itm.setTextAlignment(4, Qt.Alignment(Qt.AlignRight)) + if values["rank"] in self.__rankColors: + itm.setBackground(3, self.__rankColors[values["rank"]]) + if values["type"] in self.__typeColors: + itm.setForeground(0, self.__typeColors[values["type"]]) + itm.setData(0, self.FilePathRole, + parentItem.data(0, self.FilePathRole)) + itm.setData(0, self.LineNumberRole, values["lineno"]) if "methods" in values: - itm.setExpanded(True) for method in values["methods"]: - self.__createResultItem(itm, method) + self.__createResultItem(parentItem, method) if "closures" in values and values["closures"]: - itm.setExpanded(True) for closure in values["closures"]: - self.__createResultItem(itm, closure) + self.__createResultItem(parentItem, closure) def __createErrorItem(self, filename, message): """ @@ -236,13 +236,15 @@ self.__data = {"ExcludeFiles": ""} self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) - def start(self, fn): + def start(self, fn, minRank="D"): """ Public slot to start the cyclomatic complexity determination. @param fn file or list of files or directory to show the cyclomatic complexity for @type str or list of str + @param minRank minimum rank of entries to be shown + @type str (one character out of A - F) """ self.__errorItem = None self.resultList.clear() @@ -283,6 +285,8 @@ self.__ccSum = 0 self.__ccCount = 0 + self.__minimumRank = minRank + if len(self.files) > 0: # disable updates of the list for speed self.resultList.setUpdatesEnabled(False) @@ -419,6 +423,9 @@ if not self.__batch and fn != self.filename: return + self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) + QApplication.processEvents() + if "error" in result: self.__createErrorItem(fn, result["error"]) else: @@ -426,6 +433,10 @@ fitm = self.__createFileItem(fn) for resultDict in result["result"]: self.__createResultItem(fitm, resultDict) + if fitm.childCount() > 0: + self.resultList.addTopLevelItem(fitm) + fitm.setExpanded(True) + fitm.setFirstColumnSpanned(True) self.__ccCount += result["count"] self.__ccSum += result["total_cc"] @@ -435,7 +446,6 @@ self.progress += 1 self.checkProgress.setValue(self.progress) - self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) QApplication.processEvents() if not self.__batch: @@ -536,7 +546,7 @@ fileList = \ [f for f in fileList if not fnmatch.fnmatch(f, filter)] - self.start(fileList) + self.start(fileList, minRank=self.rankComboBox.currentText()) def __showContextMenu(self, coord): """
--- a/RadonMetrics/CyclomaticComplexityDialog.ui Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/CyclomaticComplexityDialog.ui Sat Sep 26 18:55:13 2015 +0200 @@ -43,6 +43,20 @@ <number>0</number> </property> <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Minimum Rank:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="rankComboBox"> + <property name="toolTip"> + <string>Select the minimum rank of items to be shown</string> + </property> + </widget> + </item> + <item> <widget class="QLabel" name="label_2"> <property name="text"> <string>Exclude Files:</string> @@ -211,9 +225,9 @@ </customwidgets> <tabstops> <tabstop>startButton</tabstop> + <tabstop>rankComboBox</tabstop> <tabstop>excludeFilesEdit</tabstop> <tabstop>resultList</tabstop> - <tabstop>buttonBox</tabstop> </tabstops> <resources/> <connections/>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html Sat Sep 26 18:55:13 2015 +0200 @@ -313,7 +313,7 @@ </dd> </dl><a NAME="CyclomaticComplexityDialog.start" ID="CyclomaticComplexityDialog.start"></a> <h4>CyclomaticComplexityDialog.start</h4> -<b>start</b>(<i>fn</i>) +<b>start</b>(<i>fn, minRank="D"</i>) <p> Public slot to start the cyclomatic complexity determination. </p><dl> @@ -321,6 +321,9 @@ <dd> file or list of files or directory to show the cyclomatic complexity for +</dd><dt><i>minRank</i> (str (one character out of A - F))</dt> +<dd> +minimum rank of entries to be shown </dd> </dl> <div align="right"><a href="#top">Up</a></div>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.radon.complexity.html Sat Sep 26 12:26:32 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>Plugin_Metrics_Radon.RadonMetrics.radon.complexity</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>Plugin_Metrics_Radon.RadonMetrics.radon.complexity</h1> - -<h3>Global Attributes</h3> -<table> -<tr><td>ALPHA</td></tr><tr><td>LINES</td></tr><tr><td>SCORE</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#Flake8Checker">Flake8Checker</a></td> -<td>Entry point for the Flake8 tool.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#add_closures">add_closures</a></td> -<td>Process a list of blocks by adding all closures as top-level blocks.</td> -</tr><tr> -<td><a href="#average_complexity">average_complexity</a></td> -<td>Compute the average Cyclomatic complexity from the given blocks.</td> -</tr><tr> -<td><a href="#cc_rank">cc_rank</a></td> -<td>Rank the complexity score from A to F, where A stands for the simplest and best score and F the most complex and worst one:</td> -</tr><tr> -<td><a href="#cc_visit">cc_visit</a></td> -<td>Visit the given code with :class:`~radon.visitors.ComplexityVisitor`.</td> -</tr><tr> -<td><a href="#cc_visit_ast">cc_visit_ast</a></td> -<td>Visit the AST node with :class:`~radon.visitors.ComplexityVisitor`.</td> -</tr><tr> -<td><a href="#sorted_results">sorted_results</a></td> -<td>Given a ComplexityVisitor instance, returns a list of sorted blocks with respect to complexity.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="Flake8Checker" ID="Flake8Checker"></a> -<h2>Flake8Checker</h2> -<p> -Entry point for the Flake8 tool. -</p> -<h3>Derived from</h3> -object -<h3>Class Attributes</h3> -<table> -<tr><td>_code</td></tr><tr><td>_error_tmpl</td></tr><tr><td>max_cc</td></tr><tr><td>name</td></tr><tr><td>no_assert</td></tr><tr><td>version</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr> -<td><a href="#Flake8Checker.add_options">add_options</a></td> -<td></td> -</tr><tr> -<td><a href="#Flake8Checker.parse_options">parse_options</a></td> -<td></td> -</tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#Flake8Checker.__init__">Flake8Checker</a></td> -<td>Accept the AST tree and a filename (unused).</td> -</tr><tr> -<td><a href="#Flake8Checker.run">run</a></td> -<td>Run the ComplexityVisitor over the AST tree.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Flake8Checker.add_options" ID="Flake8Checker.add_options"></a> -<h4>Flake8Checker.add_options (class method)</h4> -<b>add_options</b>(<i>parser</i>) -<a NAME="Flake8Checker.parse_options" ID="Flake8Checker.parse_options"></a> -<h4>Flake8Checker.parse_options (class method)</h4> -<b>parse_options</b>(<i>options</i>) -<a NAME="Flake8Checker.__init__" ID="Flake8Checker.__init__"></a> -<h4>Flake8Checker (Constructor)</h4> -<b>Flake8Checker</b>(<i>tree, filename</i>) -<p> -Accept the AST tree and a filename (unused). -</p><a NAME="Flake8Checker.run" ID="Flake8Checker.run"></a> -<h4>Flake8Checker.run</h4> -<b>run</b>(<i></i>) -<p> -Run the ComplexityVisitor over the AST tree. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="add_closures" ID="add_closures"></a> -<h2>add_closures</h2> -<b>add_closures</b>(<i>blocks</i>) -<p> -Process a list of blocks by adding all closures as top-level blocks. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="average_complexity" ID="average_complexity"></a> -<h2>average_complexity</h2> -<b>average_complexity</b>(<i>blocks</i>) -<p> -Compute the average Cyclomatic complexity from the given blocks. - Blocks must be either :class:`~radon.visitors.Function` or - :class:`~radon.visitors.Class`. If the block list is empty, then 0 is - returned. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="cc_rank" ID="cc_rank"></a> -<h2>cc_rank</h2> -<b>cc_rank</b>(<i>cc</i>) -<p> -Rank the complexity score from A to F, where A stands for the simplest - and best score and F the most complex and worst one: -</p><p> - ============= ===================================================== - 1 - 5 A (low risk - simple block) - 6 - 10 B (low risk - well structured and stable block) - 11 - 20 C (moderate risk - slightly complex block) - 21 - 30 D (more than moderate risk - more complex block) - 31 - 40 E (high risk - complex block, alarming) - 41+ F (very high risk - error-prone, unstable block) - ============= ===================================================== -</p><p> - Here *block* is used in place of function, method or class. -</p><p> - The formula used to convert the score into an index is the following: -</p><p> - .. math:: -</p><p> - \text{rank} = \left \lceil \dfrac{\text{score}}{10} \right \rceil - - H(5 - \text{score}) -</p><p> - where ``H(s)`` stands for the Heaviside Step Function. - The rank is then associated to a letter (0 = A, 5 = F). -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="cc_visit" ID="cc_visit"></a> -<h2>cc_visit</h2> -<b>cc_visit</b>(<i>code, **kwargs</i>) -<p> -Visit the given code with :class:`~radon.visitors.ComplexityVisitor`. - All the keyword arguments are directly passed to the visitor. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="cc_visit_ast" ID="cc_visit_ast"></a> -<h2>cc_visit_ast</h2> -<b>cc_visit_ast</b>(<i>ast_node, **kwargs</i>) -<p> -Visit the AST node with :class:`~radon.visitors.ComplexityVisitor`. All - the keyword arguments are directly passed to the visitor. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="sorted_results" ID="sorted_results"></a> -<h2>sorted_results</h2> -<b>sorted_results</b>(<i>blocks, order=SCORE</i>) -<p> -Given a ComplexityVisitor instance, returns a list of sorted blocks - with respect to complexity. A block is a either - :class:`~radon.visitors.Function` object or a - :class:`~radon.visitors.Class` object. - The blocks are sorted in descending order from the block with the highest - complexity. -</p><p> - The optional `order` parameter indicates how to sort the blocks. It can be: -</p><p> - * `LINES`: sort by line numbering; - * `ALPHA`: sort by name (from A to Z); - * `SCORE`: sorty by score (descending). -</p><p> - Default is `SCORE`. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.radon.metrics.html Sat Sep 26 12:26:32 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>Plugin_Metrics_Radon.RadonMetrics.radon.metrics</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>Plugin_Metrics_Radon.RadonMetrics.radon.metrics</h1> - -<h3>Global Attributes</h3> -<table> -<tr><td>Halstead</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#h_visit">h_visit</a></td> -<td>Compile the code into an AST tree and then pass it to :func:`~radon.metrics.h_visit_ast`.</td> -</tr><tr> -<td><a href="#h_visit_ast">h_visit_ast</a></td> -<td>Visit the AST node using the :class:`~radon.visitors.HalsteadVisitor` visitor.</td> -</tr><tr> -<td><a href="#mi_compute">mi_compute</a></td> -<td>Compute the Maintainability Index (MI) given the Halstead Volume, the Cyclomatic Complexity, the SLOC number and the number of comment lines.</td> -</tr><tr> -<td><a href="#mi_parameters">mi_parameters</a></td> -<td>Given a source code snippet, compute the necessary parameters to compute the Maintainability Index metric.</td> -</tr><tr> -<td><a href="#mi_rank">mi_rank</a></td> -<td>Rank the score with a letter:</td> -</tr><tr> -<td><a href="#mi_visit">mi_visit</a></td> -<td>Visit the code and compute the Maintainability Index (MI) from it.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="h_visit" ID="h_visit"></a> -<h2>h_visit</h2> -<b>h_visit</b>(<i>code</i>) -<p> -Compile the code into an AST tree and then pass it to - :func:`~radon.metrics.h_visit_ast`. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="h_visit_ast" ID="h_visit_ast"></a> -<h2>h_visit_ast</h2> -<b>h_visit_ast</b>(<i>ast_node</i>) -<p> -Visit the AST node using the :class:`~radon.visitors.HalsteadVisitor` - visitor. A namedtuple with the following fields is returned: -</p><p> - * h1: the number of distinct operators - * h2: the number of distinct operands - * N1: the total number of operators - * N2: the total number of operands - * h: the vocabulary, i.e. h1 + h2 - * N: the length, i.e. N1 + N2 - * calculated_length: h1 * log2(h1) + h2 * log2(h2) - * volume: V = N * log2(h) - * difficulty: D = h1 / 2 * N2 / h2 - * effort: E = D * V - * time: T = E / 18 seconds - * bugs: B = V / 3000 - an estimate of the errors in the implementation -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="mi_compute" ID="mi_compute"></a> -<h2>mi_compute</h2> -<b>mi_compute</b>(<i>halstead_volume, complexity, sloc, comments</i>) -<p> -Compute the Maintainability Index (MI) given the Halstead Volume, the - Cyclomatic Complexity, the SLOC number and the number of comment lines. - Usually it is not used directly but instead :func:`~radon.metrics.mi_visit` - is preferred. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="mi_parameters" ID="mi_parameters"></a> -<h2>mi_parameters</h2> -<b>mi_parameters</b>(<i>code, count_multi=True</i>) -<p> -Given a source code snippet, compute the necessary parameters to - compute the Maintainability Index metric. These include: -</p><p> - * the Halstead Volume - * the Cyclomatic Complexity - * the number of LLOC (Logical Lines of Code) - * the percent of lines of comment -</p><p> - :param multi: If True, then count multiline strings as comment lines as - well. This is not always safe because Python multiline strings are not - always docstrings. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="mi_rank" ID="mi_rank"></a> -<h2>mi_rank</h2> -<b>mi_rank</b>(<i>score</i>) -<p> -Rank the score with a letter: -</p><p> - * A if :math:`\text{score} > 19`; - * B if :math:`9 < \text{score} \le 19`; - * C if :math:`\text{score} \le 9`. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="mi_visit" ID="mi_visit"></a> -<h2>mi_visit</h2> -<b>mi_visit</b>(<i>code, multi</i>) -<p> -Visit the code and compute the Maintainability Index (MI) from it. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.radon.raw.html Sat Sep 26 12:26:32 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>Plugin_Metrics_Radon.RadonMetrics.radon.raw</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>Plugin_Metrics_Radon.RadonMetrics.radon.raw</h1> - -<h3>Global Attributes</h3> -<table> -<tr><td>COMMENT</td></tr><tr><td>EM</td></tr><tr><td>Module</td></tr><tr><td>NL</td></tr><tr><td>OP</td></tr><tr><td>TOKEN_NUMBER</td></tr><tr><td>__all__</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#_find">_find</a></td> -<td>Return the position of the last token with the same (token, value) pair supplied.</td> -</tr><tr> -<td><a href="#_generate">_generate</a></td> -<td>Pass the code into `tokenize.generate_tokens` and convert the result into a list.</td> -</tr><tr> -<td><a href="#_get_all_tokens">_get_all_tokens</a></td> -<td>Starting from *line*, generate the necessary tokens which represent the shortest tokenization possible.</td> -</tr><tr> -<td><a href="#_less_tokens">_less_tokens</a></td> -<td>Process the output of `tokenize.generate_tokens` removing the tokens specified in `remove`.</td> -</tr><tr> -<td><a href="#_logical">_logical</a></td> -<td>Find how many logical lines are there in the current line.</td> -</tr><tr> -<td><a href="#_split_tokens">_split_tokens</a></td> -<td>Split a list of tokens on the specified token pair (token, value), where *token* is the token type (i.e.</td> -</tr><tr> -<td><a href="#analyze">analyze</a></td> -<td>Analyze the source code and return a namedtuple with the following fields:</td> -</tr><tr> -<td><a href="#aux">aux</a></td> -<td>The actual function which does the job.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="_find" ID="_find"></a> -<h2>_find</h2> -<b>_find</b>(<i>tokens, token, value</i>) -<p> -Return the position of the last token with the same (token, value) - pair supplied. The position is the one of the rightmost term. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="_generate" ID="_generate"></a> -<h2>_generate</h2> -<b>_generate</b>(<i>code</i>) -<p> -Pass the code into `tokenize.generate_tokens` and convert the result - into a list. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="_get_all_tokens" ID="_get_all_tokens"></a> -<h2>_get_all_tokens</h2> -<b>_get_all_tokens</b>(<i>line, lines</i>) -<p> -Starting from *line*, generate the necessary tokens which represent the - shortest tokenization possible. This is done by catching - :exc:`tokenize.TokenError` when a multi-line string or statement is - encountered. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="_less_tokens" ID="_less_tokens"></a> -<h2>_less_tokens</h2> -<b>_less_tokens</b>(<i>tokens, remove</i>) -<p> -Process the output of `tokenize.generate_tokens` removing - the tokens specified in `remove`. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="_logical" ID="_logical"></a> -<h2>_logical</h2> -<b>_logical</b>(<i>tokens</i>) -<p> -Find how many logical lines are there in the current line. -</p><p> - Normally 1 line of code is equivalent to 1 logical line of code, - but there are cases when this is not true. For example:: -</p><p> - if cond: return 0 -</p><p> - this line actually corresponds to 2 logical lines, since it can be - translated into:: -</p><p> - if cond: - return 0 -</p><p> - Examples:: -</p><p> - if cond: -> 1 -</p><p> - if cond: return 0 -> 2 -</p><p> - try: 1/0 -> 2 -</p><p> - try: -> 1 -</p><p> - if cond: # Only a comment -> 1 -</p><p> - if cond: return 0 # Only a comment -> 2 -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="_split_tokens" ID="_split_tokens"></a> -<h2>_split_tokens</h2> -<b>_split_tokens</b>(<i>tokens, token, value</i>) -<p> -Split a list of tokens on the specified token pair (token, value), - where *token* is the token type (i.e. its code) and *value* its actual - value in the code. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="analyze" ID="analyze"></a> -<h2>analyze</h2> -<b>analyze</b>(<i>source</i>) -<p> -Analyze the source code and return a namedtuple with the following - fields: -</p><p> - * **loc**: The number of lines of code (total) - * **lloc**: The number of logical lines of code - * **sloc**: The number of source lines of code (not necessarily - corresponding to the LLOC) - * **comments**: The number of Python comment lines - * **multi**: The number of lines which represent multi-line strings - * **blank**: The number of blank lines (or whitespace-only ones) -</p><p> - The equation :math:`sloc + blanks = loc` should always hold. - Multiline strings are not counted as comments, since, to the Python - interpreter, they are not comments but strings. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="aux" ID="aux"></a> -<h2>aux</h2> -<b>aux</b>(<i>sub_tokens</i>) -<p> -The actual function which does the job. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.radon.visitors.html Sat Sep 26 12:26:32 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,467 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>Plugin_Metrics_Radon.RadonMetrics.radon.visitors</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>Plugin_Metrics_Radon.RadonMetrics.radon.visitors</h1> - -<h3>Global Attributes</h3> -<table> -<tr><td>BaseClass</td></tr><tr><td>BaseFunc</td></tr><tr><td>GET_COMPLEXITY</td></tr><tr><td>GET_ENDLINE</td></tr><tr><td>GET_REAL_COMPLEXITY</td></tr><tr><td>NAMES_GETTER</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#Class">Class</a></td> -<td>Object representing a class block.</td> -</tr><tr> -<td><a href="#CodeVisitor">CodeVisitor</a></td> -<td>Base class for every NodeVisitors in `radon.visitors`.</td> -</tr><tr> -<td><a href="#ComplexityVisitor">ComplexityVisitor</a></td> -<td>A visitor that keeps track of the cyclomatic complexity of the elements.</td> -</tr><tr> -<td><a href="#Function">Function</a></td> -<td>Object represeting a function block.</td> -</tr><tr> -<td><a href="#HalsteadVisitor">HalsteadVisitor</a></td> -<td>Visitor that keeps track of operators and operands, in order to compute Halstead metrics (see :func:`radon.metrics.h_visit`).</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#code2ast">code2ast</a></td> -<td>Convert a string object into an AST object.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="Class" ID="Class"></a> -<h2>Class</h2> -<p> -Object representing a class block. -</p> -<h3>Derived from</h3> -BaseClass -<h3>Class Attributes</h3> -<table> -<tr><td>letter</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#Class.__str__">__str__</a></td> -<td>String representation of a class block.</td> -</tr><tr> -<td><a href="#Class.complexity">complexity</a></td> -<td>The average complexity of the class.</td> -</tr><tr> -<td><a href="#Class.fullname">fullname</a></td> -<td>The full name of the class.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Class.__str__" ID="Class.__str__"></a> -<h4>Class.__str__</h4> -<b>__str__</b>(<i></i>) -<p> -String representation of a class block. -</p><a NAME="Class.complexity" ID="Class.complexity"></a> -<h4>Class.complexity</h4> -<b>complexity</b>(<i></i>) -<p> -The average complexity of the class. It corresponds to the average - complexity of its methods plus one. -</p><a NAME="Class.fullname" ID="Class.fullname"></a> -<h4>Class.fullname</h4> -<b>fullname</b>(<i></i>) -<p> -The full name of the class. It is just its name. This attribute - exists for consistency (see :data:`Function.fullname`). -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="CodeVisitor" ID="CodeVisitor"></a> -<h2>CodeVisitor</h2> -<p> -Base class for every NodeVisitors in `radon.visitors`. It implements a - couple utility class methods and a static method. -</p> -<h3>Derived from</h3> -ast.NodeVisitor -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr> -<td><a href="#CodeVisitor.from_ast">from_ast</a></td> -<td>Instantiate the class from an AST node.</td> -</tr><tr> -<td><a href="#CodeVisitor.from_code">from_code</a></td> -<td>Instanciate the class from source code (string object).</td> -</tr> -</table> -<h3>Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr> -<td><a href="#CodeVisitor.get_name">get_name</a></td> -<td>Shorthand for ``obj.__class__.__name__``.</td> -</tr> -</table> -<a NAME="CodeVisitor.from_ast" ID="CodeVisitor.from_ast"></a> -<h4>CodeVisitor.from_ast (class method)</h4> -<b>from_ast</b>(<i>ast_node, **kwargs</i>) -<p> -Instantiate the class from an AST node. The `**kwargs` are - directly passed to the `ast.NodeVisitor` constructor. -</p><a NAME="CodeVisitor.from_code" ID="CodeVisitor.from_code"></a> -<h4>CodeVisitor.from_code (class method)</h4> -<b>from_code</b>(<i>code, **kwargs</i>) -<p> -Instanciate the class from source code (string object). The - `**kwargs` are directly passed to the `ast.NodeVisitor` constructor. -</p><a NAME="CodeVisitor.get_name" ID="CodeVisitor.get_name"></a> -<h4>CodeVisitor.get_name (static)</h4> -<b>get_name</b>(<i></i>) -<p> -Shorthand for ``obj.__class__.__name__``. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ComplexityVisitor" ID="ComplexityVisitor"></a> -<h2>ComplexityVisitor</h2> -<p> -A visitor that keeps track of the cyclomatic complexity of - the elements. -</p><p> - :param to_method: If True, every function is treated as a method. In this - case the *classname* parameter is used as class name. - :param classname: Name of parent class. - :param off: If True, the starting value for the complexity is set to 1, - otherwise to 0. -</p> -<h3>Derived from</h3> -CodeVisitor -<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="#ComplexityVisitor.__init__">ComplexityVisitor</a></td> -<td></td> -</tr><tr> -<td><a href="#ComplexityVisitor.blocks">blocks</a></td> -<td>All the blocks visited.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.classes_complexity">classes_complexity</a></td> -<td>The total complexity from all classes (i.e.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.functions_complexity">functions_complexity</a></td> -<td>The total complexity from all functions (i.e.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.generic_visit">generic_visit</a></td> -<td>Main entry point for the visitor.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.max_line">max_line</a></td> -<td>The maximum line number among the analyzed lines.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.total_complexity">total_complexity</a></td> -<td>The total complexity.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.visit_Assert">visit_Assert</a></td> -<td>When visiting `assert` statements, the complexity is increased only if the `no_assert` attribute is `False`.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.visit_ClassDef">visit_ClassDef</a></td> -<td>When visiting classes a new visitor is created to recursively analyze the class' body and methods.</td> -</tr><tr> -<td><a href="#ComplexityVisitor.visit_FunctionDef">visit_FunctionDef</a></td> -<td>When visiting functions a new visitor is created to recursively analyze the function's body.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="ComplexityVisitor.__init__" ID="ComplexityVisitor.__init__"></a> -<h4>ComplexityVisitor (Constructor)</h4> -<b>ComplexityVisitor</b>(<i>to_method=False, classname=None, off=True, no_assert=False</i>) -<a NAME="ComplexityVisitor.blocks" ID="ComplexityVisitor.blocks"></a> -<h4>ComplexityVisitor.blocks</h4> -<b>blocks</b>(<i></i>) -<p> -All the blocks visited. These include: all the functions, the - classes and their methods. The returned list is not sorted. -</p><a NAME="ComplexityVisitor.classes_complexity" ID="ComplexityVisitor.classes_complexity"></a> -<h4>ComplexityVisitor.classes_complexity</h4> -<b>classes_complexity</b>(<i></i>) -<p> -The total complexity from all classes (i.e. the total number of - decision points + 1). -</p><a NAME="ComplexityVisitor.functions_complexity" ID="ComplexityVisitor.functions_complexity"></a> -<h4>ComplexityVisitor.functions_complexity</h4> -<b>functions_complexity</b>(<i></i>) -<p> -The total complexity from all functions (i.e. the total number of - decision points + 1). -</p><p> - This is *not* the sum of all the complexity from the functions. Rather, - it's the complexity of the code *inside* all the functions. -</p><a NAME="ComplexityVisitor.generic_visit" ID="ComplexityVisitor.generic_visit"></a> -<h4>ComplexityVisitor.generic_visit</h4> -<b>generic_visit</b>(<i>node</i>) -<p> -Main entry point for the visitor. -</p><a NAME="ComplexityVisitor.max_line" ID="ComplexityVisitor.max_line"></a> -<h4>ComplexityVisitor.max_line</h4> -<b>max_line</b>(<i>value</i>) -<p> -The maximum line number among the analyzed lines. -</p><a NAME="ComplexityVisitor.total_complexity" ID="ComplexityVisitor.total_complexity"></a> -<h4>ComplexityVisitor.total_complexity</h4> -<b>total_complexity</b>(<i></i>) -<p> -The total complexity. Computed adding up the visitor complexity, the - functions complexity, and the classes complexity. -</p><a NAME="ComplexityVisitor.visit_Assert" ID="ComplexityVisitor.visit_Assert"></a> -<h4>ComplexityVisitor.visit_Assert</h4> -<b>visit_Assert</b>(<i>node</i>) -<p> -When visiting `assert` statements, the complexity is increased only - if the `no_assert` attribute is `False`. -</p><a NAME="ComplexityVisitor.visit_ClassDef" ID="ComplexityVisitor.visit_ClassDef"></a> -<h4>ComplexityVisitor.visit_ClassDef</h4> -<b>visit_ClassDef</b>(<i>node</i>) -<p> -When visiting classes a new visitor is created to recursively - analyze the class' body and methods. -</p><a NAME="ComplexityVisitor.visit_FunctionDef" ID="ComplexityVisitor.visit_FunctionDef"></a> -<h4>ComplexityVisitor.visit_FunctionDef</h4> -<b>visit_FunctionDef</b>(<i>node</i>) -<p> -When visiting functions a new visitor is created to recursively - analyze the function's body. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Function" ID="Function"></a> -<h2>Function</h2> -<p> -Object represeting a function block. -</p> -<h3>Derived from</h3> -BaseFunc -<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="#Function.__str__">__str__</a></td> -<td>String representation of a function block.</td> -</tr><tr> -<td><a href="#Function.fullname">fullname</a></td> -<td>The full name of the function.</td> -</tr><tr> -<td><a href="#Function.letter">letter</a></td> -<td>The letter representing the function.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Function.__str__" ID="Function.__str__"></a> -<h4>Function.__str__</h4> -<b>__str__</b>(<i></i>) -<p> -String representation of a function block. -</p><a NAME="Function.fullname" ID="Function.fullname"></a> -<h4>Function.fullname</h4> -<b>fullname</b>(<i></i>) -<p> -The full name of the function. If it is a method, then the full name - is: - {class name}.{method name} - Otherwise it is just the function name. -</p><a NAME="Function.letter" ID="Function.letter"></a> -<h4>Function.letter</h4> -<b>letter</b>(<i></i>) -<p> -The letter representing the function. It is `M` if the function is - actually a method, `F` otherwise. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="HalsteadVisitor" ID="HalsteadVisitor"></a> -<h2>HalsteadVisitor</h2> -<p> -Visitor that keeps track of operators and operands, in order to compute - Halstead metrics (see :func:`radon.metrics.h_visit`). -</p> -<h3>Derived from</h3> -CodeVisitor -<h3>Class Attributes</h3> -<table> -<tr><td>types</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#HalsteadVisitor.__init__">HalsteadVisitor</a></td> -<td>*context* is a string used to keep track the analysis' context.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.aux">aux</a></td> -<td>Actual function that updates the stats.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.dispatch">dispatch</a></td> -<td>This decorator does all the hard work needed for every node.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.distinct_operands">distinct_operands</a></td> -<td>The number of distinct operands.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.distinct_operators">distinct_operators</a></td> -<td>The number of distinct operators.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_AugAssign">visit_AugAssign</a></td> -<td>An augmented assign (contains an operator).</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_BinOp">visit_BinOp</a></td> -<td>A binary operator.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_BoolOp">visit_BoolOp</a></td> -<td>A boolean operator.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_Compare">visit_Compare</a></td> -<td>A comparison.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_FunctionDef">visit_FunctionDef</a></td> -<td>When visiting functions, another visitor is created to recursively analyze the function's body.</td> -</tr><tr> -<td><a href="#HalsteadVisitor.visit_UnaryOp">visit_UnaryOp</a></td> -<td>A unary operator.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="HalsteadVisitor.__init__" ID="HalsteadVisitor.__init__"></a> -<h4>HalsteadVisitor (Constructor)</h4> -<b>HalsteadVisitor</b>(<i>context=None</i>) -<p> -*context* is a string used to keep track the analysis' context. -</p><a NAME="HalsteadVisitor.aux" ID="HalsteadVisitor.aux"></a> -<h4>HalsteadVisitor.aux</h4> -<b>aux</b>(<i>node</i>) -<p> -Actual function that updates the stats. -</p><a NAME="HalsteadVisitor.dispatch" ID="HalsteadVisitor.dispatch"></a> -<h4>HalsteadVisitor.dispatch</h4> -<b>dispatch</b>(<i></i>) -<p> -This decorator does all the hard work needed for every node. -</p><p> - The decorated method must return a tuple of 4 elements: -</p><p> - * the number of operators - * the number of operands - * the operators seen (a sequence) - * the operands seen (a sequence) -</p><a NAME="HalsteadVisitor.distinct_operands" ID="HalsteadVisitor.distinct_operands"></a> -<h4>HalsteadVisitor.distinct_operands</h4> -<b>distinct_operands</b>(<i></i>) -<p> -The number of distinct operands. -</p><a NAME="HalsteadVisitor.distinct_operators" ID="HalsteadVisitor.distinct_operators"></a> -<h4>HalsteadVisitor.distinct_operators</h4> -<b>distinct_operators</b>(<i></i>) -<p> -The number of distinct operators. -</p><a NAME="HalsteadVisitor.visit_AugAssign" ID="HalsteadVisitor.visit_AugAssign"></a> -<h4>HalsteadVisitor.visit_AugAssign</h4> -<b>visit_AugAssign</b>(<i>node</i>) -<p> -An augmented assign (contains an operator). -</p><a NAME="HalsteadVisitor.visit_BinOp" ID="HalsteadVisitor.visit_BinOp"></a> -<h4>HalsteadVisitor.visit_BinOp</h4> -<b>visit_BinOp</b>(<i>node</i>) -<p> -A binary operator. -</p><a NAME="HalsteadVisitor.visit_BoolOp" ID="HalsteadVisitor.visit_BoolOp"></a> -<h4>HalsteadVisitor.visit_BoolOp</h4> -<b>visit_BoolOp</b>(<i>node</i>) -<p> -A boolean operator. -</p><a NAME="HalsteadVisitor.visit_Compare" ID="HalsteadVisitor.visit_Compare"></a> -<h4>HalsteadVisitor.visit_Compare</h4> -<b>visit_Compare</b>(<i>node</i>) -<p> -A comparison. -</p><a NAME="HalsteadVisitor.visit_FunctionDef" ID="HalsteadVisitor.visit_FunctionDef"></a> -<h4>HalsteadVisitor.visit_FunctionDef</h4> -<b>visit_FunctionDef</b>(<i>node</i>) -<p> -When visiting functions, another visitor is created to recursively - analyze the function's body. -</p><a NAME="HalsteadVisitor.visit_UnaryOp" ID="HalsteadVisitor.visit_UnaryOp"></a> -<h4>HalsteadVisitor.visit_UnaryOp</h4> -<b>visit_UnaryOp</b>(<i>node</i>) -<p> -A unary operator. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="code2ast" ID="code2ast"></a> -<h2>code2ast</h2> -<b>code2ast</b>(<i>source</i>) -<p> -Convert a string object into an AST object. This function attempts to - convert the string into bytes. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.RadonMetrics.html Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.RadonMetrics.html Sat Sep 26 18:55:13 2015 +0200 @@ -25,13 +25,6 @@ data. </p> -<h3>Packages</h3> -<table> -<tr> -<td><a href="index-Plugin_Metrics_Radon.RadonMetrics.radon.html">radon</a></td> -<td></td> -</tr> -</table> <h3>Modules</h3> <table>
--- a/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.RadonMetrics.radon.html Sat Sep 26 12:26:32 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>Plugin_Metrics_Radon.RadonMetrics.radon</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body> -<h1>Plugin_Metrics_Radon.RadonMetrics.radon</h1> - - - -<h3>Modules</h3> -<table> -<tr> -<td><a href="Plugin_Metrics_Radon.RadonMetrics.radon.complexity.html">complexity</a></td> -<td></td> -</tr><tr> -<td><a href="Plugin_Metrics_Radon.RadonMetrics.radon.metrics.html">metrics</a></td> -<td></td> -</tr><tr> -<td><a href="Plugin_Metrics_Radon.RadonMetrics.radon.raw.html">raw</a></td> -<td></td> -</tr><tr> -<td><a href="Plugin_Metrics_Radon.RadonMetrics.radon.visitors.html">visitors</a></td> -<td></td> -</tr> -</table> -</body></html> \ No newline at end of file
--- a/RadonMetrics/MaintainabilityIndexDialog.py Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/MaintainabilityIndexDialog.py Sat Sep 26 18:55:13 2015 +0200 @@ -341,6 +341,9 @@ if not self.__batch and fn != self.filename: return + self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) + QApplication.processEvents() + if "error" in result: self.__createErrorItem(fn, result["error"]) else: @@ -349,7 +352,6 @@ self.progress += 1 self.checkProgress.setValue(self.progress) - self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) QApplication.processEvents() if not self.__batch:
--- a/RadonMetrics/RawMetricsDialog.py Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/RawMetricsDialog.py Sat Sep 26 18:55:13 2015 +0200 @@ -349,6 +349,9 @@ if not self.__batch and fn != self.filename: return + self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) + QApplication.processEvents() + if "error" in result: self.__createErrorItem(fn, result["error"]) else: @@ -357,7 +360,6 @@ self.progress += 1 self.checkProgress.setValue(self.progress) - self.checkProgressLabel.setPath(self.__project.getRelativePath(fn)) QApplication.processEvents() if not self.__batch:
--- a/RadonMetrics/i18n/radon_de.ts Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/i18n/radon_de.ts Sat Sep 26 18:55:13 2015 +0200 @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="2.0" language="de_DE" sourcelanguage=""> +<!DOCTYPE TS> +<TS version="2.1" language="de_DE"> <context> <name>CyclomaticComplexityDialog</name> <message> @@ -15,95 +16,105 @@ <p>Dieser Dialog zeigt die zyklomatische Komplexität und eine Bewertung.</p></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <location filename="../CyclomaticComplexityDialog.ui" line="62"/> <source>Exclude Files:</source> <translation>Ignoriere Dateien:</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <location filename="../CyclomaticComplexityDialog.ui" line="69"/> <source>Enter filename patterns of files to be excluded separated by a comma</source> <translation>Gib Dateimuster getrennt durch Komma von Dateien ein, die ignoriert werden sollen</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="75"/> + <location filename="../CyclomaticComplexityDialog.ui" line="89"/> <source>Start</source> <translation>Starten</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="89"/> + <location filename="../CyclomaticComplexityDialog.ui" line="106"/> <source>Type</source> <translation>Typ</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="94"/> + <location filename="../CyclomaticComplexityDialog.ui" line="111"/> <source>Name</source> <translation>Name</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="99"/> + <location filename="../CyclomaticComplexityDialog.ui" line="116"/> <source>Complexity</source> <translation>Komplexität</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="104"/> + <location filename="../CyclomaticComplexityDialog.ui" line="121"/> <source>Rank</source> <translation>Bewertung</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="179"/> + <location filename="../CyclomaticComplexityDialog.ui" line="196"/> <source>%v/%m Files</source> <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="75"/> + <location filename="../CyclomaticComplexityDialog.py" line="82"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation><table><tr><td colspan=3><b>Bewertung:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(geringes Risiko - einfacher Block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(geringes Risika - gut strukturierter und stabiler Block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderates Risiko - etwas komplexerer Block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(mehr als moderates Risiko - komplexerer Block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(hohes Risiko - komplexer Block, alarmierend)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(sehr hohes Risiko - fehleranfälliger, instabiler Block)</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="92"/> + <location filename="../CyclomaticComplexityDialog.py" line="99"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation><table><tr><td colspan=2><b>Typ:</b></td></tr><tr><td><b>C</b></td><td>Klasse</td></tr><tr><td><b>F</b></td><td>Funktion</td></tr><tr><td><b>M</b></td><td>Methode</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="195"/> + <location filename="../CyclomaticComplexityDialog.py" line="203"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="341"/> + <location filename="../CyclomaticComplexityDialog.py" line="356"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="464"/> + <location filename="../CyclomaticComplexityDialog.py" line="485"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td>{6} blocks</td></tr></table></source> <translation><b>Zusammenfassung:</b><br/>{0} Blöcke (Klassen, Funktionen, Methoden) analysiert.<br/>Mittlere Komplexität: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} Blöcke</td></tr><tr><td width=30><b>B</b></td><td>{2} Blöcke</td></tr><tr><td width=30><b>C</b></td><td>{3} Blöcke</td></tr><tr><td width=30><b>D</b></td><td>{4} Blöcke</td></tr><tr><td width=30><b>E</b></td><td>{5} Blöcke</td></tr><tr><td width=30><b>F</b></td><td>{6} Blöcke</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="72"/> + <location filename="../CyclomaticComplexityDialog.ui" line="86"/> <source>Press to start the calculation</source> <translation>Drücken, um die Berechnung zu starten</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="170"/> + <location filename="../CyclomaticComplexityDialog.ui" line="187"/> <source>Shows the progress of the calculation</source> <translation>Zeigt den Fortschritt der Berechnung</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="109"/> + <location filename="../CyclomaticComplexityDialog.ui" line="126"/> <source>Begin</source> <translation>Anfang</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="121"/> + <location filename="../CyclomaticComplexityDialog.py" line="128"/> <source>Collapse all</source> <translation>Alle Zuklappen</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="123"/> + <location filename="../CyclomaticComplexityDialog.py" line="130"/> <source>Expand all</source> <translation>Alle Aufklappen</translation> </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <source>Minimum Rank:</source> + <translation>Mindestbewertung:</translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <source>Select the minimum rank of items to be shown</source> + <translation>Wähle die Mindestbewertung anzuzeigender Einträge</translation> + </message> </context> <context> <name>MaintainabilityIndexDialog</name> @@ -148,22 +159,22 @@ <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="71"/> + <location filename="../MaintainabilityIndexDialog.py" line="73"/> <source><table><tr><td colspan=2><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>score &gt; 19</td></tr><tr><td><b>B</b></td><td>9 &lt; score &le; 19</td></tr><tr><td><b>C</b></td><td>score &le; 9</td></tr></table></source> <translation><table><tr><td colspan=2><b>Bewertung:</b></td></tr><tr><td><b>A</b></td><td>Wert &gt; 19</td></tr><tr><td><b>B</b></td><td>9 &lt; Wert &le; 19</td></tr><tr><td><b>C</b></td><td>Wert &le; 9</td></tr></table></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="127"/> + <location filename="../MaintainabilityIndexDialog.py" line="130"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="268"/> + <location filename="../MaintainabilityIndexDialog.py" line="274"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="377"/> + <location filename="../MaintainabilityIndexDialog.py" line="386"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td>{0} files</td></tr><tr><td><b>B</b></td><td>{1} files</td></tr><tr><td><b>C</b></td><td>{2} files</td></tr></table></source> <translation><table><tr><td colspan=2><b>Zusammenfassung:</b></td></tr><tr><td><b>A</b></td><td>{0} Dateien</td></tr><tr><td><b>B</b></td><td>{1} Dateien</td></tr><tr><td><b>C</b></td><td>{2} Dateien</td></tr></table></translation> </message> @@ -203,72 +214,72 @@ <translation>Unbekannte Metrik empfangen ({0}).</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source>Radon</source> <translation>Radon</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code Metrics</source> <translation>Quelltextmetriken</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code &Metrics...</source> <translation>Quelltext&metriken...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="745"/> <source>Show raw code metrics.</source> <translation>Zeige einige Quelltextmetriken an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="743"/> + <location filename="../../PluginMetricsRadon.py" line="747"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation><b>Quelltextmetriken...</b><p>Dies ermittelt einige Quelltextmetriken für Python Dateien und zeigt die Anzahl der Textzeilen, logischen Quelltextzeilen, Quelltextzeilen, Kommentarzeilen, mehrzeiligen Zeichenketten und Lerrzeilen.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability Index</source> <translation>Wartbarkeitsindex</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability &Index...</source> <translation>Wartbarkeits&index...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="762"/> <source>Show the maintainability index for Python files.</source> <translation>Zeigt den Wartbarkeitsindex für Python Dateien an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="760"/> + <location filename="../../PluginMetricsRadon.py" line="764"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation><b>Wartbarkeitsindex...</b><p>Dies ermittelt den Wartbarkeitsindex für Python Dateien und zeigt ihn zusammen mit einer Bewertung an.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> + <location filename="../../PluginMetricsRadon.py" line="775"/> <source>Cyclomatic Complexity</source> <translation>Zyklomatische Komplexität</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> + <location filename="../../PluginMetricsRadon.py" line="775"/> <source>Cyclomatic &Complexity...</source> <translation>Zyklomatische &Komplexität...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="779"/> <source>Show the cyclomatic complexity for Python files.</source> <translation>Zeigt die zyklomatische Komplexität für Python Dateien an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="777"/> + <location filename="../../PluginMetricsRadon.py" line="781"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation><b>Zyklomatische Komplexität...</b><p>Dies ermittelt die zyklomatische Komplexität von Python Dateien und zeigt sie zusammen mit einer Bewertung an.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation><p><b>Radon Version {0}</b><p>Radon ist ein Werkzeug, das verschiedene Metriken für Python Quelltexte ermittelt. Radon kann die folgenden Metriken ermitteln:<ul><li><b>Quelltext</b>metrik (dies beinhaltet Quelltextzeilen, Kommentarzeilen, Leerzeilen, mehrzeilige Zeichenketten, ...)</li><li><b>Wartbarkeitsindex</b> (wie von Visual Studio)</li><li><b>McCabe Komplexität</b>, d.h. zyklomatische Komplexität</li></ul></p></translation> </message> @@ -308,17 +319,17 @@ <translation>Name</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="416"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation>LOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="418"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation>SLOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="420"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation>LLOC</translation> </message> @@ -368,22 +379,22 @@ <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="76"/> + <location filename="../RawMetricsDialog.py" line="78"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code (LOC = SLOC + Empty)</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation><table><tr><td><b>LOC</b></td><td>Textzeilen (LOC = SLOC + Leerzeilen)</td></tr><tr><td><b>SLOC</b></td><td>Quelltextzeilen</td></tr><tr><td><b>LLOC</b></td><td>Logische Quelltextzeilen</td></tr><tr><td><b>Kommentare</b></td><td>Kommentarzeilen</td></tr><tr><td><b>Mehrfach</b></td><td>Zeilen in mehrzeiligen Zeichenketten</td></tr><tr><td><b>Leer</b></td><td>Leerzeilen</td></tr><tr><td colspan=2><b>Kommentarstatistiken:</b></td</tr><tr><td><b>K % L</b></td><td>Verhältnis Kommentare zu Textzeilen</td></tr><tr><td><b>K % S</b></td><td>Verhältnis Kommentare zu Quelltextzeilen</td></tr><tr><td><b>K + M % L</b></td><td>Verhältnis der Summe aus Kommentaren und mehrzeiliger Zeichenketten zu Textzeilen</td></tr></table></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="138"/> + <location filename="../RawMetricsDialog.py" line="141"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="276"/> + <location filename="../RawMetricsDialog.py" line="282"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="414"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation>Dateien</translation> </message> @@ -398,17 +409,17 @@ <translation>Zeigt den Fortschritt der Berechnung</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="422"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation>Kommentarzeilen</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="425"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Multiline Strings</source> <translation>Mehrzeiligen Zeichenketten</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="428"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Empty Lines</source> <translation>Leerzeilen</translation> </message>
--- a/RadonMetrics/i18n/radon_en.ts Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/i18n/radon_en.ts Sat Sep 26 18:55:13 2015 +0200 @@ -14,95 +14,105 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <location filename="../CyclomaticComplexityDialog.ui" line="62"/> <source>Exclude Files:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <location filename="../CyclomaticComplexityDialog.ui" line="69"/> <source>Enter filename patterns of files to be excluded separated by a comma</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="75"/> - <source>Start</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../CyclomaticComplexityDialog.ui" line="89"/> + <source>Start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="106"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="94"/> + <location filename="../CyclomaticComplexityDialog.ui" line="111"/> <source>Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="99"/> + <location filename="../CyclomaticComplexityDialog.ui" line="116"/> <source>Complexity</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="104"/> + <location filename="../CyclomaticComplexityDialog.ui" line="121"/> <source>Rank</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="179"/> + <location filename="../CyclomaticComplexityDialog.ui" line="196"/> <source>%v/%m Files</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="75"/> + <location filename="../CyclomaticComplexityDialog.py" line="82"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="92"/> + <location filename="../CyclomaticComplexityDialog.py" line="99"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="195"/> + <location filename="../CyclomaticComplexityDialog.py" line="203"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="341"/> + <location filename="../CyclomaticComplexityDialog.py" line="356"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="464"/> + <location filename="../CyclomaticComplexityDialog.py" line="485"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td>{6} blocks</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="72"/> + <location filename="../CyclomaticComplexityDialog.ui" line="86"/> <source>Press to start the calculation</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="109"/> + <location filename="../CyclomaticComplexityDialog.ui" line="126"/> <source>Begin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="170"/> + <location filename="../CyclomaticComplexityDialog.ui" line="187"/> <source>Shows the progress of the calculation</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="121"/> + <location filename="../CyclomaticComplexityDialog.py" line="128"/> <source>Collapse all</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="123"/> + <location filename="../CyclomaticComplexityDialog.py" line="130"/> <source>Expand all</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <source>Minimum Rank:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <source>Select the minimum rank of items to be shown</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>MaintainabilityIndexDialog</name> @@ -147,22 +157,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="71"/> + <location filename="../MaintainabilityIndexDialog.py" line="73"/> <source><table><tr><td colspan=2><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>score &gt; 19</td></tr><tr><td><b>B</b></td><td>9 &lt; score &le; 19</td></tr><tr><td><b>C</b></td><td>score &le; 9</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="127"/> + <location filename="../MaintainabilityIndexDialog.py" line="130"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="268"/> + <location filename="../MaintainabilityIndexDialog.py" line="274"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="377"/> + <location filename="../MaintainabilityIndexDialog.py" line="386"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td>{0} files</td></tr><tr><td><b>B</b></td><td>{1} files</td></tr><tr><td><b>C</b></td><td>{2} files</td></tr></table></source> <translation type="unfinished"></translation> </message> @@ -201,72 +211,72 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source>Radon</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code Metrics</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code &Metrics...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="745"/> <source>Show raw code metrics.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="743"/> + <location filename="../../PluginMetricsRadon.py" line="747"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability Index</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability &Index...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="762"/> <source>Show the maintainability index for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="760"/> + <location filename="../../PluginMetricsRadon.py" line="764"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> + <location filename="../../PluginMetricsRadon.py" line="775"/> <source>Cyclomatic Complexity</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> - <source>Cyclomatic &Complexity...</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../PluginMetricsRadon.py" line="775"/> + <source>Cyclomatic &Complexity...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../PluginMetricsRadon.py" line="779"/> <source>Show the cyclomatic complexity for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="777"/> + <location filename="../../PluginMetricsRadon.py" line="781"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation type="unfinished"></translation> </message> @@ -305,17 +315,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="416"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="418"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="420"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation type="unfinished"></translation> </message> @@ -365,22 +375,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="76"/> + <location filename="../RawMetricsDialog.py" line="78"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code (LOC = SLOC + Empty)</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="138"/> + <location filename="../RawMetricsDialog.py" line="141"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="276"/> + <location filename="../RawMetricsDialog.py" line="282"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="414"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation type="unfinished"></translation> </message> @@ -395,17 +405,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="422"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="425"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Multiline Strings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="428"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Empty Lines</source> <translation type="unfinished"></translation> </message>
--- a/RadonMetrics/i18n/radon_es.ts Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/i18n/radon_es.ts Sat Sep 26 18:55:13 2015 +0200 @@ -14,95 +14,105 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <location filename="../CyclomaticComplexityDialog.ui" line="62"/> <source>Exclude Files:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <location filename="../CyclomaticComplexityDialog.ui" line="69"/> <source>Enter filename patterns of files to be excluded separated by a comma</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="75"/> - <source>Start</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../CyclomaticComplexityDialog.ui" line="89"/> + <source>Start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="106"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="94"/> + <location filename="../CyclomaticComplexityDialog.ui" line="111"/> <source>Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="99"/> + <location filename="../CyclomaticComplexityDialog.ui" line="116"/> <source>Complexity</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="104"/> + <location filename="../CyclomaticComplexityDialog.ui" line="121"/> <source>Rank</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="179"/> + <location filename="../CyclomaticComplexityDialog.ui" line="196"/> <source>%v/%m Files</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="75"/> + <location filename="../CyclomaticComplexityDialog.py" line="82"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="92"/> + <location filename="../CyclomaticComplexityDialog.py" line="99"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="195"/> + <location filename="../CyclomaticComplexityDialog.py" line="203"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="341"/> + <location filename="../CyclomaticComplexityDialog.py" line="356"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="464"/> + <location filename="../CyclomaticComplexityDialog.py" line="485"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td>{6} blocks</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="72"/> + <location filename="../CyclomaticComplexityDialog.ui" line="86"/> <source>Press to start the calculation</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="109"/> + <location filename="../CyclomaticComplexityDialog.ui" line="126"/> <source>Begin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="170"/> + <location filename="../CyclomaticComplexityDialog.ui" line="187"/> <source>Shows the progress of the calculation</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="121"/> + <location filename="../CyclomaticComplexityDialog.py" line="128"/> <source>Collapse all</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="123"/> + <location filename="../CyclomaticComplexityDialog.py" line="130"/> <source>Expand all</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <source>Minimum Rank:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <source>Select the minimum rank of items to be shown</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>MaintainabilityIndexDialog</name> @@ -147,22 +157,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="71"/> + <location filename="../MaintainabilityIndexDialog.py" line="73"/> <source><table><tr><td colspan=2><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>score &gt; 19</td></tr><tr><td><b>B</b></td><td>9 &lt; score &le; 19</td></tr><tr><td><b>C</b></td><td>score &le; 9</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="127"/> + <location filename="../MaintainabilityIndexDialog.py" line="130"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="268"/> + <location filename="../MaintainabilityIndexDialog.py" line="274"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="377"/> + <location filename="../MaintainabilityIndexDialog.py" line="386"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td>{0} files</td></tr><tr><td><b>B</b></td><td>{1} files</td></tr><tr><td><b>C</b></td><td>{2} files</td></tr></table></source> <translation type="unfinished"></translation> </message> @@ -201,72 +211,72 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source>Radon</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code Metrics</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="737"/> + <location filename="../../PluginMetricsRadon.py" line="741"/> <source>Code &Metrics...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="745"/> <source>Show raw code metrics.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="743"/> + <location filename="../../PluginMetricsRadon.py" line="747"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability Index</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="754"/> + <location filename="../../PluginMetricsRadon.py" line="758"/> <source>Maintainability &Index...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="762"/> <source>Show the maintainability index for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="760"/> + <location filename="../../PluginMetricsRadon.py" line="764"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> + <location filename="../../PluginMetricsRadon.py" line="775"/> <source>Cyclomatic Complexity</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="771"/> - <source>Cyclomatic &Complexity...</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../PluginMetricsRadon.py" line="775"/> + <source>Cyclomatic &Complexity...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../PluginMetricsRadon.py" line="779"/> <source>Show the cyclomatic complexity for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="777"/> + <location filename="../../PluginMetricsRadon.py" line="781"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1025"/> + <location filename="../../PluginMetricsRadon.py" line="1035"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation type="unfinished"></translation> </message> @@ -305,17 +315,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="416"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="418"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="420"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation type="unfinished"></translation> </message> @@ -365,22 +375,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="76"/> + <location filename="../RawMetricsDialog.py" line="78"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code (LOC = SLOC + Empty)</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="138"/> + <location filename="../RawMetricsDialog.py" line="141"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="276"/> + <location filename="../RawMetricsDialog.py" line="282"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="414"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation type="unfinished"></translation> </message> @@ -395,17 +405,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="422"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="425"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Multiline Strings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="428"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Empty Lines</source> <translation type="unfinished"></translation> </message>
--- a/RadonMetrics/i18n/radon_ru.ts Sat Sep 26 12:26:32 2015 +0200 +++ b/RadonMetrics/i18n/radon_ru.ts Sat Sep 26 18:55:13 2015 +0200 @@ -15,52 +15,52 @@ <p>Данный диалог отображает цикломатическую сложность и ее уровень.</p></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <location filename="../CyclomaticComplexityDialog.ui" line="62"/> <source>Exclude Files:</source> <translation>Исключить файлы:</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <location filename="../CyclomaticComplexityDialog.ui" line="69"/> <source>Enter filename patterns of files to be excluded separated by a comma</source> <translation>Введите шаблоны имен для исключаемых файлов, разделенные запятыми</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="75"/> + <location filename="../CyclomaticComplexityDialog.ui" line="89"/> <source>Start</source> <translation>Старт</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="92"/> + <location filename="../CyclomaticComplexityDialog.ui" line="106"/> <source>Type</source> <translation>Тип</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="97"/> + <location filename="../CyclomaticComplexityDialog.ui" line="111"/> <source>Name</source> <translation>Имя файла</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="102"/> + <location filename="../CyclomaticComplexityDialog.ui" line="116"/> <source>Complexity</source> <translation>Сложность</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="107"/> + <location filename="../CyclomaticComplexityDialog.ui" line="121"/> <source>Rank</source> <translation>Уровень</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="182"/> + <location filename="../CyclomaticComplexityDialog.ui" line="196"/> <source>%v/%m Files</source> <translation>%v из %m файлов</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="78"/> + <location filename="../CyclomaticComplexityDialog.py" line="82"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation><table><tr><td colspan=3><b>Ранжирование:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(низкий риск - простой блок)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(низкий риск - хорошо структурированный стабильный блок)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(умеренный риск - немного сложный блок)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(более чем умеренный риск - более сложный блок)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(высокий риск - сложный, аварийный блок)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(очень высокий риск - нестабильный блок, подвержен ошибкам)</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="95"/> + <location filename="../CyclomaticComplexityDialog.py" line="99"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation><table><tr><td colspan=2><b>Тип:</b></td></tr><tr><td><b>C</b></td><td>Класс</td></tr><tr><td><b>F</b></td><td>Функция</td></tr><tr><td><b>M</b></td><td>Метод</td></tr></table></translation> </message> @@ -70,40 +70,50 @@ <translation>Ошибки</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="352"/> + <location filename="../CyclomaticComplexityDialog.py" line="356"/> <source>Preparing files...</source> <translation>Подготовка файлов...</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="475"/> + <location filename="../CyclomaticComplexityDialog.py" line="485"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td>{6} blocks</td></tr></table></source> <translation><b>Итого:</b><br/>Выполнен анализ {0} блоков (классы, функции, методы).<br/>Средняя сложность: {7} ({8})<table><tr><td width=30><b>A</b></td><td>{1} блоков</td></tr><tr><td width=30><b>B</b></td><td>{2} блоков</td></tr><tr><td width=30><b>C</b></td><td>{3} блоков</td></tr><tr><td width=30><b>D</b></td><td>{4} блоков</td></tr><tr><td width=30><b>E</b></td><td>{5} блоков</td></tr><tr><td width=30><b>F</b></td><td>{6} блоков</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="72"/> + <location filename="../CyclomaticComplexityDialog.ui" line="86"/> <source>Press to start the calculation</source> <translation>Выполнить оценку кода</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="112"/> + <location filename="../CyclomaticComplexityDialog.ui" line="126"/> <source>Begin</source> <translation>Начало</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.ui" line="173"/> + <location filename="../CyclomaticComplexityDialog.ui" line="187"/> <source>Shows the progress of the calculation</source> <translation>Отображение процесса выполнения оценки</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="124"/> + <location filename="../CyclomaticComplexityDialog.py" line="128"/> <source>Collapse all</source> <translation>Свернуть все</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="126"/> + <location filename="../CyclomaticComplexityDialog.py" line="130"/> <source>Expand all</source> <translation>Развернуть все</translation> </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="48"/> + <source>Minimum Rank:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../CyclomaticComplexityDialog.ui" line="55"/> + <source>Select the minimum rank of items to be shown</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>MaintainabilityIndexDialog</name> @@ -163,7 +173,7 @@ <translation>Подготовка файлов...</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="384"/> + <location filename="../MaintainabilityIndexDialog.py" line="386"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td>{0} files</td></tr><tr><td><b>B</b></td><td>{1} files</td></tr><tr><td><b>C</b></td><td>{2} files</td></tr></table></source> <translation><table><tr><td colspan=2><b>Итого:</b></td></tr><tr><td><b>A</b></td><td>{0} файлов</td></tr><tr><td><b>B</b></td><td>{1} файлов</td></tr><tr><td><b>C</b></td><td>{2} файлов</td></tr></table></translation> </message> @@ -308,17 +318,17 @@ <translation>Имя файла</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="423"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation>LOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="425"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation>SLOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="427"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation>LLOC</translation> </message> @@ -383,7 +393,7 @@ <translation>Подготовка файлов...</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="421"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation>Файлы</translation> </message> @@ -398,17 +408,17 @@ <translation>Отображение процесса выполнения оценки</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="429"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation>Строки комментариев</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="432"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Multiline Strings</source> <translation>Многострочный текст</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="435"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Empty Lines</source> <translation>Пустые строки</translation> </message>