chaffjs 0.50.0 → 0.52.0
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/README.ja.md +30 -3
- package/README.md +30 -2
- package/dist/allow.d.ts +49 -0
- package/dist/allow.d.ts.map +1 -0
- package/dist/allow.js +111 -0
- package/dist/allow.js.map +1 -0
- package/dist/check-source.d.ts +13 -3
- package/dist/check-source.d.ts.map +1 -1
- package/dist/check-source.js +23 -6
- package/dist/check-source.js.map +1 -1
- package/dist/clause-particles.d.ts +10 -2
- package/dist/clause-particles.d.ts.map +1 -1
- package/dist/clause-particles.js +15 -3
- package/dist/clause-particles.js.map +1 -1
- package/dist/cli-text.d.ts +7 -1
- package/dist/cli-text.d.ts.map +1 -1
- package/dist/cli-text.js +8 -2
- package/dist/cli-text.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/eval.js +1 -1
- package/dist/commands/eval.js.map +1 -1
- package/dist/commands/suppressions.d.ts +4 -1
- package/dist/commands/suppressions.d.ts.map +1 -1
- package/dist/commands/suppressions.js +2 -2
- package/dist/commands/suppressions.js.map +1 -1
- package/dist/commands/test.js +1 -1
- package/dist/commands/test.js.map +1 -1
- package/dist/compound-head.d.ts +5 -2
- package/dist/compound-head.d.ts.map +1 -1
- package/dist/compound-head.js +17 -8
- package/dist/compound-head.js.map +1 -1
- package/dist/config/allow-problems.d.ts +8 -0
- package/dist/config/allow-problems.d.ts.map +1 -0
- package/dist/config/allow-problems.js +61 -0
- package/dist/config/allow-problems.js.map +1 -0
- package/dist/config/by-path-problems.d.ts +3 -0
- package/dist/config/by-path-problems.d.ts.map +1 -1
- package/dist/config/by-path-problems.js +21 -2
- package/dist/config/by-path-problems.js.map +1 -1
- package/dist/config/by-path-rules.d.ts +34 -0
- package/dist/config/by-path-rules.d.ts.map +1 -0
- package/dist/config/by-path-rules.js +53 -0
- package/dist/config/by-path-rules.js.map +1 -0
- package/dist/config/by-path.d.ts +15 -0
- package/dist/config/by-path.d.ts.map +1 -1
- package/dist/config/by-path.js.map +1 -1
- package/dist/config/consistent-problems.d.ts +5 -0
- package/dist/config/consistent-problems.d.ts.map +1 -0
- package/dist/config/consistent-problems.js +24 -0
- package/dist/config/consistent-problems.js.map +1 -0
- package/dist/config/load.d.ts +23 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +63 -10
- package/dist/config/load.js.map +1 -1
- package/dist/config/option-problems.d.ts +6 -4
- package/dist/config/option-problems.d.ts.map +1 -1
- package/dist/config/option-problems.js +5 -2
- package/dist/config/option-problems.js.map +1 -1
- package/dist/config/prefer-problems.d.ts +5 -0
- package/dist/config/prefer-problems.d.ts.map +1 -0
- package/dist/config/prefer-problems.js +15 -0
- package/dist/config/prefer-problems.js.map +1 -0
- package/dist/config/prefer.d.ts +21 -0
- package/dist/config/prefer.d.ts.map +1 -0
- package/dist/config/prefer.js +35 -0
- package/dist/config/prefer.js.map +1 -0
- package/dist/config/term-problems.d.ts +5 -0
- package/dist/config/term-problems.d.ts.map +1 -0
- package/dist/config/term-problems.js +25 -0
- package/dist/config/term-problems.js.map +1 -0
- package/dist/config/warnings.d.ts +1 -1
- package/dist/config/warnings.d.ts.map +1 -1
- package/dist/config/warnings.js +9 -2
- package/dist/config/warnings.js.map +1 -1
- package/dist/cross-variants.d.ts +1 -1
- package/dist/cross-variants.d.ts.map +1 -1
- package/dist/cross-variants.js +4 -8
- package/dist/cross-variants.js.map +1 -1
- package/dist/cross-votes.d.ts +13 -0
- package/dist/cross-votes.d.ts.map +1 -1
- package/dist/cross-votes.js +25 -2
- package/dist/cross-votes.js.map +1 -1
- package/dist/custom/parse.d.ts +9 -0
- package/dist/custom/parse.d.ts.map +1 -1
- package/dist/custom/parse.js +11 -2
- package/dist/custom/parse.js.map +1 -1
- package/dist/custom/problems.d.ts.map +1 -1
- package/dist/custom/problems.js +9 -3
- package/dist/custom/problems.js.map +1 -1
- package/dist/custom/scope-field.d.ts +7 -0
- package/dist/custom/scope-field.d.ts.map +1 -0
- package/dist/custom/scope-field.js +14 -0
- package/dist/custom/scope-field.js.map +1 -0
- package/dist/date-format.d.ts +5 -3
- package/dist/date-format.d.ts.map +1 -1
- package/dist/date-format.js +30 -5
- package/dist/date-format.js.map +1 -1
- package/dist/derived/elapsed.d.ts +4 -1
- package/dist/derived/elapsed.d.ts.map +1 -1
- package/dist/derived/elapsed.js +11 -1
- package/dist/derived/elapsed.js.map +1 -1
- package/dist/detectors/acronym-context.d.ts +3 -1
- package/dist/detectors/acronym-context.d.ts.map +1 -1
- package/dist/detectors/acronym-context.js +7 -1
- package/dist/detectors/acronym-context.js.map +1 -1
- package/dist/detectors/acronym-gloss.d.ts +20 -7
- package/dist/detectors/acronym-gloss.d.ts.map +1 -1
- package/dist/detectors/acronym-gloss.js +50 -13
- package/dist/detectors/acronym-gloss.js.map +1 -1
- package/dist/detectors/address-blank.d.ts +14 -0
- package/dist/detectors/address-blank.d.ts.map +1 -0
- package/dist/detectors/address-blank.js +41 -0
- package/dist/detectors/address-blank.js.map +1 -0
- package/dist/detectors/bare-comparative.d.ts +4 -0
- package/dist/detectors/bare-comparative.d.ts.map +1 -1
- package/dist/detectors/bare-comparative.js +27 -3
- package/dist/detectors/bare-comparative.js.map +1 -1
- package/dist/detectors/blank-structure.d.ts +5 -1
- package/dist/detectors/blank-structure.d.ts.map +1 -1
- package/dist/detectors/blank-structure.js +13 -7
- package/dist/detectors/blank-structure.js.map +1 -1
- package/dist/detectors/bold-emphasis-form.d.ts +1 -0
- package/dist/detectors/bold-emphasis-form.d.ts.map +1 -1
- package/dist/detectors/bold-emphasis-form.js +7 -1
- package/dist/detectors/bold-emphasis-form.js.map +1 -1
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +12 -6
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/bracket-title-date.d.ts +6 -0
- package/dist/detectors/bracket-title-date.d.ts.map +1 -0
- package/dist/detectors/bracket-title-date.js +29 -0
- package/dist/detectors/bracket-title-date.js.map +1 -0
- package/dist/detectors/broken-link.d.ts.map +1 -1
- package/dist/detectors/broken-link.js +12 -1
- package/dist/detectors/broken-link.js.map +1 -1
- package/dist/detectors/capitalised-term.d.ts.map +1 -1
- package/dist/detectors/capitalised-term.js +24 -11
- package/dist/detectors/capitalised-term.js.map +1 -1
- package/dist/detectors/change-rate.d.ts.map +1 -1
- package/dist/detectors/change-rate.js +27 -4
- package/dist/detectors/change-rate.js.map +1 -1
- package/dist/detectors/char-shape.d.ts.map +1 -1
- package/dist/detectors/char-shape.js +15 -21
- package/dist/detectors/char-shape.js.map +1 -1
- package/dist/detectors/clause-shape.d.ts +4 -2
- package/dist/detectors/clause-shape.d.ts.map +1 -1
- package/dist/detectors/clause-shape.js +8 -4
- package/dist/detectors/clause-shape.js.map +1 -1
- package/dist/detectors/closing-cliche.d.ts +1 -1
- package/dist/detectors/closing-cliche.d.ts.map +1 -1
- package/dist/detectors/closing-cliche.js +16 -3
- package/dist/detectors/closing-cliche.js.map +1 -1
- package/dist/detectors/contraction-mix.d.ts.map +1 -1
- package/dist/detectors/contraction-mix.js +6 -3
- package/dist/detectors/contraction-mix.js.map +1 -1
- package/dist/detectors/contraction-set-apart.d.ts +7 -1
- package/dist/detectors/contraction-set-apart.d.ts.map +1 -1
- package/dist/detectors/contraction-set-apart.js +14 -1
- package/dist/detectors/contraction-set-apart.js.map +1 -1
- package/dist/detectors/coordinate-adjective.d.ts +5 -3
- package/dist/detectors/coordinate-adjective.d.ts.map +1 -1
- package/dist/detectors/coordinate-adjective.js +49 -1
- package/dist/detectors/coordinate-adjective.js.map +1 -1
- package/dist/detectors/count-per-section.d.ts.map +1 -1
- package/dist/detectors/count-per-section.js +29 -23
- package/dist/detectors/count-per-section.js.map +1 -1
- package/dist/detectors/counter-edge.d.ts +11 -0
- package/dist/detectors/counter-edge.d.ts.map +1 -1
- package/dist/detectors/counter-edge.js +17 -0
- package/dist/detectors/counter-edge.js.map +1 -1
- package/dist/detectors/cross-variant.d.ts.map +1 -1
- package/dist/detectors/cross-variant.js +14 -2
- package/dist/detectors/cross-variant.js.map +1 -1
- package/dist/detectors/currency-notation.d.ts.map +1 -1
- package/dist/detectors/currency-notation.js +9 -1
- package/dist/detectors/currency-notation.js.map +1 -1
- package/dist/detectors/custom.d.ts.map +1 -1
- package/dist/detectors/custom.js +6 -4
- package/dist/detectors/custom.js.map +1 -1
- package/dist/detectors/date-format.js +1 -1
- package/dist/detectors/date-format.js.map +1 -1
- package/dist/detectors/date-repeated-day.d.ts +11 -0
- package/dist/detectors/date-repeated-day.d.ts.map +1 -0
- package/dist/detectors/date-repeated-day.js +15 -0
- package/dist/detectors/date-repeated-day.js.map +1 -0
- package/dist/detectors/date-year.d.ts.map +1 -1
- package/dist/detectors/date-year.js +8 -1
- package/dist/detectors/date-year.js.map +1 -1
- package/dist/detectors/defined-term-form.d.ts.map +1 -1
- package/dist/detectors/defined-term-form.js +6 -3
- package/dist/detectors/defined-term-form.js.map +1 -1
- package/dist/detectors/definition-use.d.ts.map +1 -1
- package/dist/detectors/definition-use.js +8 -1
- package/dist/detectors/definition-use.js.map +1 -1
- package/dist/detectors/derived-numbers.d.ts.map +1 -1
- package/dist/detectors/derived-numbers.js +1 -0
- package/dist/detectors/derived-numbers.js.map +1 -1
- package/dist/detectors/document-shape.d.ts +1 -1
- package/dist/detectors/document-shape.d.ts.map +1 -1
- package/dist/detectors/document-shape.js +4 -1
- package/dist/detectors/document-shape.js.map +1 -1
- package/dist/detectors/email-letter.d.ts +3 -1
- package/dist/detectors/email-letter.d.ts.map +1 -1
- package/dist/detectors/email-letter.js +4 -2
- package/dist/detectors/email-letter.js.map +1 -1
- package/dist/detectors/empty-section.d.ts +1 -0
- package/dist/detectors/empty-section.d.ts.map +1 -1
- package/dist/detectors/empty-section.js +10 -1
- package/dist/detectors/empty-section.js.map +1 -1
- package/dist/detectors/en-shape.d.ts.map +1 -1
- package/dist/detectors/en-shape.js +27 -2
- package/dist/detectors/en-shape.js.map +1 -1
- package/dist/detectors/enumeration-marker.d.ts +7 -0
- package/dist/detectors/enumeration-marker.d.ts.map +1 -0
- package/dist/detectors/enumeration-marker.js +8 -0
- package/dist/detectors/enumeration-marker.js.map +1 -0
- package/dist/detectors/event-title-item.d.ts +8 -0
- package/dist/detectors/event-title-item.d.ts.map +1 -0
- package/dist/detectors/event-title-item.js +45 -0
- package/dist/detectors/event-title-item.js.map +1 -0
- package/dist/detectors/example-baseline.d.ts +5 -0
- package/dist/detectors/example-baseline.d.ts.map +1 -1
- package/dist/detectors/example-baseline.js +15 -1
- package/dist/detectors/example-baseline.js.map +1 -1
- package/dist/detectors/filler-word.d.ts +11 -0
- package/dist/detectors/filler-word.d.ts.map +1 -0
- package/dist/detectors/filler-word.js +73 -0
- package/dist/detectors/filler-word.js.map +1 -0
- package/dist/detectors/fullwidth-alnum.d.ts.map +1 -1
- package/dist/detectors/fullwidth-alnum.js +19 -0
- package/dist/detectors/fullwidth-alnum.js.map +1 -1
- package/dist/detectors/gram-ending.d.ts +12 -0
- package/dist/detectors/gram-ending.d.ts.map +1 -0
- package/dist/detectors/gram-ending.js +27 -0
- package/dist/detectors/gram-ending.js.map +1 -0
- package/dist/detectors/gram-repetition.d.ts.map +1 -1
- package/dist/detectors/gram-repetition.js +19 -3
- package/dist/detectors/gram-repetition.js.map +1 -1
- package/dist/detectors/heading-case.d.ts.map +1 -1
- package/dist/detectors/heading-case.js +6 -1
- package/dist/detectors/heading-case.js.map +1 -1
- package/dist/detectors/heading-marker-no-space.d.ts +3 -0
- package/dist/detectors/heading-marker-no-space.d.ts.map +1 -0
- package/dist/detectors/heading-marker-no-space.js +49 -0
- package/dist/detectors/heading-marker-no-space.js.map +1 -0
- package/dist/detectors/hyphen-name-suffix.d.ts.map +1 -1
- package/dist/detectors/hyphen-name-suffix.js +3 -2
- package/dist/detectors/hyphen-name-suffix.js.map +1 -1
- package/dist/detectors/inline-item-label.d.ts +6 -0
- package/dist/detectors/inline-item-label.d.ts.map +1 -0
- package/dist/detectors/inline-item-label.js +79 -0
- package/dist/detectors/inline-item-label.js.map +1 -0
- package/dist/detectors/kanji-name-edge.d.ts +5 -0
- package/dist/detectors/kanji-name-edge.d.ts.map +1 -1
- package/dist/detectors/kanji-name-edge.js +9 -0
- package/dist/detectors/kanji-name-edge.js.map +1 -1
- package/dist/detectors/kanji-run-pieces.d.ts +21 -6
- package/dist/detectors/kanji-run-pieces.d.ts.map +1 -1
- package/dist/detectors/kanji-run-pieces.js +23 -8
- package/dist/detectors/kanji-run-pieces.js.map +1 -1
- package/dist/detectors/known-correction.d.ts.map +1 -1
- package/dist/detectors/known-correction.js +13 -1
- package/dist/detectors/known-correction.js.map +1 -1
- package/dist/detectors/link-definition.d.ts +3 -0
- package/dist/detectors/link-definition.d.ts.map +1 -0
- package/dist/detectors/link-definition.js +78 -0
- package/dist/detectors/link-definition.js.map +1 -0
- package/dist/detectors/list-item-asides.d.ts +7 -0
- package/dist/detectors/list-item-asides.d.ts.map +1 -0
- package/dist/detectors/list-item-asides.js +25 -0
- package/dist/detectors/list-item-asides.js.map +1 -0
- package/dist/detectors/list-item-own.d.ts +11 -0
- package/dist/detectors/list-item-own.d.ts.map +1 -0
- package/dist/detectors/list-item-own.js +31 -0
- package/dist/detectors/list-item-own.js.map +1 -0
- package/dist/detectors/list-item-phrase.d.ts +1 -1
- package/dist/detectors/list-item-phrase.d.ts.map +1 -1
- package/dist/detectors/list-item-phrase.js +18 -7
- package/dist/detectors/list-item-phrase.js.map +1 -1
- package/dist/detectors/list-item.d.ts +2 -0
- package/dist/detectors/list-item.d.ts.map +1 -1
- package/dist/detectors/list-item.js +6 -0
- package/dist/detectors/list-item.js.map +1 -1
- package/dist/detectors/list-items.d.ts.map +1 -1
- package/dist/detectors/list-items.js +12 -3
- package/dist/detectors/list-items.js.map +1 -1
- package/dist/detectors/list-joint.d.ts +6 -0
- package/dist/detectors/list-joint.d.ts.map +1 -1
- package/dist/detectors/list-joint.js +18 -2
- package/dist/detectors/list-joint.js.map +1 -1
- package/dist/detectors/list-opening-conjunction.d.ts +7 -0
- package/dist/detectors/list-opening-conjunction.d.ts.map +1 -0
- package/dist/detectors/list-opening-conjunction.js +22 -0
- package/dist/detectors/list-opening-conjunction.js.map +1 -0
- package/dist/detectors/list-parallel.d.ts +3 -8
- package/dist/detectors/list-parallel.d.ts.map +1 -1
- package/dist/detectors/list-parallel.js +29 -46
- package/dist/detectors/list-parallel.js.map +1 -1
- package/dist/detectors/list-run.d.ts.map +1 -1
- package/dist/detectors/list-run.js +15 -3
- package/dist/detectors/list-run.js.map +1 -1
- package/dist/detectors/list-verb-series.d.ts +6 -0
- package/dist/detectors/list-verb-series.d.ts.map +1 -0
- package/dist/detectors/list-verb-series.js +20 -0
- package/dist/detectors/list-verb-series.js.map +1 -0
- package/dist/detectors/mark-shape.d.ts +5 -2
- package/dist/detectors/mark-shape.d.ts.map +1 -1
- package/dist/detectors/mark-shape.js +12 -15
- package/dist/detectors/mark-shape.js.map +1 -1
- package/dist/detectors/markdown-slip.d.ts +5 -0
- package/dist/detectors/markdown-slip.d.ts.map +1 -1
- package/dist/detectors/markdown-slip.js +23 -0
- package/dist/detectors/markdown-slip.js.map +1 -1
- package/dist/detectors/marked-word.d.ts +10 -0
- package/dist/detectors/marked-word.d.ts.map +1 -0
- package/dist/detectors/marked-word.js +30 -0
- package/dist/detectors/marked-word.js.map +1 -0
- package/dist/detectors/middle-dot.d.ts +1 -1
- package/dist/detectors/middle-dot.d.ts.map +1 -1
- package/dist/detectors/middle-dot.js +21 -2
- package/dist/detectors/middle-dot.js.map +1 -1
- package/dist/detectors/missing-final-period.d.ts.map +1 -1
- package/dist/detectors/missing-final-period.js +8 -1
- package/dist/detectors/missing-final-period.js.map +1 -1
- package/dist/detectors/name-variant-two-things.d.ts +2 -1
- package/dist/detectors/name-variant-two-things.d.ts.map +1 -1
- package/dist/detectors/name-variant-two-things.js +30 -2
- package/dist/detectors/name-variant-two-things.js.map +1 -1
- package/dist/detectors/net-amount-mismatch.d.ts.map +1 -1
- package/dist/detectors/net-amount-mismatch.js +26 -4
- package/dist/detectors/net-amount-mismatch.js.map +1 -1
- package/dist/detectors/nominalization.d.ts.map +1 -1
- package/dist/detectors/nominalization.js +6 -1
- package/dist/detectors/nominalization.js.map +1 -1
- package/dist/detectors/number-style.d.ts +2 -0
- package/dist/detectors/number-style.d.ts.map +1 -1
- package/dist/detectors/number-style.js +5 -0
- package/dist/detectors/number-style.js.map +1 -1
- package/dist/detectors/open-end-scope.d.ts.map +1 -1
- package/dist/detectors/open-end-scope.js +2 -2
- package/dist/detectors/open-end-scope.js.map +1 -1
- package/dist/detectors/ordinary-phrase.d.ts +5 -0
- package/dist/detectors/ordinary-phrase.d.ts.map +1 -1
- package/dist/detectors/ordinary-phrase.js +12 -0
- package/dist/detectors/ordinary-phrase.js.map +1 -1
- package/dist/detectors/organisation-run.d.ts +2 -0
- package/dist/detectors/organisation-run.d.ts.map +1 -1
- package/dist/detectors/organisation-run.js +7 -0
- package/dist/detectors/organisation-run.js.map +1 -1
- package/dist/detectors/orthographic-variant-kanji-word.d.ts +22 -0
- package/dist/detectors/orthographic-variant-kanji-word.d.ts.map +1 -0
- package/dist/detectors/orthographic-variant-kanji-word.js +27 -0
- package/dist/detectors/orthographic-variant-kanji-word.js.map +1 -0
- package/dist/detectors/orthographic-variant-open.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant-open.js +2 -1
- package/dist/detectors/orthographic-variant-open.js.map +1 -1
- package/dist/detectors/orthographic-variant-text.d.ts +7 -0
- package/dist/detectors/orthographic-variant-text.d.ts.map +1 -0
- package/dist/detectors/orthographic-variant-text.js +14 -0
- package/dist/detectors/orthographic-variant-text.js.map +1 -0
- package/dist/detectors/orthographic-variant.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant.js +22 -23
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +12 -2
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/oxford-comma.d.ts.map +1 -1
- package/dist/detectors/oxford-comma.js +16 -4
- package/dist/detectors/oxford-comma.js.map +1 -1
- package/dist/detectors/paragraph-run.d.ts +1 -1
- package/dist/detectors/paragraph-run.d.ts.map +1 -1
- package/dist/detectors/paragraph-run.js +4 -2
- package/dist/detectors/paragraph-run.js.map +1 -1
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +12 -4
- package/dist/detectors/placeholder-text.js.map +1 -1
- package/dist/detectors/placeholder.d.ts +1 -0
- package/dist/detectors/placeholder.d.ts.map +1 -1
- package/dist/detectors/placeholder.js +8 -0
- package/dist/detectors/placeholder.js.map +1 -1
- package/dist/detectors/pseudo-heading.d.ts +11 -0
- package/dist/detectors/pseudo-heading.d.ts.map +1 -0
- package/dist/detectors/pseudo-heading.js +115 -0
- package/dist/detectors/pseudo-heading.js.map +1 -0
- package/dist/detectors/quote-around.d.ts +1 -1
- package/dist/detectors/quote-around.d.ts.map +1 -1
- package/dist/detectors/quote-around.js +26 -5
- package/dist/detectors/quote-around.js.map +1 -1
- package/dist/detectors/quoted-label.d.ts +8 -0
- package/dist/detectors/quoted-label.d.ts.map +1 -0
- package/dist/detectors/quoted-label.js +18 -0
- package/dist/detectors/quoted-label.js.map +1 -0
- package/dist/detectors/ra-nuki.d.ts +1 -7
- package/dist/detectors/ra-nuki.d.ts.map +1 -1
- package/dist/detectors/ra-nuki.js +2 -27
- package/dist/detectors/ra-nuki.js.map +1 -1
- package/dist/detectors/register-label-note.d.ts +8 -0
- package/dist/detectors/register-label-note.d.ts.map +1 -0
- package/dist/detectors/register-label-note.js +31 -0
- package/dist/detectors/register-label-note.js.map +1 -0
- package/dist/detectors/register-required.d.ts +27 -0
- package/dist/detectors/register-required.d.ts.map +1 -0
- package/dist/detectors/register-required.js +33 -0
- package/dist/detectors/register-required.js.map +1 -0
- package/dist/detectors/register-voice.d.ts +13 -1
- package/dist/detectors/register-voice.d.ts.map +1 -1
- package/dist/detectors/register-voice.js +27 -0
- package/dist/detectors/register-voice.js.map +1 -1
- package/dist/detectors/registry/enumeration-marker.d.ts +3 -0
- package/dist/detectors/registry/enumeration-marker.d.ts.map +1 -0
- package/dist/detectors/registry/enumeration-marker.js +3 -0
- package/dist/detectors/registry/enumeration-marker.js.map +1 -0
- package/dist/detectors/registry/filler-word.d.ts +3 -0
- package/dist/detectors/registry/filler-word.d.ts.map +1 -0
- package/dist/detectors/registry/filler-word.js +3 -0
- package/dist/detectors/registry/filler-word.js.map +1 -0
- package/dist/detectors/registry/heading-marker-no-space.d.ts +3 -0
- package/dist/detectors/registry/heading-marker-no-space.d.ts.map +1 -0
- package/dist/detectors/registry/heading-marker-no-space.js +3 -0
- package/dist/detectors/registry/heading-marker-no-space.js.map +1 -0
- package/dist/detectors/registry/link-definition-unused.d.ts +3 -0
- package/dist/detectors/registry/link-definition-unused.d.ts.map +1 -0
- package/dist/detectors/registry/link-definition-unused.js +3 -0
- package/dist/detectors/registry/link-definition-unused.js.map +1 -0
- package/dist/detectors/registry/pseudo-heading.d.ts +3 -0
- package/dist/detectors/registry/pseudo-heading.d.ts.map +1 -0
- package/dist/detectors/registry/pseudo-heading.js +3 -0
- package/dist/detectors/registry/pseudo-heading.js.map +1 -0
- package/dist/detectors/registry/reversed-link.d.ts +3 -0
- package/dist/detectors/registry/reversed-link.d.ts.map +1 -0
- package/dist/detectors/registry/reversed-link.js +3 -0
- package/dist/detectors/registry/reversed-link.js.map +1 -0
- package/dist/detectors/registry/sa-ire.d.ts +3 -0
- package/dist/detectors/registry/sa-ire.d.ts.map +1 -0
- package/dist/detectors/registry/sa-ire.js +3 -0
- package/dist/detectors/registry/sa-ire.js.map +1 -0
- package/dist/detectors/registry/table-absorbed-line.d.ts +3 -0
- package/dist/detectors/registry/table-absorbed-line.d.ts.map +1 -0
- package/dist/detectors/registry/table-absorbed-line.js +3 -0
- package/dist/detectors/registry/table-absorbed-line.js.map +1 -0
- package/dist/detectors/registry/term-consistency.d.ts +3 -0
- package/dist/detectors/registry/term-consistency.d.ts.map +1 -0
- package/dist/detectors/registry/term-consistency.js +3 -0
- package/dist/detectors/registry/term-consistency.js.map +1 -0
- package/dist/detectors/registry/term-form.d.ts +3 -0
- package/dist/detectors/registry/term-form.d.ts.map +1 -0
- package/dist/detectors/registry/term-form.js +3 -0
- package/dist/detectors/registry/term-form.js.map +1 -0
- package/dist/detectors/relative-pronoun-mix.d.ts +1 -1
- package/dist/detectors/relative-pronoun-mix.d.ts.map +1 -1
- package/dist/detectors/relative-pronoun-mix.js +14 -3
- package/dist/detectors/relative-pronoun-mix.js.map +1 -1
- package/dist/detectors/release-notes.d.ts +7 -0
- package/dist/detectors/release-notes.d.ts.map +1 -0
- package/dist/detectors/release-notes.js +12 -0
- package/dist/detectors/release-notes.js.map +1 -0
- package/dist/detectors/request-owner.d.ts +5 -1
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +53 -1
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/reversed-link.d.ts +3 -0
- package/dist/detectors/reversed-link.d.ts.map +1 -0
- package/dist/detectors/reversed-link.js +31 -0
- package/dist/detectors/reversed-link.js.map +1 -0
- package/dist/detectors/run-in-title.d.ts +6 -0
- package/dist/detectors/run-in-title.d.ts.map +1 -0
- package/dist/detectors/run-in-title.js +32 -0
- package/dist/detectors/run-in-title.js.map +1 -0
- package/dist/detectors/sa-ire.d.ts +3 -0
- package/dist/detectors/sa-ire.d.ts.map +1 -0
- package/dist/detectors/sa-ire.js +5 -0
- package/dist/detectors/sa-ire.js.map +1 -0
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +19 -6
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +40 -12
- package/dist/detectors/sentence-ending.js.map +1 -1
- package/dist/detectors/sentence-length.d.ts.map +1 -1
- package/dist/detectors/sentence-length.js +23 -4
- package/dist/detectors/sentence-length.js.map +1 -1
- package/dist/detectors/sentence-rhythm.d.ts.map +1 -1
- package/dist/detectors/sentence-rhythm.js +6 -2
- package/dist/detectors/sentence-rhythm.js.map +1 -1
- package/dist/detectors/signals.js +2 -2
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/structure.d.ts +1 -0
- package/dist/detectors/structure.d.ts.map +1 -1
- package/dist/detectors/structure.js +5 -0
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/technical-docs.d.ts +8 -1
- package/dist/detectors/technical-docs.d.ts.map +1 -1
- package/dist/detectors/technical-docs.js +41 -9
- package/dist/detectors/technical-docs.js.map +1 -1
- package/dist/detectors/term-consistency.d.ts +4 -0
- package/dist/detectors/term-consistency.d.ts.map +1 -0
- package/dist/detectors/term-consistency.js +35 -0
- package/dist/detectors/term-consistency.js.map +1 -0
- package/dist/detectors/term-form.d.ts +4 -0
- package/dist/detectors/term-form.d.ts.map +1 -0
- package/dist/detectors/term-form.js +17 -0
- package/dist/detectors/term-form.js.map +1 -0
- package/dist/detectors/token-shape.d.ts.map +1 -1
- package/dist/detectors/token-shape.js +8 -4
- package/dist/detectors/token-shape.js.map +1 -1
- package/dist/detectors/unbalanced-bracket.d.ts +1 -1
- package/dist/detectors/unbalanced-bracket.d.ts.map +1 -1
- package/dist/detectors/unbalanced-bracket.js +4 -2
- package/dist/detectors/unbalanced-bracket.js.map +1 -1
- package/dist/detectors/unfilled-placeholder.d.ts.map +1 -1
- package/dist/detectors/unfilled-placeholder.js +11 -1
- package/dist/detectors/unfilled-placeholder.js.map +1 -1
- package/dist/detectors/unknown-word-context.d.ts +2 -0
- package/dist/detectors/unknown-word-context.d.ts.map +1 -1
- package/dist/detectors/unknown-word-context.js +3 -0
- package/dist/detectors/unknown-word-context.js.map +1 -1
- package/dist/detectors/unknown-word.d.ts.map +1 -1
- package/dist/detectors/unknown-word.js +7 -2
- package/dist/detectors/unknown-word.js.map +1 -1
- package/dist/detectors/vague-density.d.ts.map +1 -1
- package/dist/detectors/vague-density.js +10 -2
- package/dist/detectors/vague-density.js.map +1 -1
- package/dist/detectors/version-mismatch.d.ts.map +1 -1
- package/dist/detectors/version-mismatch.js +5 -1
- package/dist/detectors/version-mismatch.js.map +1 -1
- package/dist/detectors/weasel-word.d.ts.map +1 -1
- package/dist/detectors/weasel-word.js +11 -2
- package/dist/detectors/weasel-word.js.map +1 -1
- package/dist/document-prose.d.ts +17 -0
- package/dist/document-prose.d.ts.map +1 -0
- package/dist/document-prose.js +35 -0
- package/dist/document-prose.js.map +1 -0
- package/dist/document-scope.d.ts +16 -0
- package/dist/document-scope.d.ts.map +1 -0
- package/dist/document-scope.js +51 -0
- package/dist/document-scope.js.map +1 -0
- package/dist/document.d.ts +10 -1
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +26 -37
- package/dist/document.js.map +1 -1
- package/dist/enumeration-marks.d.ts +23 -0
- package/dist/enumeration-marks.d.ts.map +1 -0
- package/dist/enumeration-marks.js +184 -0
- package/dist/enumeration-marks.js.map +1 -0
- package/dist/facts/cross-facts.d.ts +1 -1
- package/dist/facts/cross-facts.d.ts.map +1 -1
- package/dist/facts/cross-facts.js +8 -3
- package/dist/facts/cross-facts.js.map +1 -1
- package/dist/facts/labelled-facts.d.ts.map +1 -1
- package/dist/facts/labelled-facts.js +7 -4
- package/dist/facts/labelled-facts.js.map +1 -1
- package/dist/file-header.d.ts +2 -6
- package/dist/file-header.d.ts.map +1 -1
- package/dist/file-header.js +1 -1
- package/dist/file-header.js.map +1 -1
- package/dist/files.d.ts +18 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +58 -8
- package/dist/files.js.map +1 -1
- package/dist/gitignore.d.ts +30 -0
- package/dist/gitignore.d.ts.map +1 -0
- package/dist/gitignore.js +68 -0
- package/dist/gitignore.js.map +1 -0
- package/dist/grade/stamp.d.ts.map +1 -1
- package/dist/grade/stamp.js +5 -0
- package/dist/grade/stamp.js.map +1 -1
- package/dist/latin-word-boundary.d.ts +5 -0
- package/dist/latin-word-boundary.d.ts.map +1 -1
- package/dist/latin-word-boundary.js +11 -0
- package/dist/latin-word-boundary.js.map +1 -1
- package/dist/markdown-node.d.ts +1 -0
- package/dist/markdown-node.d.ts.map +1 -1
- package/dist/markdown-node.js.map +1 -1
- package/dist/name-separator.d.ts.map +1 -1
- package/dist/name-separator.js +27 -5
- package/dist/name-separator.js.map +1 -1
- package/dist/news-dateline.d.ts +7 -0
- package/dist/news-dateline.d.ts.map +1 -0
- package/dist/news-dateline.js +24 -0
- package/dist/news-dateline.js.map +1 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/reasons.d.ts +4 -0
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +4 -0
- package/dist/reasons.js.map +1 -1
- package/dist/render/explain.d.ts +3 -0
- package/dist/render/explain.d.ts.map +1 -1
- package/dist/render/explain.js +19 -1
- package/dist/render/explain.js.map +1 -1
- package/dist/render/rules-json.d.ts.map +1 -1
- package/dist/render/rules-json.js +12 -2
- package/dist/render/rules-json.js.map +1 -1
- package/dist/render/summary.d.ts +5 -2
- package/dist/render/summary.d.ts.map +1 -1
- package/dist/render/summary.js +25 -4
- package/dist/render/summary.js.map +1 -1
- package/dist/render/suppressions.d.ts +6 -1
- package/dist/render/suppressions.d.ts.map +1 -1
- package/dist/render/suppressions.js +76 -3
- package/dist/render/suppressions.js.map +1 -1
- package/dist/rule-load.d.ts.map +1 -1
- package/dist/rule-load.js +2 -1
- package/dist/rule-load.js.map +1 -1
- package/dist/run-in-title.d.ts +4 -0
- package/dist/run-in-title.d.ts.map +1 -0
- package/dist/run-in-title.js +82 -0
- package/dist/run-in-title.js.map +1 -0
- package/dist/run.d.ts +2 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +20 -8
- package/dist/run.js.map +1 -1
- package/dist/scope-markers.d.ts +9 -0
- package/dist/scope-markers.d.ts.map +1 -0
- package/dist/scope-markers.js +19 -0
- package/dist/scope-markers.js.map +1 -0
- package/dist/scope-problem-text.d.ts +4 -0
- package/dist/scope-problem-text.d.ts.map +1 -0
- package/dist/scope-problem-text.js +17 -0
- package/dist/scope-problem-text.js.map +1 -0
- package/dist/scoped-sentences.d.ts +21 -0
- package/dist/scoped-sentences.d.ts.map +1 -0
- package/dist/scoped-sentences.js +21 -0
- package/dist/scoped-sentences.js.map +1 -0
- package/dist/setting-problems.d.ts.map +1 -1
- package/dist/setting-problems.js +4 -0
- package/dist/setting-problems.js.map +1 -1
- package/dist/spelling.js +4 -4
- package/dist/spelling.js.map +1 -1
- package/dist/stet-body.d.ts +13 -0
- package/dist/stet-body.d.ts.map +1 -0
- package/dist/stet-body.js +49 -0
- package/dist/stet-body.js.map +1 -0
- package/dist/stet.d.ts +30 -4
- package/dist/stet.d.ts.map +1 -1
- package/dist/stet.js +78 -28
- package/dist/stet.js.map +1 -1
- package/dist/structure/alert-lines.d.ts +4 -0
- package/dist/structure/alert-lines.d.ts.map +1 -0
- package/dist/structure/alert-lines.js +19 -0
- package/dist/structure/alert-lines.js.map +1 -0
- package/dist/structure/catch-all-row-blank.d.ts +9 -0
- package/dist/structure/catch-all-row-blank.d.ts.map +1 -0
- package/dist/structure/catch-all-row-blank.js +19 -0
- package/dist/structure/catch-all-row-blank.js.map +1 -0
- package/dist/structure/change-rate-tied.d.ts +22 -0
- package/dist/structure/change-rate-tied.d.ts.map +1 -0
- package/dist/structure/change-rate-tied.js +85 -0
- package/dist/structure/change-rate-tied.js.map +1 -0
- package/dist/structure/cross-definitions.d.ts +1 -1
- package/dist/structure/cross-definitions.d.ts.map +1 -1
- package/dist/structure/cross-definitions.js +3 -9
- package/dist/structure/cross-definitions.js.map +1 -1
- package/dist/structure/defining-names.d.ts +1 -1
- package/dist/structure/defining-names.d.ts.map +1 -1
- package/dist/structure/defining-names.js +12 -1
- package/dist/structure/defining-names.js.map +1 -1
- package/dist/structure/definition-use.d.ts +5 -3
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +10 -2
- package/dist/structure/definition-use.js.map +1 -1
- package/dist/structure/forward-reference.d.ts +8 -0
- package/dist/structure/forward-reference.d.ts.map +1 -0
- package/dist/structure/forward-reference.js +18 -0
- package/dist/structure/forward-reference.js.map +1 -0
- package/dist/structure/net-amount.d.ts +16 -0
- package/dist/structure/net-amount.d.ts.map +1 -1
- package/dist/structure/net-amount.js +28 -1
- package/dist/structure/net-amount.js.map +1 -1
- package/dist/structure/period-label-conflict.d.ts +2 -2
- package/dist/structure/period-label-conflict.d.ts.map +1 -1
- package/dist/structure/period-label-conflict.js +17 -3
- package/dist/structure/period-label-conflict.js.map +1 -1
- package/dist/structure/serial-range.d.ts.map +1 -1
- package/dist/structure/serial-range.js +14 -6
- package/dist/structure/serial-range.js.map +1 -1
- package/dist/structure/version-mismatch.d.ts +6 -1
- package/dist/structure/version-mismatch.d.ts.map +1 -1
- package/dist/structure/version-mismatch.js +28 -6
- package/dist/structure/version-mismatch.js.map +1 -1
- package/dist/structure/weekday.d.ts.map +1 -1
- package/dist/structure/weekday.js +14 -1
- package/dist/structure/weekday.js.map +1 -1
- package/dist/table-cells.d.ts +1 -1
- package/dist/table-cells.d.ts.map +1 -1
- package/dist/table-cells.js.map +1 -1
- package/dist/term-form.d.ts +15 -0
- package/dist/term-form.d.ts.map +1 -0
- package/dist/term-form.js +72 -0
- package/dist/term-form.js.map +1 -0
- package/dist/term-groups.d.ts +33 -0
- package/dist/term-groups.d.ts.map +1 -0
- package/dist/term-groups.js +46 -0
- package/dist/term-groups.js.map +1 -0
- package/dist/text-scope.d.ts +35 -0
- package/dist/text-scope.d.ts.map +1 -0
- package/dist/text-scope.js +55 -0
- package/dist/text-scope.js.map +1 -0
- package/dist/topic-clause.d.ts.map +1 -1
- package/dist/topic-clause.js +103 -21
- package/dist/topic-clause.js.map +1 -1
- package/dist/unclosed-code-quote.d.ts +7 -0
- package/dist/unclosed-code-quote.d.ts.map +1 -0
- package/dist/unclosed-code-quote.js +37 -0
- package/dist/unclosed-code-quote.js.map +1 -0
- package/package.json +4 -3
- package/rules/adverb-overuse.yaml +2 -2
- package/rules/bold-density.yaml +2 -2
- package/rules/bold-emphasis.yaml +2 -2
- package/rules/bold-label-list.yaml +2 -2
- package/rules/bracket-width-consistency.yaml +2 -2
- package/rules/broken-link.yaml +2 -2
- package/rules/change-rate-mismatch.yaml +2 -2
- package/rules/closing-cliche.yaml +2 -2
- package/rules/code-fence-language-mix.yaml +2 -2
- package/rules/comparative-without-baseline.yaml +2 -2
- package/rules/contraction-consistency.yaml +3 -3
- package/rules/cross-doc-duplicate-definition.yaml +2 -2
- package/rules/cross-doc-fact-conflict.yaml +2 -2
- package/rules/cross-doc-term-variant.yaml +4 -4
- package/rules/date-format-consistency.yaml +2 -2
- package/rules/date-weekday-mismatch.yaml +2 -2
- package/rules/date-without-year.yaml +2 -2
- package/rules/defined-term-form.yaml +2 -2
- package/rules/elapsed-years-mismatch.yaml +2 -2
- package/rules/empty-section.yaml +2 -2
- package/rules/empty-table-cell.yaml +2 -2
- package/rules/enumeration-marker-mix.yaml +102 -0
- package/rules/expletive-construction.yaml +2 -2
- package/rules/filler-word.yaml +74 -0
- package/rules/fullwidth-alnum-consistency.yaml +2 -2
- package/rules/heading-marker-no-space.yaml +79 -0
- package/rules/hyphen-as-dash.yaml +2 -2
- package/rules/internal-jargon.yaml +1 -0
- package/rules/known-misspelling.yaml +2 -2
- package/rules/latin-spacing.yaml +4 -4
- package/rules/link-definition-unused.yaml +107 -0
- package/rules/list-item-form-mix.yaml +2 -2
- package/rules/max-kanji-continuous.yaml +8 -2
- package/rules/max-sentence-length.yaml +2 -2
- package/rules/missing-final-period.yaml +2 -2
- package/rules/name-variant.yaml +2 -2
- package/rules/net-amount-mismatch.yaml +5 -5
- package/rules/ngram-repetition.yaml +2 -2
- package/rules/no-doubled-joshi.yaml +2 -2
- package/rules/no-mixed-desumasu.yaml +62 -2
- package/rules/no-nakaguro-parallel.yaml +2 -2
- package/rules/nominalization.yaml +2 -2
- package/rules/number-style-consistency.yaml +2 -2
- package/rules/obligation-without-deadline.yaml +2 -2
- package/rules/one-sentence-paragraph-run.yaml +2 -2
- package/rules/orthographic-variant.yaml +2 -2
- package/rules/oxford-comma-consistency.yaml +2 -2
- package/rules/period-label-conflict.yaml +2 -2
- package/rules/preamble-length.yaml +2 -2
- package/rules/preferred-term.yaml +1 -0
- package/rules/pseudo-heading.yaml +79 -0
- package/rules/quote-without-source.yaml +2 -2
- package/rules/repeated-sentence-ending.yaml +2 -2
- package/rules/request-without-deadline.yaml +2 -2
- package/rules/reversed-link.yaml +78 -0
- package/rules/sa-ire.yaml +43 -0
- package/rules/sentence-rhythm.yaml +2 -2
- package/rules/serial-range-reversed.yaml +4 -4
- package/rules/shell-prompt-mix.yaml +2 -2
- package/rules/step-statement-mix.yaml +2 -2
- package/rules/table-absorbed-line.yaml +88 -0
- package/rules/teki-overuse.yaml +2 -2
- package/rules/term-consistency.yaml +56 -0
- package/rules/term-form.yaml +56 -0
- package/rules/title-case-consistency.yaml +4 -4
- package/rules/title-length.yaml +2 -2
- package/rules/topic-predicate-distance.yaml +2 -2
- package/rules/unbalanced-bracket.yaml +2 -2
- package/rules/undefined-acronym.yaml +4 -2
- package/rules/undefined-term.yaml +2 -2
- package/rules/unfilled-placeholder.yaml +2 -2
- package/rules/unknown-word.yaml +2 -2
- package/rules/use-before-definition.yaml +2 -2
- package/rules/vague-word-density.yaml +2 -2
- package/rules/version-mismatch.yaml +2 -2
- package/rules/weasel-word.yaml +3 -3
- package/rules/which-that-consistency.yaml +2 -2
- package/skills/chaff/SKILL.md +51 -7
- package/src/allow.ts +146 -0
- package/src/check-source.ts +33 -9
- package/src/clause-particles.ts +19 -3
- package/src/cli-text.ts +13 -4
- package/src/cli.ts +16 -15
- package/src/commands/eval.ts +1 -1
- package/src/commands/suppressions.ts +3 -3
- package/src/commands/test.ts +1 -1
- package/src/compound-head.ts +17 -8
- package/src/config/allow-problems.ts +75 -0
- package/src/config/by-path-problems.ts +29 -3
- package/src/config/by-path-rules.ts +78 -0
- package/src/config/by-path.ts +9 -0
- package/src/config/consistent-problems.ts +36 -0
- package/src/config/load.ts +87 -15
- package/src/config/option-problems.ts +8 -5
- package/src/config/prefer-problems.ts +22 -0
- package/src/config/prefer.ts +52 -0
- package/src/config/term-problems.ts +38 -0
- package/src/config/warnings.ts +9 -2
- package/src/cross-variants.ts +4 -7
- package/src/cross-votes.ts +35 -4
- package/src/custom/parse.ts +16 -3
- package/src/custom/problems.ts +9 -3
- package/src/custom/scope-field.ts +16 -0
- package/src/date-format.ts +43 -8
- package/src/derived/elapsed.ts +17 -2
- package/src/detectors/acronym-context.ts +7 -1
- package/src/detectors/acronym-gloss.ts +59 -11
- package/src/detectors/address-blank.ts +49 -0
- package/src/detectors/bare-comparative.ts +35 -3
- package/src/detectors/blank-structure.ts +18 -9
- package/src/detectors/bold-emphasis-form.ts +10 -1
- package/src/detectors/bold-label.ts +7 -2
- package/src/detectors/bracket-title-date.ts +36 -0
- package/src/detectors/broken-link.ts +14 -1
- package/src/detectors/capitalised-term.ts +18 -4
- package/src/detectors/change-rate.ts +29 -4
- package/src/detectors/char-shape.ts +19 -24
- package/src/detectors/clause-shape.ts +8 -4
- package/src/detectors/closing-cliche.ts +19 -2
- package/src/detectors/contraction-mix.ts +11 -3
- package/src/detectors/contraction-set-apart.ts +22 -2
- package/src/detectors/coordinate-adjective.ts +54 -1
- package/src/detectors/count-per-section.ts +13 -8
- package/src/detectors/counter-edge.ts +20 -0
- package/src/detectors/cross-variant.ts +16 -2
- package/src/detectors/currency-notation.ts +17 -6
- package/src/detectors/custom.ts +6 -4
- package/src/detectors/date-format.ts +1 -1
- package/src/detectors/date-repeated-day.ts +20 -0
- package/src/detectors/date-year.ts +8 -1
- package/src/detectors/defined-term-form.ts +6 -3
- package/src/detectors/definition-use.ts +8 -1
- package/src/detectors/derived-numbers.ts +1 -0
- package/src/detectors/document-shape.ts +4 -1
- package/src/detectors/email-letter.ts +6 -2
- package/src/detectors/empty-section.ts +10 -2
- package/src/detectors/en-shape.ts +31 -2
- package/src/detectors/enumeration-marker.ts +14 -0
- package/src/detectors/event-title-item.ts +57 -0
- package/src/detectors/example-baseline.ts +16 -1
- package/src/detectors/filler-word.ts +96 -0
- package/src/detectors/fullwidth-alnum.ts +24 -0
- package/src/detectors/gram-ending.ts +40 -0
- package/src/detectors/gram-repetition.ts +28 -4
- package/src/detectors/heading-case.ts +7 -1
- package/src/detectors/heading-marker-no-space.ts +62 -0
- package/src/detectors/hyphen-name-suffix.ts +3 -2
- package/src/detectors/inline-item-label.ts +113 -0
- package/src/detectors/kanji-name-edge.ts +11 -0
- package/src/detectors/kanji-run-pieces.ts +35 -8
- package/src/detectors/known-correction.ts +17 -1
- package/src/detectors/link-definition.ts +91 -0
- package/src/detectors/list-item-asides.ts +29 -0
- package/src/detectors/list-item-own.ts +38 -0
- package/src/detectors/list-item-phrase.ts +20 -8
- package/src/detectors/list-item.ts +7 -0
- package/src/detectors/list-items.ts +13 -2
- package/src/detectors/list-joint.ts +31 -2
- package/src/detectors/list-opening-conjunction.ts +22 -0
- package/src/detectors/list-parallel.ts +36 -53
- package/src/detectors/list-run.ts +16 -3
- package/src/detectors/list-verb-series.ts +24 -0
- package/src/detectors/mark-shape.ts +15 -19
- package/src/detectors/markdown-slip.ts +25 -1
- package/src/detectors/marked-word.ts +40 -0
- package/src/detectors/middle-dot.ts +27 -2
- package/src/detectors/missing-final-period.ts +9 -1
- package/src/detectors/name-variant-two-things.ts +37 -2
- package/src/detectors/net-amount-mismatch.ts +41 -4
- package/src/detectors/nominalization.ts +8 -1
- package/src/detectors/number-style.ts +8 -0
- package/src/detectors/open-end-scope.ts +3 -2
- package/src/detectors/ordinary-phrase.ts +13 -0
- package/src/detectors/organisation-run.ts +9 -0
- package/src/detectors/orthographic-variant-kanji-word.ts +33 -0
- package/src/detectors/orthographic-variant-open.ts +2 -1
- package/src/detectors/orthographic-variant-text.ts +20 -0
- package/src/detectors/orthographic-variant.ts +25 -32
- package/src/detectors/orthography.ts +18 -2
- package/src/detectors/oxford-comma.ts +16 -3
- package/src/detectors/paragraph-run.ts +7 -10
- package/src/detectors/placeholder-text.ts +22 -5
- package/src/detectors/placeholder.ts +10 -0
- package/src/detectors/pseudo-heading.ts +131 -0
- package/src/detectors/quote-around.ts +31 -6
- package/src/detectors/quoted-label.ts +22 -0
- package/src/detectors/ra-nuki.ts +3 -34
- package/src/detectors/register-label-note.ts +37 -0
- package/src/detectors/register-required.ts +56 -0
- package/src/detectors/register-voice.ts +36 -1
- package/src/detectors/registry/enumeration-marker.ts +4 -0
- package/src/detectors/registry/filler-word.ts +4 -0
- package/src/detectors/registry/heading-marker-no-space.ts +4 -0
- package/src/detectors/registry/link-definition-unused.ts +4 -0
- package/src/detectors/registry/pseudo-heading.ts +4 -0
- package/src/detectors/registry/reversed-link.ts +4 -0
- package/src/detectors/registry/sa-ire.ts +4 -0
- package/src/detectors/registry/table-absorbed-line.ts +4 -0
- package/src/detectors/registry/term-consistency.ts +4 -0
- package/src/detectors/registry/term-form.ts +4 -0
- package/src/detectors/relative-pronoun-mix.ts +18 -3
- package/src/detectors/release-notes.ts +19 -0
- package/src/detectors/request-owner.ts +62 -2
- package/src/detectors/reversed-link.ts +39 -0
- package/src/detectors/run-in-title.ts +35 -0
- package/src/detectors/sa-ire.ts +7 -0
- package/src/detectors/sentence-counts.ts +28 -9
- package/src/detectors/sentence-ending.ts +58 -13
- package/src/detectors/sentence-length.ts +34 -7
- package/src/detectors/sentence-rhythm.ts +6 -2
- package/src/detectors/signals.ts +2 -2
- package/src/detectors/structure.ts +4 -0
- package/src/detectors/technical-docs.ts +58 -9
- package/src/detectors/term-consistency.ts +41 -0
- package/src/detectors/term-form.ts +17 -0
- package/src/detectors/token-shape.ts +8 -4
- package/src/detectors/unbalanced-bracket.ts +4 -2
- package/src/detectors/unfilled-placeholder.ts +13 -1
- package/src/detectors/unknown-word-context.ts +6 -0
- package/src/detectors/unknown-word.ts +7 -1
- package/src/detectors/vague-density.ts +10 -2
- package/src/detectors/version-mismatch.ts +7 -1
- package/src/detectors/weasel-word.ts +13 -2
- package/src/document-prose.ts +43 -0
- package/src/document-scope.ts +66 -0
- package/src/document.ts +43 -50
- package/src/enumeration-marks.ts +233 -0
- package/src/facts/cross-facts.ts +10 -4
- package/src/facts/labelled-facts.ts +7 -4
- package/src/file-header.ts +3 -5
- package/src/files.ts +87 -8
- package/src/gitignore.ts +83 -0
- package/src/grade/stamp.ts +5 -0
- package/src/latin-word-boundary.ts +12 -0
- package/src/markdown-node.ts +1 -0
- package/src/name-separator.ts +29 -7
- package/src/news-dateline.ts +29 -0
- package/src/plugin.ts +21 -3
- package/src/reasons.ts +8 -0
- package/src/render/explain.ts +26 -1
- package/src/render/rules-json.ts +16 -2
- package/src/render/summary.ts +33 -4
- package/src/render/suppressions.ts +101 -4
- package/src/rule-load.ts +3 -2
- package/src/run-in-title.ts +91 -0
- package/src/run.ts +21 -8
- package/src/scope-markers.ts +25 -0
- package/src/scope-problem-text.ts +21 -0
- package/src/scoped-sentences.ts +41 -0
- package/src/setting-problems.ts +4 -0
- package/src/spelling.ts +4 -4
- package/src/stet-body.ts +74 -0
- package/src/stet.ts +113 -32
- package/src/structure/alert-lines.ts +19 -0
- package/src/structure/catch-all-row-blank.ts +22 -0
- package/src/structure/change-rate-tied.ts +113 -0
- package/src/structure/cross-definitions.ts +6 -9
- package/src/structure/defining-names.ts +14 -1
- package/src/structure/definition-use.ts +13 -3
- package/src/structure/forward-reference.ts +21 -0
- package/src/structure/net-amount.ts +44 -5
- package/src/structure/period-label-conflict.ts +22 -7
- package/src/structure/serial-range.ts +14 -6
- package/src/structure/version-mismatch.ts +41 -8
- package/src/structure/weekday.ts +14 -1
- package/src/table-cells.ts +2 -2
- package/src/term-form.ts +99 -0
- package/src/term-groups.ts +68 -0
- package/src/text-scope.ts +79 -0
- package/src/topic-clause.ts +120 -22
- package/src/unclosed-code-quote.ts +42 -0
|
@@ -69,8 +69,8 @@ example:
|
|
|
69
69
|
1. The Supplier shall provide the hosting services (the "Services") to the Customer.
|
|
70
70
|
|
|
71
71
|
not_flagged:
|
|
72
|
-
ja: 文書が「本」を付けた語を一つも定義していなければ見ません。定義した語とその言い換え(本件業務、defined-term-form が見ます)、定義した語で始まる語(本サービス上、本報告書提出後)、この文書やその一部を指す語(本条、本項、本書、本契約、本利用規約、本サイト)、どこかでかぎ括弧に入れた語と、定義の箇条書きの項目に語だけを書いたもの(② 本報告書。定義の書き方を chaff が読めなかったもの)とそれで始まる語、一語の言葉(本人、本日、本社)は見ません。定義した語に「等」を付けた語(本報告書等)は、まとめて呼ぶ別の語なので指します。同じ語は最初の一か所だけ指します。英語は、大文字は法令・組織・方針の名前(the Federal Trade Commission Act、Acceptable Use Policies)にも使うので、狭く読みます。"X" means や (the "X") の形の定義が二つ未満の文書は見ません。文の頭や記号の後ろの語、小文字の名詞の前に付けた語(the Premium plan)、名前の一覧(proper-name-word、地名、曜日と月、会社の形、当事者の役割)の語を含むもの、条の参照(Section 4、Schedule A)、前後の語から名前と分かるもの(後ろに番号が付く Proposition 65、長い名前の頭 Post Holdings, Inc. や Canton, Ohio や the Federal Food, Drug, and Cosmetic Act、直後の括弧で定義するもの Certificate of Analysis (“COA”) や the Closing (as defined in the Merger Agreement)、文書が定義した略語の頭文字になるもの “IRS” means the Internal Revenue Service、当事者の立場 Citibank, N.A., as Administrative Agent、すぐ後ろの attached hereto などで添付した書式の題と分かるもの the Termination Certificate attached hereto)、見出し・リンク・太字・HTML の要素・表・箇条書きの見出し・条の頭の見出し(5.8 No Representation or Warranty.)の中、どこかで引用符か太字に入れた語、定義した語を含むもの(大文字小文字を問いません)、文書のどこかで小文字でも書いた語(your Account と your account。普通の語か画面の名前)、空白の続きで分かれた語(Normal Business Hours は一つの語)、句点や斜線で次の語と続けて書いたもの(Borrowmoney.com、Leased/rent)、小さな語まで大文字で始めたもの(Maintenance And Deployment
|
|
73
|
-
en: "A document that defines no term with the prefix is not read. Defined terms and their other-prefix forms (本件業務, which defined-term-form reads), terms that start with a defined term (本サービス上, 本報告書提出後), the document's names for itself and its parts (本条, 本項, 本書, 本契約, 本利用規約, 本サイト), terms set in quotes anywhere or alone on an item of a definition list (② 本報告書: a definition chaff could not read) and terms that start with one, and single words (本人, 本日, 本社) are not reported. A defined term with 等 added (本報告書等) names a group, another term, and is reported. Each term is reported once, at its first use. English is read narrowly, since capitals also name laws, organisations and policies (the Federal Trade Commission Act, Acceptable Use Policies): a document with fewer than two definitions written with a defining word (“X” means, (the “X”)) is not read; and a word at the start of a sentence or after a mark, a modifier of a lower-case noun (the Premium plan), a run holding a word of the name lists (proper-name-word, places, weekdays and months, company forms, party roles), a reference to a part (Section 4, Schedule A), a name shown by the words around it (a number after it: Proposition 65; a longer name it starts: Post Holdings, Inc., Canton, Ohio, the Federal Food, Drug, and Cosmetic Act; brackets right after it that define it: Certificate of Analysis (“COA”), the Closing (as defined in the Merger Agreement); initials that spell a term the document defines: “IRS” means the Internal Revenue Service; a party's capacity: Citibank, N.A., as Administrative Agent; words right after it that make it the title of an attached form: the Termination Certificate attached hereto), anything inside a heading, a link, bold, an HTML element, a table, a list item's label or a clause's run-in caption (5.8 No Representation or Warranty.), a word set in quotes or bold anywhere, a run holding a defined term in any case, and a word the document also writes in lower case (your Account and your account: an ordinary word or a screen's name) are not reported, and neither are words split only by a run of spaces read apart (Normal Business Hours is one term), a word glued to more letters by a full stop or a slash (Borrowmoney.com, Leased/rent), a phrase that capitalises its small words too (Maintenance And Deployment: every word capitalised), or a phrase holding two long words run together (Space Includingspecified Description, where a conversion lost the space between a table's cells). In Japanese, a document that says it follows another document's definitions (…同契約内の定義に従う) has most of its terms defined there, so only a term that looks like a slip for another of its terms (本学習モデル beside 本学習済みモデル) is reported; a document's name (本共同開発契約) is reported when it looks like a slip for a defined name (本共同研究開発契約). Statutes, court decisions and patents are not read; the contract genre runs this rule."
|
|
72
|
+
ja: 文書が「本」を付けた語を一つも定義していなければ見ません。定義した語とその言い換え(本件業務、defined-term-form が見ます)、定義した語で始まる語(本サービス上、本報告書提出後)、この文書やその一部を指す語(本条、本項、本書、本契約、本利用規約、本サイト)、どこかでかぎ括弧に入れた語と、定義の箇条書きの項目に語だけを書いたもの(② 本報告書。定義の書き方を chaff が読めなかったもの)とそれで始まる語、一語の言葉(本人、本日、本社)は見ません。定義した語に「等」を付けた語(本報告書等)は、まとめて呼ぶ別の語なので指します。同じ語は最初の一か所だけ指します。英語は、大文字は法令・組織・方針の名前(the Federal Trade Commission Act、Acceptable Use Policies)にも使うので、狭く読みます。"X" means や (the "X") の形の定義が二つ未満の文書は見ません。文の頭や記号の後ろの語、小文字の名詞の前に付けた語(the Premium plan)、名前の一覧(proper-name-word、地名、曜日と月、会社の形、当事者の役割)の語を含むもの、条の参照(Section 4、Schedule A)、前後の語から名前と分かるもの(後ろに番号が付く Proposition 65、長い名前の頭 Post Holdings, Inc. や Canton, Ohio や the Federal Food, Drug, and Cosmetic Act、直後の括弧で定義するもの Certificate of Analysis (“COA”) や the Closing (as defined in the Merger Agreement)、文書が定義した略語の頭文字になるもの “IRS” means the Internal Revenue Service、当事者の立場 Citibank, N.A., as Administrative Agent、すぐ後ろの attached hereto などで添付した書式の題と分かるもの the Termination Certificate attached hereto)、見出し・リンク・太字・HTML の要素・表・箇条書きの見出し・条の頭の見出し(5.8 No Representation or Warranty.)の中、どこかで引用符か太字に入れた語、定義した語を含むもの(大文字小文字を問いません)、文書のどこかで小文字でも書いた語(your Account と your account。普通の語か画面の名前)、空白の続きで分かれた語(Normal Business Hours は一つの語)、句点や斜線で次の語と続けて書いたもの(Borrowmoney.com、Leased/rent)、小さな語まで大文字で始めたもの(Maintenance And Deployment。語ごとに大文字にした書き方。文の途中で小さな語を二つ以上大文字にした文は、文ごと見ません)、前に出た長い語の並びの最後の語だけを繰り返したもの(Master Purchase Commitments の後の such Commitments)、長い二語が空白なしにつながった語を含むもの(Space Includingspecified Description。変換で表の欄の間の空白が落ちたもの)は見ません。「本共同研究開発契約において定義した用語は…同契約内の定義に従う」のように別の文書の定義に従うと書いた文書では、定義の多くが向こうにあるので、ほかの語の書き誤りに見える語(「本学習済みモデル」の横の「本学習モデル」)だけを指します。文書の名前(本共同開発契約)は、定義した文書名(本共同研究開発契約)の書き誤りに見えれば指します。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。
|
|
73
|
+
en: "A document that defines no term with the prefix is not read. Defined terms and their other-prefix forms (本件業務, which defined-term-form reads), terms that start with a defined term (本サービス上, 本報告書提出後), the document's names for itself and its parts (本条, 本項, 本書, 本契約, 本利用規約, 本サイト), terms set in quotes anywhere or alone on an item of a definition list (② 本報告書: a definition chaff could not read) and terms that start with one, and single words (本人, 本日, 本社) are not reported. A defined term with 等 added (本報告書等) names a group, another term, and is reported. Each term is reported once, at its first use. English is read narrowly, since capitals also name laws, organisations and policies (the Federal Trade Commission Act, Acceptable Use Policies): a document with fewer than two definitions written with a defining word (“X” means, (the “X”)) is not read; and a word at the start of a sentence or after a mark, a modifier of a lower-case noun (the Premium plan), a run holding a word of the name lists (proper-name-word, places, weekdays and months, company forms, party roles), a reference to a part (Section 4, Schedule A), a name shown by the words around it (a number after it: Proposition 65; a longer name it starts: Post Holdings, Inc., Canton, Ohio, the Federal Food, Drug, and Cosmetic Act; brackets right after it that define it: Certificate of Analysis (“COA”), the Closing (as defined in the Merger Agreement); initials that spell a term the document defines: “IRS” means the Internal Revenue Service; a party's capacity: Citibank, N.A., as Administrative Agent; words right after it that make it the title of an attached form: the Termination Certificate attached hereto), anything inside a heading, a link, bold, an HTML element, a table, a list item's label or a clause's run-in caption (5.8 No Representation or Warranty.), a word set in quotes or bold anywhere, a run holding a defined term in any case, and a word the document also writes in lower case (your Account and your account: an ordinary word or a screen's name) are not reported, and neither are words split only by a run of spaces read apart (Normal Business Hours is one term), a word glued to more letters by a full stop or a slash (Borrowmoney.com, Leased/rent), a phrase that capitalises its small words too (Maintenance And Deployment: every word capitalised; a sentence that capitalises two small words or more in mid-sentence is skipped whole), one word that repeats the last word of a longer run before it in the sentence (such Commitments after Master Purchase Commitments), or a phrase holding two long words run together (Space Includingspecified Description, where a conversion lost the space between a table's cells). In Japanese, a document that says it follows another document's definitions (…同契約内の定義に従う) has most of its terms defined there, so only a term that looks like a slip for another of its terms (本学習モデル beside 本学習済みモデル) is reported; a document's name (本共同開発契約) is reported when it looks like a slip for a defined name (本共同研究開発契約). Statutes, court decisions and patents are not read; the contract genre runs this rule."
|
|
74
74
|
rewrite:
|
|
75
75
|
depth: light
|
|
76
76
|
ja:
|
|
@@ -10,8 +10,8 @@ name:
|
|
|
10
10
|
en: Unfilled placeholder
|
|
11
11
|
|
|
12
12
|
why:
|
|
13
|
-
ja: "「【会社名】」「[Your Name]」「[Candidate Name]」「(ここに会社名を書く)」は、雛形や生成した下書きに残る空欄です。値に「TODO: …」「未定」とだけ書いたものも、後で埋めるつもりの空欄です。英語の雛形の指示の行(OPTIONAL: General conclusions …)が、埋めた報告書に残ったものも同じです。文体の好みではなく、埋め忘れです。ビジネス文書の宛名・署名・金額・日付・住所・電話番号の位置に残った「〇〇様」「株式会社〇〇」「〇万円」「氏名:〇〇」「03
|
|
14
|
-
en: '"[Your Name]", "[Insert Date]" and "[Candidate Name]" are the blanks a template or a generated draft leaves. A value that only says "TODO: …" or "TBD" is a blank too, left to fill in later, and so is an instruction line from the template left in a filled report ("OPTIONAL: General conclusions …"). This is not a matter of style: the blank was never filled. In a Japanese business document, the blank marks (〇〇) left where a name, a sum, a date, an address or a phone number belongs (〇〇様, 株式会社〇〇, 〇万円, 氏名:〇〇, 03
|
|
13
|
+
ja: "「【会社名】」「[Your Name]」「[Candidate Name]」「(ここに会社名を書く)」は、雛形や生成した下書きに残る空欄です。値に「TODO: …」「未定」とだけ書いたものも、後で埋めるつもりの空欄です。英語の雛形の指示の行(OPTIONAL: General conclusions …)が、埋めた報告書に残ったものも同じです。文体の好みではなく、埋め忘れです。ビジネス文書の宛名・署名・金額・日付・住所・電話番号の位置に残った「〇〇様」「株式会社〇〇」「〇万円」「氏名:〇〇」「03-〇〇〇〇」「東京都品川区〇〇」も同じ空欄です。メールアドレスの中の空欄(hello@[yourcompany].com)も数えます。URL に雛形の名前が残ったもの(git clone https://github.com/yourname/tool.git)は、コードの中でも数えます。表の升に残った空欄も数えます。文の中で例として置いた「○○」は正しい書き方なので数えません。"
|
|
14
|
+
en: '"[Your Name]", "[Insert Date]" and "[Candidate Name]" are the blanks a template or a generated draft leaves. A value that only says "TODO: …" or "TBD" is a blank too, left to fill in later, and so is an instruction line from the template left in a filled report ("OPTIONAL: General conclusions …"). This is not a matter of style: the blank was never filled. In a Japanese business document, the blank marks (〇〇) left where a name, a sum, a date, an address or a phone number belongs (〇〇様, 株式会社〇〇, 〇万円, 氏名:〇〇, 03-〇〇〇〇, 東京都品川区〇〇) are blanks too, and so is a blank inside a mail or web address (hello@[yourcompany].com), and a template''s name left as part of a web address, code included (git clone https://github.com/yourname/tool.git). A blank left in a table cell counts as well.'
|
|
15
15
|
|
|
16
16
|
message:
|
|
17
17
|
ja: 「{matched}」が埋まっていません
|
package/rules/unknown-word.yaml
CHANGED
|
@@ -47,8 +47,8 @@ example:
|
|
|
47
47
|
The report is attached to this email.
|
|
48
48
|
|
|
49
49
|
not_flagged:
|
|
50
|
-
ja: 大文字を含む語、四字より短い語、コード・URL
|
|
51
|
-
en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis or brackets (lobally in **G**lobally, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported. Nor is a word the document also writes in code (`tidyq check`, a code block), since it is a name the document uses. Nor is a search stem ending in a wildcard (vaccin*), or any search term on the same line. Nor is a word the document uses with another ending (rightsize and rightsized), a word alone in quotes or brackets ("mailto", (jchaplin)), a word the document also writes in a URL, a word beside a word of another language (bête noire), a word joined to a bracketed letter (handl[e], neuro(a)typicality), a variable name before = (nboot=2,000), two dictionary words of four letters or more written as one (crowdwork; where the document writes the two apart three times or more elsewhere, as flag salute beside flagsalute, the joined form outside quotation marks is reported), a word ending in the stem of a drug's international name (-oxetine in paroxetine), a word before a release number (golang 1.21.5), a word before a journal's volume and issue (medica in Biochemia medica 22 (3)), a word one letter from another word of the document the dictionary does not know either (pthread and bthread, names on one scheme), or an older or British -nce spelling of a word the dictionary spells -nse (recompence, expence).
|
|
50
|
+
ja: 大文字を含む語、四字より短い語、コード・URL・メールアドレスの中の語、強調やタグや角括弧で頭の字を分けた語の残り(**G**lobally の lobally、<strong>E</strong>dition の dition、[e]xpressions の xpressions)、文書で二度以上使う語、一字違いの辞書の語が無い語、chaff.yaml の names に並べた語、語彙表 known-misspelling が別に言う語は指しません。同じ文書がコード(`tidyq check` やコードの区画)にも書いた語と、小文字の後ろに大文字を続けて別の所に書いた語(SystemJS と書く文書の systemjs)も、その文書の名前なので指しません。検索の語の後に * を付けた形(vaccin*)と、それと同じ行に並べた検索の語も、語ではないので指しません。文書がほかの語尾で使う語(rightsize と rightsized)、引用符や括弧の中に一語だけ書いた語("mailto"、(jchaplin))、文書が URL にも書いた語、他の言語の語の隣の語(bête noire)、角括弧や括弧の字を続けた語(handl[e]、neuro(a)typicality)、= の前の変数の名(nboot=2,000)、四字以上の辞書の語二つを続けた語(crowdwork。文書が別の所で三度以上分けて書いていれば(flag salute)、引用符の中でなければ、続けた形(flagsalute)を打ち間違いとして言います)、薬の国際一般名の語幹で終わる語(paroxetine の -oxetine)、版の番号の前の語(golang 1.21.5)、誌の巻と号の前の語(Biochemia medica 22 (3) の medica)、辞書に無い別の語と一字だけ違う語(pthread と bthread、同じ作りの名前)、辞書が -nse と書く語を -nce と書いた古い綴りやイギリスの綴り(recompence、expence)も指しません。
|
|
51
|
+
en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis, a tag or brackets (lobally in **G**lobally, dition in <strong>E</strong>dition, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported. Nor is a word the document also writes in code (`tidyq check`, a code block), or elsewhere with a capital after a small letter (systemjs where the document writes SystemJS), since it is a name the document uses. Nor is a search stem ending in a wildcard (vaccin*), or any search term on the same line. Nor is a word the document uses with another ending (rightsize and rightsized), a word alone in quotes or brackets ("mailto", (jchaplin)), a word the document also writes in a URL, a word beside a word of another language (bête noire), a word joined to a bracketed letter (handl[e], neuro(a)typicality), a variable name before = (nboot=2,000), two dictionary words of four letters or more written as one (crowdwork; where the document writes the two apart three times or more elsewhere, as flag salute beside flagsalute, the joined form outside quotation marks is reported), a word ending in the stem of a drug's international name (-oxetine in paroxetine), a word before a release number (golang 1.21.5), a word before a journal's volume and issue (medica in Biochemia medica 22 (3)), a word one letter from another word of the document the dictionary does not know either (pthread and bthread, names on one scheme), or an older or British -nce spelling of a word the dictionary spells -nse (recompence, expence).
|
|
52
52
|
rewrite:
|
|
53
53
|
depth: light
|
|
54
54
|
en:
|
|
@@ -50,8 +50,8 @@ example:
|
|
|
50
50
|
This agreement is between Harbour Ltd (the "Seller") and Hill Ltd (the "Buyer"). The Seller ships within five days.
|
|
51
51
|
|
|
52
52
|
not_flagged:
|
|
53
|
-
ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。目次・索引の行(目次の見出しの下の項目、一行に詰めた目次、定義した語と条の番地の一覧)と、条の番号の後ろの題(Section 1.1 Closing.)と、番号と語の終わりに条の番地の括弧を添えただけの札((1)文化芸術推進基本計画(第7条関係))と、語を含むもっと長い名前(定義の括弧の前の名前を前で写した株式会社みなと、もっと長い定義した語、Navistar Financial Corporation)も数えません。文書自身の名前と定義した語に同じ頭を付けた所(この就業規則(以下「規則」)より前の「この規則」)と、すぐ後ろの括弧に定義の長い名前を書き添えた所は、読み手に分かるので言いません。要約の節(「要旨」「裁判要旨」「Summary」のような見出しの下)で、定義がその節の外にある語と、番号と題だけの項目の行((2)本件仮換地の指定等)は、本文を縮めたり名前を付けたりした所なので数えません。番地や法令の名前に続けて語の意味の出どころを書いた所(69条の3
|
|
54
|
-
en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at. A word inside the name written right before another term's defining bracket (Services in This Services Agreement (this "Agreement")) is not a use either. Nor are contents and index lines (the items under a contents heading, a table of contents or a list of defined terms and section numbers packed on one line), a caption after a section number (Section 1.1 Closing.), a label of a number and the term ending in a bracketed section reference ((a) Seller (Section 2)), or a longer name that holds the term, such as an earlier copy of the name before the bracket (Board of Directors before our Board of Directors ("Board")), a longer defined term, a capitalised name ending in it (Navistar Financial Corporation). The document naming itself (this Agreement before (this "Agreement")) and a use followed by the long name in brackets are clear to the reader and not pointed at. A use in a summary section (under a heading such as Summary, Syllabus or 裁判要旨) of a term defined outside it, and a numbered line that only names the section below ((2) Interim Land Designation) summarise or name the body, so they are not uses either. An introduction (a heading that is the whole of Introduction, Preface or Foreword) names ahead what the body defines and is read like a summary. A definition inside an article copied from another statute (under a heading that names a document the text cites elsewhere) is that statute's, not this document's. After a longer capitalised name ending in the term (The National Security Act of 1947), "the Act" points back to that name and is not an early use. A Japanese term of a single kanji is checked only when it is a party's short name (甲, 乙, 丙, 丁); other single-kanji words such as 法 are also written in their everyday sense.
|
|
53
|
+
ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。目次・索引の行(目次の見出しの下の項目、一行に詰めた目次、定義した語と条の番地の一覧)と、条の番号の後ろの題(Section 1.1 Closing.)と、番号と語の終わりに条の番地の括弧を添えただけの札((1)文化芸術推進基本計画(第7条関係))と、語を含むもっと長い名前(定義の括弧の前の名前を前で写した株式会社みなと、もっと長い定義した語、Navistar Financial Corporation)も数えません。文書自身の名前と定義した語に同じ頭を付けた所(この就業規則(以下「規則」)より前の「この規則」)と、すぐ後ろの括弧に定義の長い名前を書き添えた所は、読み手に分かるので言いません。要約の節(「要旨」「裁判要旨」「Summary」のような見出しの下)で、定義がその節の外にある語と、番号と題だけの項目の行((2)本件仮換地の指定等)は、本文を縮めたり名前を付けたりした所なので数えません。番地や法令の名前に続けて語の意味の出どころを書いた所(69条の3所定の小規模宅地等)も数えません。後ろで定義することを先に断った所(下記パブリック・ライセンス、後述の利用条件)と、それより後ろで同じ語を使った所も、読み手は定義が来ると知っているので数えません。「はじめに」「序論」の節は後の本文が定義することを先に名指す所なので、要約の節と同じに読みます。他の法令を引き写した節(見出しがその法令の名前で、文書がほかでその法令を引いている)の条の中の定義は、その法令の定義で、この文書の語の定義としては読みません。英語の語を大文字の長い名前の終わりに書いた所(The National Security Act of 1947)より後ろの the Act は、その名前を指すので数えません。一字の漢字の語は、当事者の呼び名(甲・乙・丙・丁)だけを探します。「法」「令」のような一字の語はふつうの語としても書くためです。GitHub の注記(> [!NOTE])は掲載元が本文の外に添えた断りなので、その中の語は数えません。英語で文書を普通の名詞で呼んで定義した名前(this document (the "Terms"))も、文書自身の名前なので this を付ければ前で書いても言いません。
|
|
54
|
+
en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at. A word inside the name written right before another term's defining bracket (Services in This Services Agreement (this "Agreement")) is not a use either. Nor are contents and index lines (the items under a contents heading, a table of contents or a list of defined terms and section numbers packed on one line), a caption after a section number (Section 1.1 Closing.), a label of a number and the term ending in a bracketed section reference ((a) Seller (Section 2)), or a longer name that holds the term, such as an earlier copy of the name before the bracket (Board of Directors before our Board of Directors ("Board")), a longer defined term, a capitalised name ending in it (Navistar Financial Corporation). The document naming itself (this Agreement before (this "Agreement")) and a use followed by the long name in brackets are clear to the reader and not pointed at. A use that points the reader ahead to its definition (the following Licence, the Licence below, 下記パブリック・ライセンス), and any later use of the term before its definition, is not an early use either, since the reader has been told the definition is coming. A use in a summary section (under a heading such as Summary, Syllabus or 裁判要旨) of a term defined outside it, and a numbered line that only names the section below ((2) Interim Land Designation) summarise or name the body, so they are not uses either. An introduction (a heading that is the whole of Introduction, Preface or Foreword) names ahead what the body defines and is read like a summary. A definition inside an article copied from another statute (under a heading that names a document the text cites elsewhere) is that statute's, not this document's. After a longer capitalised name ending in the term (The National Security Act of 1947), "the Act" points back to that name and is not an early use. A Japanese term of a single kanji is checked only when it is a party's short name (甲, 乙, 丙, 丁); other single-kanji words such as 法 are also written in their everyday sense. A GitHub alert (> [!NOTE]) is the publisher's note beside the text, so a word in it is not a use. A name defined for the document in passing (this document (the "Terms")) may be written with this before the definition (this Terms agreement).
|
|
55
55
|
rewrite:
|
|
56
56
|
depth: structure
|
|
57
57
|
ja:
|
|
@@ -53,8 +53,8 @@ example:
|
|
|
53
53
|
Report an incident within 30 minutes and notify the affected teams. Record it in the incident log and fix the cause by the next working day.
|
|
54
54
|
|
|
55
55
|
not_flagged:
|
|
56
|
-
ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(in a timely manner の timely)は一つと数えます。英語の法務の文書では、法律や慣行が意味を決めている言い方(reasonable、best efforts、from time to time)の中の語は数えません。データ保護の法律が義務として書く安全管理の言い方(appropriate technical and organisational measures、appropriate administrative, physical, and technical safeguards)も同じです。何も名指さない appropriate measures は数えます。要求の文の中の「可能な限り」「必要に応じて」は、要求の書き方として requirement-smell も見ます。すぐ後ろの括弧で中身を書いた語(一定の事項(請求書に書く事項))も数えません。括弧が名前を付けるだけ(以下「本措置」という。)なら数えます。目次の見出しの下の行(節の名前)は数えません。英語の reasonable accommodation は、どのジャンルでも法律が決めた義務の名前なので数えません。英語で、すぐ後ろに法律や条を名指す語が続くもの(as required by applicable law、as required under 45 CFR §164.528、as required under HIPAA)は、何が要るのかをその法律が決めているので数えません。当事者が決めるもの(as required by Licensor
|
|
57
|
-
en: 'A few vague words for the document''s length are not reported, and very short documents are not measured. Each sentence is reported once, and a word inside a longer phrase ("timely" in "in a timely manner") counts once. In legal documents, a word inside a term that law and practice define ("reasonable", "best efforts", "from time to time") is not counted; nor are the security duties data-protection law writes ("appropriate technical and organisational measures", "appropriate administrative, physical, and technical safeguards"), while a bare "appropriate measures" is counted. Inside a requirement, requirement-smell also reads "where possible" and "as needed". A word that the bracket right after it pins down ("a reasonable fee (USD 50)") is not counted either; a bracket that only names it ("(hereinafter the ""Fee"")") pins nothing down. Lines under a table of contents heading (the sections'' names) are not counted, and "reasonable accommodation" is the name of a legal duty in any genre. A word that a law or a section governs right after it ("as required by applicable law", "as required under 45 CFR §164.528", "as required under HIPAA") is not counted, since that law says what is required; one a party decides ("as required by Licensor") is.'
|
|
56
|
+
ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(in a timely manner の timely)は一つと数えます。英語の法務の文書では、法律や慣行が意味を決めている言い方(reasonable、best efforts、from time to time)の中の語は数えません。データ保護の法律が義務として書く安全管理の言い方(appropriate technical and organisational measures、appropriate administrative, physical, and technical safeguards)も同じです。何も名指さない appropriate measures は数えます。要求の文の中の「可能な限り」「必要に応じて」は、要求の書き方として requirement-smell も見ます。すぐ後ろの括弧で中身を書いた語(一定の事項(請求書に書く事項))も数えません。括弧が名前を付けるだけ(以下「本措置」という。)なら数えます。目次の見出しの下の行(節の名前)は数えません。英語の reasonable accommodation は、どのジャンルでも法律が決めた義務の名前なので数えません。英語で、すぐ後ろに法律や条を名指す語が続くもの(as required by applicable law、as required under 45 CFR §164.528、as required under HIPAA)は、何が要るのかをその法律が決めているので数えません。当事者が決めるもの(as required by Licensor)は数えます。英語で、データ保護の法律が書く保存期間の言い方(keep data for as long as necessary、no longer than is necessary)と、読み手に選択肢から一番合うものを選ばせる言い方(the most appropriate template)は、書き手が選ぶ言い方ではないので指しません(密度には数えます)。
|
|
57
|
+
en: 'A few vague words for the document''s length are not reported, and very short documents are not measured. Each sentence is reported once, and a word inside a longer phrase ("timely" in "in a timely manner") counts once. In legal documents, a word inside a term that law and practice define ("reasonable", "best efforts", "from time to time") is not counted; nor are the security duties data-protection law writes ("appropriate technical and organisational measures", "appropriate administrative, physical, and technical safeguards"), while a bare "appropriate measures" is counted. Inside a requirement, requirement-smell also reads "where possible" and "as needed". A word that the bracket right after it pins down ("a reasonable fee (USD 50)") is not counted either; a bracket that only names it ("(hereinafter the ""Fee"")") pins nothing down. Lines under a table of contents heading (the sections'' names) are not counted, and "reasonable accommodation" is the name of a legal duty in any genre. A word that a law or a section governs right after it ("as required by applicable law", "as required under 45 CFR §164.528", "as required under HIPAA") is not counted, since that law says what is required; one a party decides ("as required by Licensor") is. The storage limit data-protection law writes ("keep data for as long as necessary", "no longer than is necessary") and a choice of the best fit from options the reader sees ("the most appropriate template") are not the writer''s wording and are not reported (they still count towards the density).'
|
|
58
58
|
level_meaning:
|
|
59
59
|
ja: 1000 字あたりあいまいな語 {limit} 個まで
|
|
60
60
|
en: up to {limit} {limit|vague word|vague words} per 1000 words
|
|
@@ -11,7 +11,7 @@ name:
|
|
|
11
11
|
|
|
12
12
|
why:
|
|
13
13
|
ja: 「2.3.0 を入れます」のすぐ下のコマンドが「tidyq@2.4.0」だと、読み手はどちらを入れればよいか分かりません。新しい版を出したときに、コード例か説明の片方だけを直すと起きます。コードブロックのすぐ上の段落に書いた版(2.3.0 のように点で三つに区切った番号)を、そのコードブロックにある版と比べます。コードに版がちょうど一つあり、段落の版がそれと違うとき指します。コードが redis:7.4 のように名前と版で固定したソフトを、段落が「Redis 7.2」のように名前のすぐ後の版で書いたときは、7.4 のような二つに区切った番号も比べます。7.4 と 7.4.1 のように一方が他方の系列なら同じと見ます。また、変更履歴のように版の見出し(または版で始まる箇条書き)が並ぶ文書では、「npm install wrapkit@3.1.0」のように自分のパッケージ(題名か冒頭の段落が名指すもの)をちょうど一つの版に固定して入れるコマンドを、その版の項の中ならその版と、外なら一覧で最新の版と比べます。
|
|
14
|
-
en: 'When "Install version 2.3.0" sits right above a command that installs tidyq@2.4.0, the reader cannot tell which to install. It happens when a release updates the example or the text but not both. chaff compares a version written in the paragraph right above a code block (a number in three dotted parts, such as 2.3.0) with the version the block shows. It reports when the block shows exactly one version and the paragraph names another. When the block pins a program by name (redis:7.4) and the paragraph writes a version right after that name (Redis 7.2), versions of two parts are compared too; 7.4 and 7.4.1 are the same series. In a document that lists its releases (version headings, as in a changelog, or list items that start with a version), a command that installs the document''s own package (the one its title or opening paragraph names) pinned to one version, such as npm install wrapkit@3.1.0, is compared with the release whose section it is in, or else with the newest release listed.'
|
|
14
|
+
en: 'When "Install version 2.3.0" sits right above a command that installs tidyq@2.4.0, the reader cannot tell which to install. It happens when a release updates the example or the text but not both. chaff compares a version written in the paragraph right above a code block (a number in three dotted parts, such as 2.3.0) with the version the block shows. It reports when the block shows exactly one version and the paragraph names another. A version that "is" gives to the current release, in any sentence of that paragraph ("The current release is 2.4.0."), is compared too. When the block pins a program by name (redis:7.4) and the paragraph writes a version right after that name (Redis 7.2), versions of two parts are compared too; 7.4 and 7.4.1 are the same series. In a document that lists its releases (version headings, as in a changelog, or list items that start with a version), a command that installs the document''s own package (the one its title or opening paragraph names) pinned to one version, such as npm install wrapkit@3.1.0, is compared with the release whose section it is in, or else with the newest release listed.'
|
|
15
15
|
|
|
16
16
|
message:
|
|
17
17
|
ja: 「{written}」と書いていますが、すぐ下のコードは {code} です
|
|
@@ -82,4 +82,4 @@ example:
|
|
|
82
82
|
|
|
83
83
|
not_flagged:
|
|
84
84
|
ja: 版の無いコードブロック、版が二つ以上あるコードブロック(「2.3.0 から 2.4.0 へ」の更新)、範囲の端や起点として書いた版(「2.3.0 から」「20.0.0 以上」)、別のプログラムの名前のすぐ後ろの版(「Node.js 18.17.0 が必要」)、見出しや箇条書きや表の版、版だけの行、ブロックが名前で固定したソフトの名前のすぐ後ろ以外の、二つに区切った番号(22.04、3.1)と、先頭が四桁の番号(2024.01.15)は比べません。インストールのコマンドでは、題名や冒頭の段落が名指さない別のパッケージ(依存するもの)、範囲(^3.0.0、>=3.0.0)、latest のようなタグ、プレリリース(4.0.0-beta.1)の版と、リリースの一覧が無い文書は比べません。一覧の最新はプレリリースを除いて版の順で選びます。
|
|
85
|
-
en: 'A code block with no version or with two or more (an upgrade from one to the other), a version written as a bound or a starting point ("from 2.3.0", "20.0.0 or later"), a version right after the name of another program ("Requires Node.js 18.17.0"), a version in a heading, a list item, a table or a line of its own, numbers in two parts (22.04, 3.1) other than right after the name of a program the block pins, and numbers with a four-digit first part (2024.01.15) are not compared. Of install commands, a package the title or the opening paragraph does not name (a dependency), a range (^3.0.0, >=3.0.0), a tag such as latest, a prerelease (4.0.0-beta.1), and a document that lists no releases are not compared; the newest release is chosen by version order, prereleases left out.'
|
|
85
|
+
en: 'A code block with no version or with two or more (an upgrade from one to the other), a version written as a bound or a starting point ("from 2.3.0", "20.0.0 or later"), a version right after the name of another program ("Requires Node.js 18.17.0"), a version "is" gives to anything but the current release or version ("The previous release is 2.2.0", "The Node.js version is 18.17.0"), a version in a heading, a list item, a table or a line of its own, numbers in two parts (22.04, 3.1) other than right after the name of a program the block pins, and numbers with a four-digit first part (2024.01.15) are not compared. Of install commands, a package the title or the opening paragraph does not name (a dependency), a range (^3.0.0, >=3.0.0), a tag such as latest, a prerelease (4.0.0-beta.1), and a document that lists no releases are not compared; the newest release is chosen by version order, prereleases left out.'
|
package/rules/weasel-word.yaml
CHANGED
|
@@ -3,7 +3,7 @@ layer: L2
|
|
|
3
3
|
status: stable
|
|
4
4
|
how_to_find: weasel-word
|
|
5
5
|
word_list: weasel-word
|
|
6
|
-
extra_word_lists: [telling-cue]
|
|
6
|
+
extra_word_lists: [telling-cue, origin-hedge]
|
|
7
7
|
requires: [pos]
|
|
8
8
|
languages: [ja, en]
|
|
9
9
|
severity: info
|
|
@@ -49,8 +49,8 @@ example:
|
|
|
49
49
|
A 2023 Stanford study of 1,600 staff found remote work raised output by 4%.
|
|
50
50
|
|
|
51
51
|
not_flagged:
|
|
52
|
-
ja:
|
|
53
|
-
en: Only the phrases on chaff's list are checked. A citation right after the phrase does not silence it, since the sentence can name the study itself. In Japanese, 研究によると and 専門家によると, which often follow their source, are checked only as ある・最近の・多くの forms, と言われる only as と言われている (not よく言われる, which mostly talks about the saying itself), and 一般的に alone is not checked. Nor is a quotation reported as told on an occasion or by a named sayer (申し込んだら、「…」と言われています, 業者から「…」と言われている), since someone did say it.
|
|
52
|
+
ja: 一覧にある言い回しだけを見ます。すぐ後ろに出典が書いてあっても指摘します(文の中で研究の名前を言えるため)。日本語では、前に出典が来やすい「研究によると」「専門家によると」は「ある」「最近の」「多くの」が付いた形だけを、「と言われる」は「と言われている」だけを見ます(「よく言われる話」のように言い回しを話題にするものは見ません)。「一般的に」だけでは指しません。その場で相手から言われた言葉を引用して伝える形(「申し込んだら、「…」と言われています」「業者から「…」と言われている」)も、言った人がいるので指しません。語や名前の由来を言う節に続く形(「洗練から作られた造語であるといわれています」)は、定まった出典の無い語源の諸説をぼかして伝えるので指しません。英語の主語だけの scientists believe は、科学の解説が分野の今の見方を言う形なので一覧に入れていません(some・many など数を言う語が付けば、名前の無い一部の人に預けるので指します)。
|
|
53
|
+
en: Only the phrases on chaff's list are checked. A citation right after the phrase does not silence it, since the sentence can name the study itself. In Japanese, 研究によると and 専門家によると, which often follow their source, are checked only as ある・最近の・多くの forms, と言われる only as と言われている (not よく言われる, which mostly talks about the saying itself), and 一般的に alone is not checked. Nor is a quotation reported as told on an occasion or by a named sayer (申し込んだら、「…」と言われています, 業者から「…」と言われている), since someone did say it. Nor is と言われている after a clause naming where a word or a name comes from (造語であるといわれています), which hedges an origin no one source settles. A bare "scientists believe" is not on the list, since science explainers use it to state the field's current view; with a quantifier (some, many, most, a few, several scientists believe) it is.
|
|
54
54
|
level_meaning:
|
|
55
55
|
ja: 当てはまる言い回しが {limit} 箇所あれば指摘
|
|
56
56
|
en: reported once there {limit|is|are} {limit}
|
|
@@ -43,8 +43,8 @@ example:
|
|
|
43
43
|
The job that builds the site runs nightly. The script that checks links runs hourly. The task that sends mail runs daily. The file that stores the keys is encrypted.
|
|
44
44
|
|
|
45
45
|
not_flagged:
|
|
46
|
-
ja: 読点のある非限定の節(the rule, which we added,)、前置詞の後ろの which(in which
|
|
47
|
-
en: 'A non-restrictive clause set off by a comma ("the rule, which we added,"), "which" after a preposition ("in which"), a "that" followed by its own subject ("the report that we wrote", "the fact that it works"), a document where the usual form appears fewer than 3 times, and one where the fewer form passes the level (used on purpose) are not reported. Text inside quotation marks (single ones too, ‘…’, even over several sentences) and block quotations (a > paragraph, a paragraph opening with a bracketed alteration such as [T]he, or one that goes on in lowercase after a paragraph left without a full stop) keep the quoted text''s wording and are not counted.'
|
|
46
|
+
ja: 読点のある非限定の節(the rule, which we added,)、前置詞の後ろの which(in which)、契約の決まった言い方で条件を添える節(consent which will not be unreasonably withheld。読点が無くても非限定)、that の後ろに主語が来る節(the report that we wrote、the fact that it works)、多いほうが 3 箇所に満たない文書、少ないほうが水準の数を超える文書(使い分けている)は指しません。引用符の中(一重の引用符 '…' で文をまたぐ引用も)と、ブロック引用の段落(> の段落、[T]he のような角括弧の書き替えで始まる段落、文を閉じない段落の後ろで小文字の語から続く段落)は、引いた文の言葉なので数えません。
|
|
47
|
+
en: 'A non-restrictive clause set off by a comma ("the rule, which we added,"), "which" after a preposition ("in which"), a clause of set contract wording that adds a condition ("consent which will not be unreasonably withheld", non-restrictive even without its comma), a "that" followed by its own subject ("the report that we wrote", "the fact that it works"), a document where the usual form appears fewer than 3 times, and one where the fewer form passes the level (used on purpose) are not reported. Text inside quotation marks (single ones too, ‘…’, even over several sentences) and block quotations (a > paragraph, a paragraph opening with a bracketed alteration such as [T]he, or one that goes on in lowercase after a paragraph left without a full stop) keep the quoted text''s wording and are not counted.'
|
|
48
48
|
level_meaning:
|
|
49
49
|
ja: 少ないほうの書き方が {limit} 箇所以下のとき指摘
|
|
50
50
|
en: reported when the fewer form appears {limit} {limit|time|times} or fewer
|
package/skills/chaff/SKILL.md
CHANGED
|
@@ -31,7 +31,9 @@ read. A contract checked as a blog post gets wrong findings, so choose the genre
|
|
|
31
31
|
guessed or default genre shows no guide, and `--no-guide` leaves it out.
|
|
32
32
|
|
|
33
33
|
A rule the genre turns off is listed under "did not run" with the genre as the reason. That is the preset's
|
|
34
|
-
choice, not a gap; turn it back on (`rules:` in `chaff.yaml`) only when the person asks.
|
|
34
|
+
choice, not a gap; turn it back on (`rules:` in `chaff.yaml`) only when the person asks. For minutes or notes made
|
|
35
|
+
from a transcript, use a business genre (`business/meeting-notes`): `filler-word` then reports fillers left in (ええと,
|
|
36
|
+
um, you know). `speech/transcript` is for a verbatim record and keeps them. Some of these are off
|
|
35
37
|
because chaff measured them to be mostly wrong for that kind of document on real, judged documents
|
|
36
38
|
([isamu/chaff-corpus](https://github.com/isamu/chaff-corpus)); turning one back on brings those false findings back.
|
|
37
39
|
|
|
@@ -51,6 +53,9 @@ After the findings comes the list of rules that did not run, and why. Only the d
|
|
|
51
53
|
the genre: a rule that compares documents runs only when chaff is given two or more files or a folder, and a rule
|
|
52
54
|
that reads meaning runs only under `npx chaffjs test` (below).
|
|
53
55
|
|
|
56
|
+
Some rules read only one language and say so when they do not run: `ra-nuki` (見れる for 見られる) and `sa-ire`
|
|
57
|
+
(読まさせて for 読ませて) are Japanese only.
|
|
58
|
+
|
|
54
59
|
A run over several files prints only the files that have findings. To call one file clean, run chaff on that
|
|
55
60
|
file alone and read its list.
|
|
56
61
|
|
|
@@ -72,7 +77,8 @@ calls nothing. Ask the person before a real run; the passages leave the machine.
|
|
|
72
77
|
| | When | How |
|
|
73
78
|
| --- | --- | --- |
|
|
74
79
|
| Fix the text | The finding is right | Edit the sentence. Keep the meaning, the facts and the numbers; change only how it is said. |
|
|
75
|
-
| Silence that spot | Right in general, wrong here (a quotation, a term that must repeat) | `<!-- stet: rule-id — reason -->` before it; `stet-section` / `stet-file` for wider scope. Always give the reason. |
|
|
80
|
+
| Silence that spot | Right in general, wrong here (a quotation, a term that must repeat) | `<!-- stet: rule-id — reason -->` before it; `stet-section` / `stet-file` for wider scope, `<!-- stet-begin: rule-id — reason -->` … `<!-- stet-end -->` for a range, `rule-id["word"]` to silence one matched word only. Always name the rules (there is no all-rules form) and give the reason. |
|
|
81
|
+
| Allow that text everywhere | The same text is always right for this team (a product name, a quoted form) | An entry under `allow:` in `chaff.yaml`: `text:` (literal) or `pattern:` (regex), `reason:` (required), optional `rules:` and `files:`. `npx chaffjs suppressions` lists what it silenced. |
|
|
76
82
|
| Change the rule | Wrong for this team or genre | `npx chaffjs relax <rule-id> --why "reason"` (or `strict` / `off`). The reason and date are written into `chaff.yaml`. |
|
|
77
83
|
|
|
78
84
|
`npx chaffjs explain <rule-id>` shows why a rule exists, its levels and the current one. Read it before
|
|
@@ -84,6 +90,9 @@ When a finding is wrong for a reason that is not about this team (chaff misread
|
|
|
84
90
|
`npx chaffjs feedback <file> --rule <rule-id> --line <n>`: it drafts a report and sends nothing. A document the
|
|
85
91
|
person may share can go to isamu/chaff-corpus, where wrong findings become test cases and rule fixes.
|
|
86
92
|
|
|
93
|
+
`heading-marker-no-space` (`##Steps`, `#見出し`: no space after the marks, so the line is not a heading) is fixed by
|
|
94
|
+
adding the one space; keep the level and the words. If the line was a tag or a number, not a heading, leave it and say so.
|
|
95
|
+
|
|
87
96
|
## When numbers or dates disagree
|
|
88
97
|
|
|
89
98
|
The group "Facts that disagree" in `npx chaffjs rules` checks what a sum or a calendar can settle. Among them:
|
|
@@ -96,6 +105,12 @@ Such a finding says two places in the document disagree. It does not say which o
|
|
|
96
105
|
Never "fix" it by changing the figure that was right, and never adjust both so they merely agree. If you cannot
|
|
97
106
|
tell which is right, leave both and ask.
|
|
98
107
|
|
|
108
|
+
## When Markdown hides a section
|
|
109
|
+
|
|
110
|
+
Some findings are Markdown slips that drop a section from the outline: `pseudo-heading` is a bold line standing in for
|
|
111
|
+
a heading ("**Next steps**") in a document that otherwise uses headings. Make it a real heading one level below the
|
|
112
|
+
heading above it; if it is not a section of its own, drop the bold and write it into the text. Do not change its words.
|
|
113
|
+
|
|
99
114
|
## Tune chaff.yaml
|
|
100
115
|
|
|
101
116
|
- `npx chaffjs init --genre <genre>` writes a commented `chaff.yaml` for that genre when there is none (an
|
|
@@ -106,17 +121,31 @@ tell which is right, leave both and ask.
|
|
|
106
121
|
- A level is `strict` / `normal` / `relaxed` / `off`; when even `relaxed` is too tight, a positive number is the
|
|
107
122
|
limit itself (`max-sentence-length: 260`). A rule with nothing to count takes fewer levels, and no number;
|
|
108
123
|
`levels_you_can_set` in `rules --json` lists them.
|
|
109
|
-
- `prefer:` maps spellings to the team's (`e-mail: email`); `preferred-term: normal` turns the rule on.
|
|
124
|
+
- `prefer:` maps spellings to the team's (`e-mail: email`); `preferred-term: normal` turns the rule on. An entry
|
|
125
|
+
limited to some parts of the document takes the object form: `our firm: { use: our company, scope: [~quote] }`.
|
|
126
|
+
- `terms:` lists names and terms with one fixed form (`[GitHub, JavaScript]`); `term-form` reports a form that
|
|
127
|
+
differs only in case, width, hyphens or spaces (`Github`, `GitHub`, `Java Script`), outside code, URLs and paths.
|
|
128
|
+
Without `terms:` the rule does not run, and the list of rules not run says so.
|
|
129
|
+
- `consistent:` lists groups of words that are each right but must not be mixed (`[[顧客, お客様], [log in, sign in]]`);
|
|
130
|
+
`term-consistency` reports the less-used member within a document (a tie is one finding that takes no side), and
|
|
131
|
+
`cross-doc-term-variant` compares the groups across the files of one run. Without `consistent:` the rule does not run,
|
|
132
|
+
and the list of rules not run says so.
|
|
110
133
|
- Unknown rule names and unreadable values are reported on stderr — read stderr after editing `chaff.yaml`.
|
|
111
134
|
- `genre:` sets the kind of document. `by_path` sets it per path, as a list of `files` globs, each with `genre`,
|
|
112
|
-
`language` or `
|
|
135
|
+
`language`, `profile`, `rules` or `options`, and an entry in any other shape is reported on stderr and not used:
|
|
113
136
|
|
|
114
137
|
```yaml
|
|
115
138
|
by_path:
|
|
116
139
|
- files: ["guides/**/*.md"]
|
|
117
140
|
genre: docs/manual
|
|
141
|
+
rules:
|
|
142
|
+
max-sentence-length: relaxed
|
|
118
143
|
```
|
|
119
144
|
|
|
145
|
+
An entry's `rules` and `options` are written as the top-level ones are. A file's level, weakest first: the default,
|
|
146
|
+
the genre, `style:`, top-level `rules:`, then the matching `by_path` entries' `rules` (the later entry wins). A rule
|
|
147
|
+
an entry turns off is listed as not run with the entry named; `explain` lists every entry that changes the rule.
|
|
148
|
+
|
|
120
149
|
A file's front matter `genre:` (or `type:`) sets that one file, when neither `genre:` nor a matching `by_path`
|
|
121
150
|
entry does. Strongest first: `--genre` for one run, then `by_path`, `genre:`, front matter, the path, the content,
|
|
122
151
|
and `blog/tech`. `rules:` wins over the genre's preset.
|
|
@@ -124,7 +153,15 @@ tell which is right, leave both and ask.
|
|
|
124
153
|
`verse` (a Japanese poem: each line ends a sentence) or `play` (a Japanese play: stage directions in () are split
|
|
125
154
|
from the spoken line). Leave it out: the genre or the content chooses it, and the first line of `npx chaffjs tree` shows the choice. `none` stops the choice.
|
|
126
155
|
- `names:` lists the team's names (organisations, products), each read as one name. `include:` adds files besides
|
|
156
|
+
Markdown when a folder is checked (`include: ["*.yaml"]`). `exclude:` leaves globs out of a folder walk
|
|
157
|
+
(`exclude: [vendor/**, CHANGELOG.md]`, matched like `by_path`), and a walk also leaves out what the `.gitignore`
|
|
158
|
+
files from the repository root (the nearest folder with `.git`) down ignore, plus `.git/info/exclude`. A file named on the command line is still checked; the summary says
|
|
159
|
+
how many files were left out and why.
|
|
160
|
+
|
|
127
161
|
Markdown when a folder is checked (`include: ["*.yaml"]`).
|
|
162
|
+
- `options: { no-mixed-desumasu: { body: desumasu, list: dearu, heading: dearu } }` (Japanese only) is for a team
|
|
163
|
+
that has chosen its register: in a region written there, a sentence in the other register is reported even with no
|
|
164
|
+
mix. Leave it out to keep the default, which takes no side and only flags the minority of a mix.
|
|
128
165
|
|
|
129
166
|
## Turn a team's style note into chaff.yaml
|
|
130
167
|
|
|
@@ -135,7 +172,7 @@ names or numbers:
|
|
|
135
172
|
number means), `levels`, `example`, `not_flagged`, and `genres` (whether it runs in each genre).
|
|
136
173
|
2. Split the note into single requirements; map each to the rule whose `summary` and `level_meaning` fit. A
|
|
137
174
|
number between levels is written as the number itself (`max-sentence-length: 80`). Spellings go under
|
|
138
|
-
`prefer`, in-house words under `jargon`, required headings under `required_sections`.
|
|
175
|
+
`prefer`, names with one fixed form under `terms`, words not to be mixed under `consistent`, in-house words under `jargon`, required headings under `required_sections`.
|
|
139
176
|
3. Say plainly what no rule covers. For example, `no-mixed-desumasu` flags a register mixed into a document, but
|
|
140
177
|
does not require a particular one; a document wholly in the other register is not reported.
|
|
141
178
|
4. Write only what differs from the default, then check before committing: `npx chaffjs explain <rule-id>`, a
|
|
@@ -148,7 +185,7 @@ Pick the easiest way that can say the requirement:
|
|
|
148
185
|
|
|
149
186
|
| Requirement | Use |
|
|
150
187
|
| --- | --- |
|
|
151
|
-
| An existing rule covers it | A level, a number, `prefer`, `jargon` or `required_sections` in `chaff.yaml` |
|
|
188
|
+
| An existing rule covers it | A level, a number, `prefer`, `terms`, `consistent`, `jargon` or `required_sections` in `chaff.yaml` |
|
|
152
189
|
| A fixed phrase or pattern, with the team's own message | `custom_rules` of type `words` or `pattern` |
|
|
153
190
|
| Decided by part of speech or inflection | `custom_rules` of type `tokens` |
|
|
154
191
|
| Counting or comparing that the above cannot express | a Node function, `type: module` |
|
|
@@ -170,6 +207,12 @@ custom_rules:
|
|
|
170
207
|
ja: { before: 禁止ワードを使った文, after: 別の言い方の文 }
|
|
171
208
|
```
|
|
172
209
|
|
|
210
|
+
`scope:` on a `words`, `pattern` or `tokens` rule (and on a `prefer` entry) limits what it reads: `heading`, `list`,
|
|
211
|
+
`table`, `quote`, `paragraph` (body text outside the others). Without it, a rule reads body text and list items. Names
|
|
212
|
+
without `~` choose (none: every part), then names with `~` take parts away, so `[~quote]` is everything but
|
|
213
|
+
quotations and `[list, ~quote]` is list items outside quotations. A rule against 。 at the end of a heading is
|
|
214
|
+
`type: pattern`, `pattern: '。'`, `scope: [heading]`. An unknown name stops the run.
|
|
215
|
+
|
|
173
216
|
Test a new team rule the same way: `explain`, then a sample it must report and a sample it must not, before
|
|
174
217
|
committing `chaff.yaml`. The guide page "Adding a rule" covers each way and how to add a rule to chaff itself.
|
|
175
218
|
|
|
@@ -369,7 +412,8 @@ output before and after.
|
|
|
369
412
|
|
|
370
413
|
- `npx chaffjs tree <file>` shows a contract or specification as a tree of addresses (`3.2` for 第3条第2項 or
|
|
371
414
|
Section 3.2). A check reads the same tree to find references to missing provisions, numbering gaps and
|
|
372
|
-
terms defined twice.
|
|
415
|
+
terms defined twice. `enumeration-marker-mix` points at an item numbered in another form than the rest of its run
|
|
416
|
+
("1.", "2.", "3)", "4."; 「(1)」「(2)」「3.」); sub-items that count from 1 again are a level below and are left.
|
|
373
417
|
- `npx chaffjs cite <source> <quotes.json>` checks that quotations (`[{ "address", "quote" }]`) are really in
|
|
374
418
|
the source; exit 1 if any is not. Use it to back every quotation you put in an answer or a summary.
|
|
375
419
|
`cite --url <URL> <quotes.json>` checks against a web page; `cite --scaffold <file>` prints the quotations in a
|
package/src/allow.ts
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { Finding } from "./plugin.ts";
|
|
2
|
+
import { matches } from "./config/by-path.ts";
|
|
3
|
+
import { boundedMatches } from "./custom/bounded-match.ts";
|
|
4
|
+
import { PatternTimeout } from "./custom/pattern-timeout.ts";
|
|
5
|
+
import { regexRefusal, type RegexRefusal } from "./custom/regex-safety.ts";
|
|
6
|
+
import { lineStarts } from "./position.ts";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* chaff.yaml's `allow:` — text a team never wants reported (a product name, a quoted form), each with the reason.
|
|
10
|
+
* A finding placed inside an allowed occurrence is dropped and listed by `chaff suppressions` with that reason, as a
|
|
11
|
+
* stet is: an allowance without a reason, or one that silences quietly, would let the rules drift from the documents.
|
|
12
|
+
*/
|
|
13
|
+
export type AllowEntry = {
|
|
14
|
+
/** Where the entry is under allow: (allow[0]), for messages. */
|
|
15
|
+
readonly at: string;
|
|
16
|
+
/** A literal string (text:) or a regular expression (pattern:); exactly one is written. */
|
|
17
|
+
readonly text?: string | undefined;
|
|
18
|
+
readonly pattern?: string | undefined;
|
|
19
|
+
readonly reason: string;
|
|
20
|
+
/** Rule ids the entry covers; empty covers every rule. */
|
|
21
|
+
readonly rules: readonly string[];
|
|
22
|
+
/** Globs (from chaff.yaml's folder) of the files the entry covers; empty covers every file. */
|
|
23
|
+
readonly files: readonly string[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type AllowProblem =
|
|
27
|
+
| { readonly kind: "not-a-list"; readonly written: string }
|
|
28
|
+
| { readonly kind: "not-a-map" | "no-reason" | "no-target" | "both-targets" | "bad-rules" | "bad-files"; readonly at: string }
|
|
29
|
+
| { readonly kind: "bad-pattern"; readonly at: string; readonly refusal: RegexRefusal };
|
|
30
|
+
|
|
31
|
+
export type AllowRead = { readonly entries: readonly AllowEntry[]; readonly problems: readonly AllowProblem[] };
|
|
32
|
+
|
|
33
|
+
const PATTERN_FLAGS = "u";
|
|
34
|
+
|
|
35
|
+
const isRecord = (value: unknown): value is Record<string, unknown> => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36
|
+
|
|
37
|
+
const printed = (value: unknown): string => JSON.stringify(value) ?? String(value);
|
|
38
|
+
|
|
39
|
+
const nonEmpty = (value: unknown): string | undefined => (typeof value === "string" && value.trim() !== "" ? value : undefined);
|
|
40
|
+
|
|
41
|
+
/** A list of non-empty strings, or one string; undefined when written as anything else. Missing is the empty list. */
|
|
42
|
+
const stringsOf = (value: unknown): string[] | undefined => {
|
|
43
|
+
if (value === undefined || value === null) return [];
|
|
44
|
+
if (typeof value === "string") return value.trim() === "" ? undefined : [value.trim()];
|
|
45
|
+
if (!Array.isArray(value)) return undefined;
|
|
46
|
+
const items: unknown[] = value;
|
|
47
|
+
const strings = items.flatMap((item) => (nonEmpty(item) === undefined ? [] : [String(item).trim()]));
|
|
48
|
+
return strings.length === items.length ? strings : undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** The first thing wrong with one entry's target (text: or pattern:), or undefined. */
|
|
52
|
+
const targetProblem = (raw: Record<string, unknown>, at: string): AllowProblem | undefined => {
|
|
53
|
+
const text = nonEmpty(raw["text"]);
|
|
54
|
+
const pattern = nonEmpty(raw["pattern"]);
|
|
55
|
+
if (text !== undefined && pattern !== undefined) return { kind: "both-targets", at };
|
|
56
|
+
if (text === undefined && pattern === undefined) return { kind: "no-target", at };
|
|
57
|
+
const refusal = pattern === undefined ? undefined : regexRefusal(pattern, PATTERN_FLAGS);
|
|
58
|
+
return refusal === undefined ? undefined : { kind: "bad-pattern", at, refusal };
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const entryOf = (raw: unknown, index: number): AllowEntry | AllowProblem => {
|
|
62
|
+
const at = `allow[${String(index)}]`;
|
|
63
|
+
if (!isRecord(raw)) return { kind: "not-a-map", at };
|
|
64
|
+
const target = targetProblem(raw, at);
|
|
65
|
+
if (target !== undefined) return target;
|
|
66
|
+
const reason = nonEmpty(raw["reason"]);
|
|
67
|
+
if (reason === undefined) return { kind: "no-reason", at };
|
|
68
|
+
const rules = stringsOf(raw["rules"]);
|
|
69
|
+
if (rules === undefined) return { kind: "bad-rules", at };
|
|
70
|
+
const files = stringsOf(raw["files"]);
|
|
71
|
+
if (files === undefined) return { kind: "bad-files", at };
|
|
72
|
+
return { at, text: nonEmpty(raw["text"]), pattern: nonEmpty(raw["pattern"]), reason: reason.trim(), rules, files };
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const isProblem = (value: AllowEntry | AllowProblem): value is AllowProblem => "kind" in value;
|
|
76
|
+
|
|
77
|
+
const isEntry = (value: AllowEntry | AllowProblem): value is AllowEntry => !isProblem(value);
|
|
78
|
+
|
|
79
|
+
/** chaff.yaml's allow: as written, read into entries and the problems that stop the run. Pure. */
|
|
80
|
+
export const allowOf = (raw: unknown): AllowRead => {
|
|
81
|
+
if (raw === undefined || raw === null) return { entries: [], problems: [] };
|
|
82
|
+
if (!Array.isArray(raw)) return { entries: [], problems: [{ kind: "not-a-list", written: printed(raw) }] };
|
|
83
|
+
const items: unknown[] = raw;
|
|
84
|
+
const read = items.map((item, index) => entryOf(item, index));
|
|
85
|
+
return { entries: read.filter(isEntry), problems: read.filter(isProblem) };
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** The entries that cover this file. base is chaff.yaml's folder, as for by_path. */
|
|
89
|
+
export const allowFor = (entries: readonly AllowEntry[], base: string, path: string): AllowEntry[] =>
|
|
90
|
+
entries.filter((entry) => entry.files.length === 0 || entry.files.some((glob) => matches(glob, base, path)));
|
|
91
|
+
|
|
92
|
+
type Range = { readonly start: number; readonly end: number };
|
|
93
|
+
|
|
94
|
+
const literalRanges = (source: string, text: string): Range[] => {
|
|
95
|
+
const found: Range[] = [];
|
|
96
|
+
for (let at = source.indexOf(text); at !== -1; at = source.indexOf(text, at + text.length)) found.push({ start: at, end: at + text.length });
|
|
97
|
+
return found;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** A pattern that runs past its time budget allows nothing: the findings stay, rather than vanish on a guess. */
|
|
101
|
+
const patternRanges = (source: string, pattern: string): Range[] => {
|
|
102
|
+
try {
|
|
103
|
+
return (boundedMatches(pattern, PATTERN_FLAGS, [source])[0] ?? []).map((match) => ({ start: match.index, end: match.index + match.text.length }));
|
|
104
|
+
} catch (error) {
|
|
105
|
+
if (error instanceof PatternTimeout) return [];
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const rangesOf = (source: string, entry: AllowEntry): Range[] =>
|
|
111
|
+
entry.text !== undefined ? literalRanges(source, entry.text) : patternRanges(source, entry.pattern ?? "");
|
|
112
|
+
|
|
113
|
+
/** Where the finding is placed, as an offset into the source; undefined for a finding about the whole document. */
|
|
114
|
+
const offsetOf = (finding: Finding, starts: readonly number[]): number | undefined => {
|
|
115
|
+
const offset = finding.values["offset"];
|
|
116
|
+
if (typeof offset === "number") return offset;
|
|
117
|
+
if (finding.line < 1 || finding.column < 1) return undefined;
|
|
118
|
+
const lineStart = starts[finding.line - 1];
|
|
119
|
+
return lineStart === undefined ? undefined : lineStart + finding.column - 1;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type Allowed = { readonly finding: Finding; readonly entry: AllowEntry };
|
|
123
|
+
|
|
124
|
+
export type AllowApplied = { readonly kept: readonly Finding[]; readonly allowed: readonly Allowed[] };
|
|
125
|
+
|
|
126
|
+
/** Drops each finding placed inside an occurrence an entry allows for the finding's rule. entries are this file's (allowFor). */
|
|
127
|
+
export const applyAllow = (source: string, findings: readonly Finding[], entries: readonly AllowEntry[]): AllowApplied => {
|
|
128
|
+
if (entries.length === 0 || findings.length === 0) return { kept: findings, allowed: [] };
|
|
129
|
+
const starts = lineStarts(source);
|
|
130
|
+
const ranged = entries.map((entry) => ({ entry, ranges: rangesOf(source, entry) }));
|
|
131
|
+
const matched = findings.map((finding) => {
|
|
132
|
+
const offset = offsetOf(finding, starts);
|
|
133
|
+
const hit =
|
|
134
|
+
offset === undefined
|
|
135
|
+
? undefined
|
|
136
|
+
: ranged.find(
|
|
137
|
+
({ entry, ranges }) =>
|
|
138
|
+
(entry.rules.length === 0 || entry.rules.includes(finding.rule)) && ranges.some((range) => offset >= range.start && offset < range.end),
|
|
139
|
+
);
|
|
140
|
+
return { finding, entry: hit?.entry };
|
|
141
|
+
});
|
|
142
|
+
return {
|
|
143
|
+
kept: matched.filter((pair) => pair.entry === undefined).map((pair) => pair.finding),
|
|
144
|
+
allowed: matched.flatMap((pair) => (pair.entry === undefined ? [] : [{ finding: pair.finding, entry: pair.entry }])),
|
|
145
|
+
};
|
|
146
|
+
};
|
package/src/check-source.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { loadAdapter } from "./adapter-load.ts";
|
|
2
2
|
import { applyByPath } from "./config/by-path.ts";
|
|
3
|
+
import { configForPath } from "./config/by-path-rules.ts";
|
|
3
4
|
import type { Config } from "./config/load.ts";
|
|
4
5
|
import { optionLayersOf } from "./config/option-problems.ts";
|
|
5
6
|
import { limitsFor } from "./config/style.ts";
|
|
@@ -12,7 +13,9 @@ import { resolveGenre, type ResolvedGenre } from "./resolve-genre.ts";
|
|
|
12
13
|
import { neededBy, runRulesWith, type RunContext, type RunResult } from "./run.ts";
|
|
13
14
|
import { runCrossRules } from "./cross-run.ts";
|
|
14
15
|
import { CROSS_DETECTORS } from "./detectors/index.ts";
|
|
15
|
-
import { applySuppressions, type Applied } from "./stet.ts";
|
|
16
|
+
import { applySuppressions, knownRulesOf, type Applied } from "./stet.ts";
|
|
17
|
+
import type { PerFile } from "./render/suppressions.ts";
|
|
18
|
+
import { allowFor, allowOf, applyAllow, type AllowEntry, type Allowed } from "./allow.ts";
|
|
16
19
|
|
|
17
20
|
/** A document's language when nothing names one for this run: its by_path entry, chaff.yaml's language, then a guess from the text. */
|
|
18
21
|
export const documentLanguage = (path: string, source: string, config: Config): string =>
|
|
@@ -21,7 +24,19 @@ export const documentLanguage = (path: string, source: string, config: Config):
|
|
|
21
24
|
/** What this run chose over the settings: a language and a genre, when given, and whether experimental rules run. */
|
|
22
25
|
export type CheckChoice = { readonly language?: string | undefined; readonly genre?: string | undefined; readonly experimental: boolean };
|
|
23
26
|
|
|
24
|
-
/**
|
|
27
|
+
/** Findings after stet and chaff.yaml's allow: kept holds what neither silenced; allowed what an allow entry did. */
|
|
28
|
+
export type Silenced = Applied & { readonly allowed: readonly Allowed[] };
|
|
29
|
+
|
|
30
|
+
/** What `chaff suppressions` lists for one file: what stet and allow silenced, stets without a reason, range stets and stet problems. */
|
|
31
|
+
export const silencedOf = (applied: Silenced): Omit<PerFile, "path" | "notRun"> => ({
|
|
32
|
+
suppressed: applied.suppressed,
|
|
33
|
+
allowed: applied.allowed,
|
|
34
|
+
reasonless: applied.unusedReasonless,
|
|
35
|
+
ranges: applied.ranges,
|
|
36
|
+
problems: applied.problems,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** One document linted: the rules that ran and why others did not, before and after stet and allow silenced some. */
|
|
25
40
|
export type SourceCheck = {
|
|
26
41
|
readonly language: string;
|
|
27
42
|
readonly genre: ResolvedGenre;
|
|
@@ -30,7 +45,9 @@ export type SourceCheck = {
|
|
|
30
45
|
/** What the rules ran with. The pass over several documents runs with it too. */
|
|
31
46
|
readonly context: RunContext;
|
|
32
47
|
readonly raw: RunResult;
|
|
33
|
-
readonly applied:
|
|
48
|
+
readonly applied: Silenced;
|
|
49
|
+
/** chaff.yaml's allow entries that cover this file. The pass over several documents applies them too. */
|
|
50
|
+
readonly allow: readonly AllowEntry[];
|
|
34
51
|
};
|
|
35
52
|
|
|
36
53
|
/** What the language adapter is asked to prepare for these rules under this chaff.yaml: what the running rules read, nothing more. */
|
|
@@ -43,7 +60,8 @@ export const adapterNeedsOf = (
|
|
|
43
60
|
): AdapterNeeds => neededBy(rules, config.rules, experimental, genre, language);
|
|
44
61
|
|
|
45
62
|
/** Lints one text as `chaff <file>` does. The file need not exist: `chaff grade` checks a model's output from memory. */
|
|
46
|
-
export const checkSource = async (path: string, source: string,
|
|
63
|
+
export const checkSource = async (path: string, source: string, written: Config, choice: CheckChoice): Promise<SourceCheck> => {
|
|
64
|
+
const config = configForPath(written, path);
|
|
47
65
|
const language = choice.language ?? documentLanguage(path, source, config);
|
|
48
66
|
const adapter = await loadAdapter(language);
|
|
49
67
|
const genre = resolveGenre(path, source, config, choice.genre);
|
|
@@ -57,18 +75,24 @@ export const checkSource = async (path: string, source: string, config: Config,
|
|
|
57
75
|
limits: limitsFor(config, language),
|
|
58
76
|
optionLayers: optionLayersOf(config),
|
|
59
77
|
detectors: config.extensions?.detectors ?? {},
|
|
78
|
+
levelsFrom: config.pathLevelsFrom ?? {},
|
|
60
79
|
};
|
|
61
80
|
const raw = runRulesWith(doc, rules, context);
|
|
62
|
-
|
|
81
|
+
const allow = allowFor(allowOf(config.allow).entries, config.baseDir, path);
|
|
82
|
+
return { language, genre, rules, doc, context, raw, allow, applied: suppressedIn(source, doc, raw, rules, allow) };
|
|
63
83
|
};
|
|
64
84
|
|
|
65
|
-
/** stet
|
|
66
|
-
const suppressedIn = (text: string, doc: ProseDocument, raw: RunResult):
|
|
67
|
-
applySuppressions(
|
|
85
|
+
/** stet で黙らせたものと、chaff.yaml の allow に当たるものは、ここで落とす。stet が先、allow が後。どちらも text(読んだままの本文)から読む。 */
|
|
86
|
+
const suppressedIn = (text: string, doc: ProseDocument, raw: RunResult, rules: readonly RuleDefinition[], allow: readonly AllowEntry[]): Silenced => {
|
|
87
|
+
const stetted = applySuppressions(
|
|
68
88
|
text,
|
|
69
89
|
raw.findings,
|
|
70
90
|
doc.sections.map((section) => section.span),
|
|
91
|
+
knownRulesOf(rules),
|
|
71
92
|
);
|
|
93
|
+
const allowed = applyAllow(text, stetted.kept, allow);
|
|
94
|
+
return { ...stetted, kept: allowed.kept, allowed: allowed.allowed };
|
|
95
|
+
};
|
|
72
96
|
|
|
73
97
|
/**
|
|
74
98
|
* The checks of one run's documents, with the rules that compare documents run over all of them (cross-run.ts), and
|
|
@@ -79,6 +103,6 @@ export const crossChecked = (checks: readonly SourceCheck[], detectors: Readonly
|
|
|
79
103
|
const results = runCrossRules(checks, detectors);
|
|
80
104
|
return checks.map((check, index) => {
|
|
81
105
|
const raw = results[index] ?? check.raw;
|
|
82
|
-
return raw === check.raw ? check : { ...check, raw, applied: suppressedIn(check.doc.source, check.doc, raw) };
|
|
106
|
+
return raw === check.raw ? check : { ...check, raw, applied: suppressedIn(check.doc.source, check.doc, raw, check.rules, check.allow) };
|
|
83
107
|
});
|
|
84
108
|
};
|