rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Static analysis errors

Open voxik opened this issue 9 years ago • 0 comments

Running recent Coverity on my package in Fedora, I got some error reports about the generated documentation:

Error: NESTING_INDENT_MISMATCH: [#def1]
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:62: parent: This 'if'  statement is the parent, indented to column 9.
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:63: nephew: This  statement is nested within its parent, indented to column 11.
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:64: uncle: This  statement is indented to column 11, as if it were nested within the preceding parent statement, but it is not.
#   62|           if (this.$current)
#   63|             e.preventDefault();
#   64|->           this.select(this.$current);
#   65|           break;
#   66|       }

Error: IDENTIFIER_TYPO: [#def2]
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:83: identifier_typo: Using "moveTimout" appears to be a typo:
* Identifier "moveTimout" is only known to be referenced here, or in copies of this code.
* Identifier "moveTimeout" is referenced elsewhere at least 5 times.
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:71: identifier_use: Example 1: Using identifier "moveTimeout" (2 total uses in this function).
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:77: identifier_use: Example 2: Using identifier "moveTimeout" (2 total uses in this function).
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:81: identifier_use: Example 3: Using identifier "moveTimeout".
rubygem-gem2rpm-0.11.3/usr/share/gems/doc/gem2rpm-0.11.3/rdoc/js/navigation.js:83: remediation: Should identifier "moveTimout" be replaced by "moveTimeout"?
#   81|         if (!_this.moveTimeout) return;
#   82|         _this[isDown ? 'moveDown' : 'moveUp']();
#   83|->       _this.moveTimout = setTimeout(go, 100);
#   84|       }
#   85|       this.moveTimeout = setTimeout(go, 200);

Both of them seems to be legit to me ... Actually for the first one, I'd say there might be missing braces?

voxik avatar Jul 27 '16 12:07 voxik