Merge pull request #1773 from xiemaisi/js/undocumented-parameter-precision

Approved by esben-semmle
This commit is contained in:
semmle-qlci
2019-08-23 21:29:10 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -31,6 +31,7 @@
| Shift out of range | Fewer false positive results | This rule now correctly handles BigInt shift operands. |
| Conflicting HTML element attributes | Fewer results | Results are no longer shown on LGTM by default. |
| Superfluous trailing arguments | Fewer false-positive results. | This rule no longer flags calls to placeholder functions that trivially throw an exception. |
| Undocumented parameter | No changes to results | This rule is now run on LGTM, although its results are still not shown by default. |
## Changes to QL libraries

View File

@@ -8,7 +8,7 @@
* @tags maintainability
* readability
* documentation
* @precision medium
* @precision high
*/
import javascript
@@ -22,6 +22,6 @@ where
exists(doc.getATag().(JSDocParamTag).getDocumentedParameter()) and
// but v is not
not doc.getATag().(JSDocParamTag).getDocumentedParameter() = v and
// don't report a violation in ambiguous cases
// don't report an alert in ambiguous cases
strictcount(JSDoc d | d = f.getDocumentation() and d.getATag() instanceof JSDocParamTag) = 1
select parm, "Parameter " + v.getName() + " is not documented."