gurkencheck 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +327 -0
- package/dist/config-parser.d.ts +21 -0
- package/dist/config-parser.d.ts.map +1 -0
- package/dist/config-parser.js +171 -0
- package/dist/config-parser.js.map +1 -0
- package/dist/config-verifier.d.ts +4 -0
- package/dist/config-verifier.d.ts.map +1 -0
- package/dist/config-verifier.js +81 -0
- package/dist/config-verifier.js.map +1 -0
- package/dist/feature-finder.d.ts +18 -0
- package/dist/feature-finder.d.ts.map +1 -0
- package/dist/feature-finder.js +70 -0
- package/dist/feature-finder.js.map +1 -0
- package/dist/formatters/index.d.ts +23 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +79 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/json.d.ts +31 -0
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/json.js +31 -0
- package/dist/formatters/json.js.map +1 -0
- package/dist/formatters/junit.d.ts +17 -0
- package/dist/formatters/junit.d.ts.map +1 -0
- package/dist/formatters/junit.js +61 -0
- package/dist/formatters/junit.js.map +1 -0
- package/dist/formatters/sarif.d.ts +6 -0
- package/dist/formatters/sarif.d.ts.map +1 -0
- package/dist/formatters/sarif.js +81 -0
- package/dist/formatters/sarif.js.map +1 -0
- package/dist/formatters/stylish.d.ts +9 -0
- package/dist/formatters/stylish.d.ts.map +1 -0
- package/dist/formatters/stylish.js +66 -0
- package/dist/formatters/stylish.js.map +1 -0
- package/dist/formatters/tap.d.ts +14 -0
- package/dist/formatters/tap.d.ts.map +1 -0
- package/dist/formatters/tap.js +45 -0
- package/dist/formatters/tap.js.map +1 -0
- package/dist/gherkin/dialects.d.ts +31 -0
- package/dist/gherkin/dialects.d.ts.map +1 -0
- package/dist/gherkin/dialects.js +40 -0
- package/dist/gherkin/dialects.js.map +1 -0
- package/dist/gherkin/keywords.d.ts +21 -0
- package/dist/gherkin/keywords.d.ts.map +1 -0
- package/dist/gherkin/keywords.js +53 -0
- package/dist/gherkin/keywords.js.map +1 -0
- package/dist/gherkin/parse.d.ts +32 -0
- package/dist/gherkin/parse.d.ts.map +1 -0
- package/dist/gherkin/parse.js +236 -0
- package/dist/gherkin/parse.js.map +1 -0
- package/dist/gherkin/traverse.d.ts +45 -0
- package/dist/gherkin/traverse.d.ts.map +1 -0
- package/dist/gherkin/traverse.js +89 -0
- package/dist/gherkin/traverse.js.map +1 -0
- package/dist/gherkin/variables.d.ts +26 -0
- package/dist/gherkin/variables.d.ts.map +1 -0
- package/dist/gherkin/variables.js +51 -0
- package/dist/gherkin/variables.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/linter.d.ts +23 -0
- package/dist/linter.d.ts.map +1 -0
- package/dist/linter.js +57 -0
- package/dist/linter.js.map +1 -0
- package/dist/logger.d.ts +16 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +28 -0
- package/dist/logger.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +144 -0
- package/dist/main.js.map +1 -0
- package/dist/presets.d.ts +19 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +24 -0
- package/dist/presets.js.map +1 -0
- package/dist/rules/allowed-tags.d.ts +4 -0
- package/dist/rules/allowed-tags.d.ts.map +1 -0
- package/dist/rules/allowed-tags.js +34 -0
- package/dist/rules/allowed-tags.js.map +1 -0
- package/dist/rules/file-name.d.ts +4 -0
- package/dist/rules/file-name.d.ts.map +1 -0
- package/dist/rules/file-name.js +41 -0
- package/dist/rules/file-name.js.map +1 -0
- package/dist/rules/indentation.d.ts +4 -0
- package/dist/rules/indentation.d.ts.map +1 -0
- package/dist/rules/indentation.js +153 -0
- package/dist/rules/indentation.js.map +1 -0
- package/dist/rules/index.d.ts +13 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +70 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/keywords-in-logical-order.d.ts +4 -0
- package/dist/rules/keywords-in-logical-order.d.ts.map +1 -0
- package/dist/rules/keywords-in-logical-order.js +37 -0
- package/dist/rules/keywords-in-logical-order.js.map +1 -0
- package/dist/rules/max-scenarios-per-file.d.ts +4 -0
- package/dist/rules/max-scenarios-per-file.d.ts.map +1 -0
- package/dist/rules/max-scenarios-per-file.js +42 -0
- package/dist/rules/max-scenarios-per-file.js.map +1 -0
- package/dist/rules/name-length.d.ts +4 -0
- package/dist/rules/name-length.d.ts.map +1 -0
- package/dist/rules/name-length.js +50 -0
- package/dist/rules/name-length.js.map +1 -0
- package/dist/rules/new-line-at-eof.d.ts +4 -0
- package/dist/rules/new-line-at-eof.d.ts.map +1 -0
- package/dist/rules/new-line-at-eof.js +30 -0
- package/dist/rules/new-line-at-eof.js.map +1 -0
- package/dist/rules/no-background-only-scenario.d.ts +4 -0
- package/dist/rules/no-background-only-scenario.d.ts.map +1 -0
- package/dist/rules/no-background-only-scenario.js +43 -0
- package/dist/rules/no-background-only-scenario.js.map +1 -0
- package/dist/rules/no-dupe-feature-names.d.ts +4 -0
- package/dist/rules/no-dupe-feature-names.d.ts.map +1 -0
- package/dist/rules/no-dupe-feature-names.js +25 -0
- package/dist/rules/no-dupe-feature-names.js.map +1 -0
- package/dist/rules/no-dupe-file-names.d.ts +4 -0
- package/dist/rules/no-dupe-file-names.d.ts.map +1 -0
- package/dist/rules/no-dupe-file-names.js +28 -0
- package/dist/rules/no-dupe-file-names.js.map +1 -0
- package/dist/rules/no-dupe-scenario-names.d.ts +4 -0
- package/dist/rules/no-dupe-scenario-names.d.ts.map +1 -0
- package/dist/rules/no-dupe-scenario-names.js +41 -0
- package/dist/rules/no-dupe-scenario-names.js.map +1 -0
- package/dist/rules/no-duplicate-tags.d.ts +4 -0
- package/dist/rules/no-duplicate-tags.d.ts.map +1 -0
- package/dist/rules/no-duplicate-tags.js +38 -0
- package/dist/rules/no-duplicate-tags.js.map +1 -0
- package/dist/rules/no-empty-background.d.ts +4 -0
- package/dist/rules/no-empty-background.d.ts.map +1 -0
- package/dist/rules/no-empty-background.js +24 -0
- package/dist/rules/no-empty-background.js.map +1 -0
- package/dist/rules/no-empty-file.d.ts +4 -0
- package/dist/rules/no-empty-file.d.ts.map +1 -0
- package/dist/rules/no-empty-file.js +12 -0
- package/dist/rules/no-empty-file.js.map +1 -0
- package/dist/rules/no-examples-in-scenarios.d.ts +4 -0
- package/dist/rules/no-examples-in-scenarios.d.ts.map +1 -0
- package/dist/rules/no-examples-in-scenarios.js +25 -0
- package/dist/rules/no-examples-in-scenarios.js.map +1 -0
- package/dist/rules/no-files-without-scenarios.d.ts +4 -0
- package/dist/rules/no-files-without-scenarios.d.ts.map +1 -0
- package/dist/rules/no-files-without-scenarios.js +18 -0
- package/dist/rules/no-files-without-scenarios.js.map +1 -0
- package/dist/rules/no-homogenous-tags.d.ts +4 -0
- package/dist/rules/no-homogenous-tags.d.ts.map +1 -0
- package/dist/rules/no-homogenous-tags.js +54 -0
- package/dist/rules/no-homogenous-tags.js.map +1 -0
- package/dist/rules/no-multiple-empty-lines.d.ts +4 -0
- package/dist/rules/no-multiple-empty-lines.d.ts.map +1 -0
- package/dist/rules/no-multiple-empty-lines.js +44 -0
- package/dist/rules/no-multiple-empty-lines.js.map +1 -0
- package/dist/rules/no-partially-commented-tag-lines.d.ts +4 -0
- package/dist/rules/no-partially-commented-tag-lines.d.ts.map +1 -0
- package/dist/rules/no-partially-commented-tag-lines.js +44 -0
- package/dist/rules/no-partially-commented-tag-lines.js.map +1 -0
- package/dist/rules/no-restricted-patterns.d.ts +4 -0
- package/dist/rules/no-restricted-patterns.d.ts.map +1 -0
- package/dist/rules/no-restricted-patterns.js +101 -0
- package/dist/rules/no-restricted-patterns.js.map +1 -0
- package/dist/rules/no-restricted-tags.d.ts +4 -0
- package/dist/rules/no-restricted-tags.d.ts.map +1 -0
- package/dist/rules/no-restricted-tags.js +35 -0
- package/dist/rules/no-restricted-tags.js.map +1 -0
- package/dist/rules/no-scenario-outlines-without-examples.d.ts +4 -0
- package/dist/rules/no-scenario-outlines-without-examples.d.ts.map +1 -0
- package/dist/rules/no-scenario-outlines-without-examples.js +29 -0
- package/dist/rules/no-scenario-outlines-without-examples.js.map +1 -0
- package/dist/rules/no-superfluous-tags.d.ts +4 -0
- package/dist/rules/no-superfluous-tags.d.ts.map +1 -0
- package/dist/rules/no-superfluous-tags.js +40 -0
- package/dist/rules/no-superfluous-tags.js.map +1 -0
- package/dist/rules/no-trailing-spaces.d.ts +4 -0
- package/dist/rules/no-trailing-spaces.d.ts.map +1 -0
- package/dist/rules/no-trailing-spaces.js +24 -0
- package/dist/rules/no-trailing-spaces.js.map +1 -0
- package/dist/rules/no-undeclared-variables.d.ts +4 -0
- package/dist/rules/no-undeclared-variables.d.ts.map +1 -0
- package/dist/rules/no-undeclared-variables.js +35 -0
- package/dist/rules/no-undeclared-variables.js.map +1 -0
- package/dist/rules/no-unnamed-features.d.ts +4 -0
- package/dist/rules/no-unnamed-features.d.ts.map +1 -0
- package/dist/rules/no-unnamed-features.js +19 -0
- package/dist/rules/no-unnamed-features.js.map +1 -0
- package/dist/rules/no-unnamed-scenarios.d.ts +4 -0
- package/dist/rules/no-unnamed-scenarios.d.ts.map +1 -0
- package/dist/rules/no-unnamed-scenarios.js +24 -0
- package/dist/rules/no-unnamed-scenarios.js.map +1 -0
- package/dist/rules/no-unused-variables.d.ts +4 -0
- package/dist/rules/no-unused-variables.d.ts.map +1 -0
- package/dist/rules/no-unused-variables.js +36 -0
- package/dist/rules/no-unused-variables.js.map +1 -0
- package/dist/rules/one-space-between-tags.d.ts +4 -0
- package/dist/rules/one-space-between-tags.d.ts.map +1 -0
- package/dist/rules/one-space-between-tags.js +36 -0
- package/dist/rules/one-space-between-tags.js.map +1 -0
- package/dist/rules/only-one-when.d.ts +4 -0
- package/dist/rules/only-one-when.d.ts.map +1 -0
- package/dist/rules/only-one-when.js +59 -0
- package/dist/rules/only-one-when.js.map +1 -0
- package/dist/rules/required-tags.d.ts +4 -0
- package/dist/rules/required-tags.d.ts.map +1 -0
- package/dist/rules/required-tags.js +36 -0
- package/dist/rules/required-tags.js.map +1 -0
- package/dist/rules/scenario-size.d.ts +4 -0
- package/dist/rules/scenario-size.d.ts.map +1 -0
- package/dist/rules/scenario-size.js +37 -0
- package/dist/rules/scenario-size.js.map +1 -0
- package/dist/rules/use-and.d.ts +4 -0
- package/dist/rules/use-and.d.ts.map +1 -0
- package/dist/rules/use-and.js +33 -0
- package/dist/rules/use-and.js.map +1 -0
- package/dist/rules.d.ts +24 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +109 -0
- package/dist/rules.js.map +1 -0
- package/dist/suppressions.d.ts +33 -0
- package/dist/suppressions.d.ts.map +1 -0
- package/dist/suppressions.js +84 -0
- package/dist/suppressions.js.map +1 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/util/case.d.ts +21 -0
- package/dist/util/case.d.ts.map +1 -0
- package/dist/util/case.js +42 -0
- package/dist/util/case.js.map +1 -0
- package/dist/util/collections.d.ts +30 -0
- package/dist/util/collections.d.ts.map +1 -0
- package/dist/util/collections.js +87 -0
- package/dist/util/collections.js.map +1 -0
- package/dist/util/glob.d.ts +20 -0
- package/dist/util/glob.d.ts.map +1 -0
- package/dist/util/glob.js +203 -0
- package/dist/util/glob.js.map +1 -0
- package/dist/util/json.d.ts +14 -0
- package/dist/util/json.d.ts.map +1 -0
- package/dist/util/json.js +63 -0
- package/dist/util/json.js.map +1 -0
- package/dist/util/lines.d.ts +24 -0
- package/dist/util/lines.d.ts.map +1 -0
- package/dist/util/lines.js +45 -0
- package/dist/util/lines.js.map +1 -0
- package/dist/util/location.d.ts +15 -0
- package/dist/util/location.d.ts.map +1 -0
- package/dist/util/location.js +11 -0
- package/dist/util/location.js.map +1 -0
- package/dist/util/xml.d.ts +16 -0
- package/dist/util/xml.d.ts.map +1 -0
- package/dist/util/xml.js +36 -0
- package/dist/util/xml.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +24 -0
- package/dist/version.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getNodeType } from '../gherkin/keywords.js';
|
|
2
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { at } from '../util/location.js';
|
|
4
|
+
const name = 'no-scenario-outlines-without-examples';
|
|
5
|
+
const rule = {
|
|
6
|
+
name,
|
|
7
|
+
run(feature) {
|
|
8
|
+
if (feature === undefined) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const errors = [];
|
|
12
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
13
|
+
if (getNodeType(scenario, feature.language) !== 'Scenario Outline') {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const hasRows = scenario.examples.some((examples) => examples.tableBody.length > 0);
|
|
17
|
+
if (!hasRows) {
|
|
18
|
+
errors.push({
|
|
19
|
+
message: 'Scenario Outline does not have any Examples',
|
|
20
|
+
rule: name,
|
|
21
|
+
...at(scenario.location),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return errors;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export default rule;
|
|
29
|
+
//# sourceMappingURL=no-scenario-outlines-without-examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-scenario-outlines-without-examples.js","sourceRoot":"","sources":["../../src/rules/no-scenario-outlines-without-examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,uCAAuC,CAAC;AAErD,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,KAAK,MAAM,EAAC,QAAQ,EAAC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9C,IAAI,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,kBAAkB,EAAE,CAAC;gBACnE,SAAS;YACX,CAAC;YACD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACpF,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,6CAA6C;oBACtD,IAAI,EAAE,IAAI;oBACV,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;iBACzB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-superfluous-tags.d.ts","sourceRoot":"","sources":["../../src/rules/no-superfluous-tags.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAMrD,QAAA,MAAM,IAAI,EAAE,QAoCX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getNodeType } from '../gherkin/keywords.js';
|
|
2
|
+
import { taggedNodesOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { intersectionBy } from '../util/collections.js';
|
|
4
|
+
import { at } from '../util/location.js';
|
|
5
|
+
const name = 'no-superfluous-tags';
|
|
6
|
+
const rule = {
|
|
7
|
+
name,
|
|
8
|
+
run(feature) {
|
|
9
|
+
if (feature === undefined) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
const errors = [];
|
|
13
|
+
const language = feature.language;
|
|
14
|
+
const check = (child, parent) => {
|
|
15
|
+
const duplicated = intersectionBy(child.tags, parent.tags, (tag) => tag.name);
|
|
16
|
+
if (duplicated.length === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const childType = getNodeType(child, language);
|
|
20
|
+
const parentType = getNodeType(parent, language);
|
|
21
|
+
for (const tag of duplicated) {
|
|
22
|
+
errors.push({
|
|
23
|
+
message: `Tag duplication between ${childType} and its corresponding ${parentType}: ${tag.name}`,
|
|
24
|
+
rule: name,
|
|
25
|
+
...at(tag.location),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
// A node inherits the tags of everything it sits inside, so a tag repeated
|
|
30
|
+
// on any ancestor is superfluous - not only one repeated on the nearest.
|
|
31
|
+
for (const { node, ancestors } of taggedNodesOf(feature)) {
|
|
32
|
+
for (const ancestor of ancestors) {
|
|
33
|
+
check(node, ancestor);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return errors;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export default rule;
|
|
40
|
+
//# sourceMappingURL=no-superfluous-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-superfluous-tags.js","sourceRoot":"","sources":["../../src/rules/no-superfluous-tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAoB,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO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xB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-trailing-spaces.d.ts","sourceRoot":"","sources":["../../src/rules/no-trailing-spaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAMrD,QAAA,MAAM,IAAI,EAAE,QAkBX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { atLineColumn } from '../util/location.js';
|
|
2
|
+
const name = 'no-trailing-spaces';
|
|
3
|
+
const TRAILING_WHITESPACE = /[\t ]+$/;
|
|
4
|
+
const rule = {
|
|
5
|
+
name,
|
|
6
|
+
run(_feature, file) {
|
|
7
|
+
const errors = [];
|
|
8
|
+
file.lines.forEach((line, index) => {
|
|
9
|
+
const trailing = TRAILING_WHITESPACE.exec(line);
|
|
10
|
+
if (trailing !== null) {
|
|
11
|
+
errors.push({
|
|
12
|
+
message: 'Trailing spaces are not allowed',
|
|
13
|
+
rule: name,
|
|
14
|
+
// Point at the first character of the run, so an editor can
|
|
15
|
+
// underline exactly what has to go.
|
|
16
|
+
...atLineColumn(index + 1, trailing.index + 1),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return errors;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default rule;
|
|
24
|
+
//# sourceMappingURL=no-trailing-spaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-trailing-spaces.js","sourceRoot":"","sources":["../../src/rules/no-trailing-spaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAEtC,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,QAAQ,EAAE,IAAI;QAChB,MAAM,MAAM,GAAgB,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACjC,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtB,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,iCAAiC;oBAC1C,IAAI,EAAE,IAAI;oBACV,4DAA4D;oBAC5D,oCAAoC;oBACpC,GAAG,YAAY,CAAC,KAAK,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC;iBAC/C,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-undeclared-variables.d.ts","sourceRoot":"","sources":["../../src/rules/no-undeclared-variables.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAIrD,QAAA,MAAM,IAAI,EAAE,QAkCX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { variablesOf } from '../gherkin/variables.js';
|
|
2
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
3
|
+
const name = 'no-undeclared-variables';
|
|
4
|
+
const rule = {
|
|
5
|
+
name,
|
|
6
|
+
run(feature) {
|
|
7
|
+
if (feature === undefined) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const errors = [];
|
|
11
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
12
|
+
// Without an Examples table there is nothing to declare a variable in,
|
|
13
|
+
// and a <placeholder> is just text.
|
|
14
|
+
if (scenario.examples.length === 0) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
const { declared, used } = variablesOf(scenario);
|
|
18
|
+
for (const [variable, positions] of used) {
|
|
19
|
+
if (declared.has(variable)) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
for (const position of positions) {
|
|
23
|
+
errors.push({
|
|
24
|
+
message: `Step variable "${variable}" does not exist in the examples table`,
|
|
25
|
+
rule: name,
|
|
26
|
+
...position,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return errors;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export default rule;
|
|
35
|
+
//# sourceMappingURL=no-undeclared-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-undeclared-variables.js","sourceRoot":"","sources":["../../src/rules/no-undeclared-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGnD,MAAM,IAAI,GAAG,yBAAyB,CAAC;AAEvC,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,KAAK,MAAM,EAAC,QAAQ,EAAC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9C,uEAAuE;YACvE,oCAAoC;YACpC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnC,SAAS;YACX,CAAC;YAED,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;YAE/C,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;gBACzC,IAAI,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC3B,SAAS;gBACX,CAAC;gBACD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;oBACjC,MAAM,CAAC,IAAI,CAAC;wBACV,OAAO,EAAE,kBAAkB,QAAQ,wCAAwC;wBAC3E,IAAI,EAAE,IAAI;wBACV,GAAG,QAAQ;qBACZ,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-features.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnamed-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAK1C,QAAA,MAAM,IAAI,EAAE,QAcX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { at } from '../util/location.js';
|
|
2
|
+
const name = 'no-unnamed-features';
|
|
3
|
+
const rule = {
|
|
4
|
+
name,
|
|
5
|
+
run(feature) {
|
|
6
|
+
if (feature !== undefined && feature.name !== '') {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
message: 'Missing Feature name',
|
|
12
|
+
rule: name,
|
|
13
|
+
...(feature === undefined ? { line: 0 } : at(feature.location)),
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default rule;
|
|
19
|
+
//# sourceMappingURL=no-unnamed-features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-features.js","sourceRoot":"","sources":["../../src/rules/no-unnamed-features.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;YACjD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO;YACL;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,IAAI,EAAE,IAAI;gBACV,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAC9D;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-scenarios.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnamed-scenarios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAKrD,QAAA,MAAM,IAAI,EAAE,QAkBX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
2
|
+
import { at } from '../util/location.js';
|
|
3
|
+
const name = 'no-unnamed-scenarios';
|
|
4
|
+
const rule = {
|
|
5
|
+
name,
|
|
6
|
+
run(feature) {
|
|
7
|
+
if (feature === undefined) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const errors = [];
|
|
11
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
12
|
+
if (scenario.name === '') {
|
|
13
|
+
errors.push({
|
|
14
|
+
message: 'Missing Scenario name',
|
|
15
|
+
rule: name,
|
|
16
|
+
...at(scenario.location),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return errors;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default rule;
|
|
24
|
+
//# sourceMappingURL=no-unnamed-scenarios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-scenarios.js","sourceRoot":"","sources":["../../src/rules/no-unnamed-scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AAEpC,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,MAAM,GAAgB,EAAE,CAAC;QAC/B,KAAK,MAAM,EAAC,QAAQ,EAAC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9C,IAAI,QAAQ,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;gBACzB,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,uBAAuB;oBAChC,IAAI,EAAE,IAAI;oBACV,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;iBACzB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unused-variables.d.ts","sourceRoot":"","sources":["../../src/rules/no-unused-variables.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAIrD,QAAA,MAAM,IAAI,EAAE,QAmCX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { variablesOf } from '../gherkin/variables.js';
|
|
2
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
3
|
+
const name = 'no-unused-variables';
|
|
4
|
+
const rule = {
|
|
5
|
+
name,
|
|
6
|
+
run(feature) {
|
|
7
|
+
if (feature === undefined) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const errors = [];
|
|
11
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
12
|
+
// Without an Examples table there is nothing to be unused.
|
|
13
|
+
if (scenario.examples.length === 0) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const { declared, used } = variablesOf(scenario);
|
|
17
|
+
// Every place a problem appears is reported, not just the last one, so
|
|
18
|
+
// that fixing the file does not turn into a game of whack-a-mole.
|
|
19
|
+
for (const [variable, positions] of declared) {
|
|
20
|
+
if (used.has(variable)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
for (const position of positions) {
|
|
24
|
+
errors.push({
|
|
25
|
+
message: `Examples table variable "${variable}" is not used in any step`,
|
|
26
|
+
rule: name,
|
|
27
|
+
...position,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return errors;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default rule;
|
|
36
|
+
//# sourceMappingURL=no-unused-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unused-variables.js","sourceRoot":"","sources":["../../src/rules/no-unused-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGnD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,KAAK,MAAM,EAAC,QAAQ,EAAC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9C,2DAA2D;YAC3D,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnC,SAAS;YACX,CAAC;YAED,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;YAE/C,uEAAuE;YACvE,kEAAkE;YAClE,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,QAAQ,EAAE,CAAC;gBAC7C,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACvB,SAAS;gBACX,CAAC;gBACD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;oBACjC,MAAM,CAAC,IAAI,CAAC;wBACV,OAAO,EAAE,4BAA4B,QAAQ,2BAA2B;wBACxE,IAAI,EAAE,IAAI;wBACV,GAAG,QAAQ;qBACZ,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-space-between-tags.d.ts","sourceRoot":"","sources":["../../src/rules/one-space-between-tags.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAwBrD,QAAA,MAAM,IAAI,EAAE,QAaX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { taggedNodesOf } from '../gherkin/traverse.js';
|
|
2
|
+
import { groupBy, sortBy } from '../util/collections.js';
|
|
3
|
+
import { at } from '../util/location.js';
|
|
4
|
+
const name = 'one-space-between-tags';
|
|
5
|
+
function checkTags(tags, errors) {
|
|
6
|
+
for (const [, tagsOnLine] of groupBy(tags, (tag) => tag.location.line)) {
|
|
7
|
+
const ordered = sortBy(tagsOnLine, (tag) => tag.location.column ?? 0);
|
|
8
|
+
for (let index = 0; index < ordered.length - 1; index++) {
|
|
9
|
+
const current = ordered[index];
|
|
10
|
+
const next = ordered[index + 1];
|
|
11
|
+
const endOfCurrent = (current.location.column ?? 0) + current.name.length;
|
|
12
|
+
if (endOfCurrent < (next.location.column ?? 0) - 1) {
|
|
13
|
+
errors.push({
|
|
14
|
+
message: `There is more than one space between the tags ${current.name} and ${next.name}`,
|
|
15
|
+
rule: name,
|
|
16
|
+
...at(current.location),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const rule = {
|
|
23
|
+
name,
|
|
24
|
+
run(feature) {
|
|
25
|
+
if (feature === undefined) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const errors = [];
|
|
29
|
+
for (const { node } of taggedNodesOf(feature)) {
|
|
30
|
+
checkTags(node.tags, errors);
|
|
31
|
+
}
|
|
32
|
+
return errors;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default rule;
|
|
36
|
+
//# sourceMappingURL=one-space-between-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-space-between-tags.js","sourceRoot":"","sources":["../../src/rules/one-space-between-tags.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,wBAAwB,CAAC;AAEtC,SAAS,SAAS,CAAC,IAAoB,EAAE,MAAmB;IAC1D,KAAK,MAAM,CAAC,EAAE,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CA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,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"only-one-when.d.ts","sourceRoot":"","sources":["../../src/rules/only-one-when.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAiBrD,QAAA,MAAM,IAAI,EAAE,QAiDX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { getNeutralKeyword } from '../gherkin/keywords.js';
|
|
2
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { mergeDefaults } from '../util/collections.js';
|
|
4
|
+
import { at } from '../util/location.js';
|
|
5
|
+
const name = 'only-one-when';
|
|
6
|
+
const availableConfigs = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether an `And` following a `When` counts as another `When`.
|
|
9
|
+
*
|
|
10
|
+
* On, because the rule is really about one action per scenario, and
|
|
11
|
+
* `When I log in / And I log out` is two actions. Turn it off if your team
|
|
12
|
+
* writes a single action across several And steps.
|
|
13
|
+
*/
|
|
14
|
+
countAnd: true,
|
|
15
|
+
};
|
|
16
|
+
const rule = {
|
|
17
|
+
name,
|
|
18
|
+
availableConfigs,
|
|
19
|
+
run(feature, _file, configuration) {
|
|
20
|
+
if (feature === undefined) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const { countAnd } = mergeDefaults(availableConfigs, configuration);
|
|
24
|
+
const errors = [];
|
|
25
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
26
|
+
let lastRealKeyword = '';
|
|
27
|
+
let whenCount = 0;
|
|
28
|
+
let firstViolation = { line: 0 };
|
|
29
|
+
for (const step of scenario.steps) {
|
|
30
|
+
const keyword = getNeutralKeyword(step, feature.language);
|
|
31
|
+
// An `And` carries on from whichever keyword came before it, however
|
|
32
|
+
// many of them are chained together.
|
|
33
|
+
const continuesWhen = keyword === 'and' && lastRealKeyword === 'when';
|
|
34
|
+
if (keyword !== 'when' && !continuesWhen) {
|
|
35
|
+
lastRealKeyword = keyword;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
lastRealKeyword = 'when';
|
|
39
|
+
if (keyword === 'and' && !countAnd) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
whenCount++;
|
|
43
|
+
if (whenCount > 1 && firstViolation.line === 0) {
|
|
44
|
+
firstViolation = at(step.location);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (whenCount > 1) {
|
|
48
|
+
errors.push({
|
|
49
|
+
message: `Scenario "${scenario.name}" contains ${whenCount} When statements (max 1)`,
|
|
50
|
+
rule: name,
|
|
51
|
+
...firstViolation,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return errors;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
export default rule;
|
|
59
|
+
//# sourceMappingURL=only-one-when.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"only-one-when.js","sourceRoot":"","sources":["../../src/rules/only-one-when.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,eAAe,CAAC;AAE7B,MAAM,gBAAgB,GAAG;IACvB;;;;;;OAMG;IACH,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,gBAAgB;IAChB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa;QAC/B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,EAAC,QAAQ,EAAC,G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CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-tags.d.ts","sourceRoot":"","sources":["../../src/rules/required-tags.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAerD,QAAA,MAAM,IAAI,EAAE,QA+BX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getNodeType } from '../gherkin/keywords.js';
|
|
2
|
+
import { scenariosOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { mergeDefaults } from '../util/collections.js';
|
|
4
|
+
import { at } from '../util/location.js';
|
|
5
|
+
const name = 'required-tags';
|
|
6
|
+
const availableConfigs = { tags: [], ignoreUntagged: true };
|
|
7
|
+
const rule = {
|
|
8
|
+
name,
|
|
9
|
+
availableConfigs,
|
|
10
|
+
run(feature, _file, configuration) {
|
|
11
|
+
if (feature === undefined) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
const config = mergeDefaults(availableConfigs, configuration);
|
|
15
|
+
const errors = [];
|
|
16
|
+
for (const { scenario } of scenariosOf(feature)) {
|
|
17
|
+
if (config.ignoreUntagged && scenario.tags.length === 0) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const scenarioType = getNodeType(scenario, feature.language);
|
|
21
|
+
for (const required of config.tags) {
|
|
22
|
+
const pattern = new RegExp(required);
|
|
23
|
+
if (!scenario.tags.some((tag) => pattern.test(tag.name))) {
|
|
24
|
+
errors.push({
|
|
25
|
+
message: `No tag found matching ${required} for ${scenarioType}`,
|
|
26
|
+
rule: name,
|
|
27
|
+
...at(scenario.location),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return errors;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default rule;
|
|
36
|
+
//# sourceMappingURL=required-tags.js.map
|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GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;oBACzD,MAAM,CAAC,IAAI,CAAC;wBACV,OAAO,EAAE,yBAAyB,QAAQ,QAAQ,YAAY,EAAE;wBAChE,IAAI,EAAE,IAAI;wBACV,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;qBACzB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-size.d.ts","sourceRoot":"","sources":["../../src/rules/scenario-size.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAcrD,QAAA,MAAM,IAAI,EAAE,QAyBX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getNodeType } from '../gherkin/keywords.js';
|
|
2
|
+
import { stepContainersOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { mergeDefaults } from '../util/collections.js';
|
|
4
|
+
import { at } from '../util/location.js';
|
|
5
|
+
const name = 'scenario-size';
|
|
6
|
+
/** Maximum number of steps allowed in each kind of block. */
|
|
7
|
+
const availableConfigs = {
|
|
8
|
+
'steps-length': {
|
|
9
|
+
Background: 15,
|
|
10
|
+
Scenario: 15,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
const rule = {
|
|
14
|
+
name,
|
|
15
|
+
availableConfigs,
|
|
16
|
+
run(feature, _file, configuration) {
|
|
17
|
+
if (feature === undefined) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
const config = mergeDefaults(availableConfigs, configuration);
|
|
21
|
+
const errors = [];
|
|
22
|
+
for (const { node } of stepContainersOf(feature)) {
|
|
23
|
+
const key = 'examples' in node ? 'Scenario' : 'Background';
|
|
24
|
+
const maximum = config['steps-length'][key];
|
|
25
|
+
if (typeof maximum === 'number' && node.steps.length > maximum) {
|
|
26
|
+
errors.push({
|
|
27
|
+
message: `Element ${getNodeType(node, feature.language)} too long: actual ${node.steps.length}, expected ${maximum}`,
|
|
28
|
+
rule: name,
|
|
29
|
+
...at(node.location),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return errors;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export default rule;
|
|
37
|
+
//# sourceMappingURL=scenario-size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-size.js","sourceRoot":"","sources":["../../src/rules/scenario-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,eAAe,CAAC;AAE7B,6DAA6D;AAC7D,MAAM,gBAAgB,GAAG;IACvB,cAAc,EAAE;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,gBAAgB;IAChB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa;QAC/B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAG,aAAa,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,KAAK,MAAM,EAAC,IAAI,EAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/C,MAAM,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;YAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,EAAE,CAAC;gBAC/D,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,WAAW,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,qBAAqB,IAAI,CAAC,KAAK,CAAC,MAAM,cAAc,OAAO,EAAE;oBACpH,IAAI,EAAE,IAAI;oBACV,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;iBACrB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-and.d.ts","sourceRoot":"","sources":["../../src/rules/use-and.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAY,MAAM,aAAa,CAAC;AAKrD,QAAA,MAAM,IAAI,EAAE,QA8BX,CAAC;eAEa,IAAI"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getNeutralKeyword } from '../gherkin/keywords.js';
|
|
2
|
+
import { stepContainersOf } from '../gherkin/traverse.js';
|
|
3
|
+
import { at } from '../util/location.js';
|
|
4
|
+
const name = 'use-and';
|
|
5
|
+
const rule = {
|
|
6
|
+
name,
|
|
7
|
+
run(feature) {
|
|
8
|
+
if (feature === undefined) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const errors = [];
|
|
12
|
+
for (const { node } of stepContainersOf(feature)) {
|
|
13
|
+
let previousKeyword;
|
|
14
|
+
for (const step of node.steps) {
|
|
15
|
+
const keyword = getNeutralKeyword(step, feature.language);
|
|
16
|
+
if (keyword === 'and') {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
if (keyword === previousKeyword) {
|
|
20
|
+
errors.push({
|
|
21
|
+
message: `Step "${step.keyword}${step.text}" should use And instead of ${step.keyword}`,
|
|
22
|
+
rule: name,
|
|
23
|
+
...at(step.location),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
previousKeyword = keyword;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return errors;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export default rule;
|
|
33
|
+
//# sourceMappingURL=use-and.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-and.js","sourceRoot":"","sources":["../../src/rules/use-and.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAC,EAAE,EAAC,MAAM,qBAAqB,CAAC;AAEvC,MAAM,IAAI,GAAG,SAAS,CAAC;AAEvB,MAAM,IAAI,GAAa;IACrB,IAAI;IACJ,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,KAAK,MAAM,EAAC,IAAI,EAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/C,IAAI,eAAmC,CAAC;YAExC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAC1D,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;oBACtB,SAAS;gBACX,CAAC;gBACD,IAAI,OAAO,KAAK,eAAe,EAAE,CAAC;oBAChC,MAAM,CAAC,IAAI,CAAC;wBACV,OAAO,EAAE,SAAS,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,+BAA+B,IAAI,CAAC,OAAO,EAAE;wBACvF,IAAI,EAAE,IAAI;wBACV,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;qBACrB,CAAC,CAAC;gBACL,CAAC;gBACD,eAAe,GAAG,OAAO,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/rules.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Configuration, FeatureFile, RuleConfig, RuleError, RuleRegistry, Severity } from './types.ts';
|
|
2
|
+
import type { Feature } from '@cucumber/messages';
|
|
3
|
+
/**
|
|
4
|
+
* The built-in rules, plus any found in the given directories. A custom rule
|
|
5
|
+
* with the same name as a built-in one replaces it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadRules(additionalRulesDirs?: readonly string[]): Promise<RuleRegistry>;
|
|
8
|
+
/** True when the configuration switches this rule on, to warn or to fail. */
|
|
9
|
+
export declare function isRuleEnabled(config: RuleConfig | undefined): boolean;
|
|
10
|
+
/** How loudly a rule reports: `warn` only warns, anything else fails the run. */
|
|
11
|
+
export declare function getRuleSeverity(config: RuleConfig | undefined): Severity;
|
|
12
|
+
/** The rule's own settings, or `undefined` when only a state was given. */
|
|
13
|
+
export declare function getRuleSettings(config: RuleConfig | undefined): unknown;
|
|
14
|
+
/** Clears the state kept by rules that look for duplicates across files. */
|
|
15
|
+
export declare function resetRules(rules: RuleRegistry): void;
|
|
16
|
+
/**
|
|
17
|
+
* Runs every enabled rule against one feature file.
|
|
18
|
+
*
|
|
19
|
+
* Rules are awaited one at a time. Most return an array outright, in which
|
|
20
|
+
* case awaiting costs nothing; a rule that needs to wait for something can
|
|
21
|
+
* return a promise instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare function runEnabledRules(feature: Feature | undefined, file: FeatureFile, configuration: Configuration, rules: RuleRegistry): Promise<RuleError[]>;
|
|
24
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAEX,UAAU,EACV,SAAS,EACT,YAAY,EACZ,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AA4ChD;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,mBAAmB,GAAE,SAAS,MAAM,EAAO,GAC1C,OAAO,CAAC,YAAY,CAAC,CAavB;AAOD,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAGrE;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,CAExE;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEvE;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAIpD;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,SAAS,EAAE,CAAC,CAiBtB"}
|