[doclint] Fix bug in documentation linter

This patch:
- fixes a typo in documentation linter, which resulted in only
  certain method arguments being linted.
- adds missing arguments to the documentation

References #14.
This commit is contained in:
Andrey Lushnikov
2017-07-11 17:01:58 -07:00
parent 7765760186
commit 191ca747fd
2 changed files with 49 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ class Documentation {
const actualArgs = actualMethod.args.map(arg => arg.name);
const expectedArgs = expectedMethod.args.map(arg => arg.name);
const argDiff = diff(actualArgs, expectedArgs);
if (argDiff.extra.length || argDiff.missing.diff) {
if (argDiff.extra.length || argDiff.missing.length) {
result.badArguments.push({
method: `${className}.${methodName}`,
missingArgs: argDiff.missing,