rubocop-prose 0.1.0 → 0.2.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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +10 -2
  3. data/CHANGELOG.md +20 -0
  4. data/CONTRIBUTING.md +17 -7
  5. data/DESIGN.md +13 -5
  6. data/README.md +37 -20
  7. data/RELEASING.md +8 -8
  8. data/UPGRADING.md +16 -0
  9. data/assets/README.md +1 -1
  10. data/config/cops/markdown/code_block_style.yml +1 -1
  11. data/config/cops/markdown/emphasis_style.yml +4 -0
  12. data/config/cops/markdown/fence_style.yml +1 -1
  13. data/config/cops/markdown/first_heading.yml +1 -2
  14. data/config/cops/markdown/front_matter_keys.yml +5 -0
  15. data/config/cops/markdown/front_matter_syntax.yml +3 -0
  16. data/config/cops/markdown/hard_break_style.yml +3 -0
  17. data/config/cops/markdown/hard_tabs.yml +1 -1
  18. data/config/cops/markdown/heading_capitalization.yml +31 -0
  19. data/config/cops/markdown/heading_style.yml +1 -1
  20. data/config/cops/markdown/{syntax.yml → kramdown_syntax.yml} +1 -1
  21. data/config/cops/markdown/list_item_capitalization.yml +32 -0
  22. data/config/cops/markdown/list_item_punctuation.yml +13 -0
  23. data/config/cops/markdown/list_marker_spacing.yml +6 -5
  24. data/config/cops/markdown/ordered_list_numbering.yml +1 -1
  25. data/config/cops/markdown/reference_definitions.yml +2 -3
  26. data/config/cops/markdown/strong_style.yml +4 -0
  27. data/config/cops/markdown/structural_line_length.yml +1 -4
  28. data/config/cops/markdown/table_pipes.yml +6 -0
  29. data/config/cops/markdown/table_spacing.yml +4 -0
  30. data/config/cops/markdown/trailing_whitespace.yml +1 -0
  31. data/config/cops/markdown/unordered_list_marker.yml +1 -1
  32. data/config/cops/prose/sentence_capitalization.yml +9 -0
  33. data/config/cops/text/hard_tabs.yml +3 -0
  34. data/config/cops/text/proper_names.yml +4 -0
  35. data/config/obsoletion.yml +45 -0
  36. data/docs/cops/markdown/blockquote_spacing.md +2 -0
  37. data/docs/cops/markdown/code_block_style.md +11 -2
  38. data/docs/cops/markdown/duplicate_headings.md +51 -0
  39. data/docs/cops/markdown/emphasis_style.md +5 -1
  40. data/docs/cops/markdown/fence_style.md +11 -2
  41. data/docs/cops/markdown/first_heading.md +29 -3
  42. data/docs/cops/markdown/front_matter_keys.md +57 -0
  43. data/docs/cops/markdown/front_matter_syntax.md +32 -0
  44. data/docs/cops/markdown/hard_break_style.md +10 -5
  45. data/docs/cops/markdown/hard_tabs.md +3 -3
  46. data/docs/cops/markdown/heading_capitalization.md +176 -0
  47. data/docs/cops/markdown/heading_style.md +11 -2
  48. data/docs/cops/markdown/{syntax.md → kramdown_syntax.md} +6 -2
  49. data/docs/cops/markdown/list_item_capitalization.md +115 -0
  50. data/docs/cops/markdown/list_item_punctuation.md +70 -0
  51. data/docs/cops/markdown/list_marker_spacing.md +57 -7
  52. data/docs/cops/markdown/ordered_list_numbering.md +10 -1
  53. data/docs/cops/markdown/proper_names.md +3 -3
  54. data/docs/cops/markdown/raw_html.md +99 -6
  55. data/docs/cops/markdown/reference_definitions.md +30 -4
  56. data/docs/cops/markdown/strong_style.md +5 -1
  57. data/docs/cops/markdown/structural_line_length.md +31 -7
  58. data/docs/cops/markdown/table_pipes.md +7 -1
  59. data/docs/cops/markdown/table_spacing.md +5 -1
  60. data/docs/cops/markdown/thematic_break_style.md +2 -0
  61. data/docs/cops/markdown/trailing_whitespace.md +29 -0
  62. data/docs/cops/markdown/unordered_list_marker.md +11 -2
  63. data/docs/cops/prose/multiple_blank_lines.md +2 -0
  64. data/docs/cops/prose/sentence_capitalization.md +46 -0
  65. data/docs/cops/text/hard_tabs.md +28 -0
  66. data/docs/cops/text/proper_names.md +36 -0
  67. data/docs/settings/files.md +1 -1
  68. data/docs/settings/front_matter.md +2 -2
  69. data/lib/rubocop/cop/markdown/code_block_style.rb +1 -1
  70. data/lib/rubocop/cop/markdown/code_span_spacing.rb +2 -2
  71. data/lib/rubocop/cop/markdown/duplicate_headings.rb +55 -5
  72. data/lib/rubocop/cop/markdown/emphasis_spacing.rb +1 -1
  73. data/lib/rubocop/cop/markdown/emphasis_style.rb +7 -0
  74. data/lib/rubocop/cop/markdown/fence_style.rb +1 -1
  75. data/lib/rubocop/cop/markdown/first_heading.rb +13 -2
  76. data/lib/rubocop/cop/markdown/front_matter_keys.rb +70 -0
  77. data/lib/rubocop/cop/markdown/front_matter_syntax.rb +26 -0
  78. data/lib/rubocop/cop/markdown/hard_tabs.rb +11 -7
  79. data/lib/rubocop/cop/markdown/heading_capitalization.rb +43 -0
  80. data/lib/rubocop/cop/markdown/heading_style.rb +1 -1
  81. data/lib/rubocop/cop/markdown/{syntax.rb → kramdown_syntax.rb} +1 -1
  82. data/lib/rubocop/cop/markdown/list_item_capitalization.rb +90 -0
  83. data/lib/rubocop/cop/markdown/list_item_punctuation.rb +64 -0
  84. data/lib/rubocop/cop/markdown/list_marker_spacing.rb +13 -4
  85. data/lib/rubocop/cop/markdown/ordered_list_numbering.rb +1 -1
  86. data/lib/rubocop/cop/markdown/outside_spacing.rb +6 -6
  87. data/lib/rubocop/cop/markdown/proper_names.rb +20 -31
  88. data/lib/rubocop/cop/markdown/raw_html.rb +62 -7
  89. data/lib/rubocop/cop/markdown/reference_definitions.rb +15 -5
  90. data/lib/rubocop/cop/markdown/strong_style.rb +7 -0
  91. data/lib/rubocop/cop/markdown/structural_line_length.rb +7 -6
  92. data/lib/rubocop/cop/markdown/table_blank_lines.rb +1 -1
  93. data/lib/rubocop/cop/markdown/table_columns.rb +1 -1
  94. data/lib/rubocop/cop/markdown/table_pipes.rb +8 -1
  95. data/lib/rubocop/cop/markdown/table_spacing.rb +8 -1
  96. data/lib/rubocop/cop/markdown/thematic_break_style.rb +4 -0
  97. data/lib/rubocop/cop/markdown/trailing_whitespace.rb +6 -0
  98. data/lib/rubocop/cop/markdown/unordered_list_marker.rb +1 -1
  99. data/lib/rubocop/cop/prose/sentence_capitalization.rb +100 -0
  100. data/lib/rubocop/cop/text/hard_tabs.rb +21 -0
  101. data/lib/rubocop/cop/text/proper_names.rb +20 -0
  102. data/lib/rubocop/prose/capitalization_rules.rb +189 -0
  103. data/lib/rubocop/prose/inline_rules.rb +17 -10
  104. data/lib/rubocop/prose/link_rules.rb +34 -13
  105. data/lib/rubocop/prose/markdown_document.rb +30 -8
  106. data/lib/rubocop/prose/proper_name_rules.rb +31 -0
  107. data/lib/rubocop/prose/structural_blank_lines.rb +1 -1
  108. data/lib/rubocop/prose/table_rules.rb +1 -1
  109. data/lib/rubocop/prose/version.rb +1 -1
  110. data/lib/rubocop-prose.rb +3 -0
  111. metadata +32 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df5161ee5df2bb5e5b642b3baefb5f95ec038cea286de98c177c317af2ed8115
4
- data.tar.gz: 2dde6ed1646ce551227eed6465856616056972e520ccc2830d65c2e035b7d74f
3
+ metadata.gz: 5b1db83138f25023651073aac3d37c15e31d5d4c5215240eee8ce6643c597142
4
+ data.tar.gz: 850c71239710eb866e74a303bf4c48d8841b3106af32a6e8ae5ed5a7e66ac709
5
5
  SHA512:
6
- metadata.gz: dcd9ff6b678a0ddcb11c07ec164a5f047f333bd656afe88f0f36eb80fac561c83ef5014de712ee08f212ea2a3f3cb1a291ee76ec70b8078462296538ba119b57
7
- data.tar.gz: 52279ff43345beeda93aebd8b718c66a5dc2dea1fcc801c9aab57a4ba467f0ae1d52d4ef1d180d128fc5c8cca9d5153e694980a05984f91583ea7080b9b73fdd
6
+ metadata.gz: 791f01d9d94227460b00b302869b68dc00a93e1f812920bb2d3854b62336cc51ec82a75048d8bcb57ca0eb4a2beb66a2abfc883614ecc7fc4de34b0b9de6cf82
7
+ data.tar.gz: 024d78fe0f8fb6f5189781df28c4421d203416f9fb18453b404e846dea087ba846a18b505614877f173a998b1bf7ee7164d1bf9f083bed480878c626a09ba243
data/AGENTS.md CHANGED
@@ -1,13 +1,21 @@
1
- # Contributor instructions
1
+ # Contributor Instructions
2
2
 
3
3
  Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tests, and pull-request conventions. Read [DESIGN.md](DESIGN.md) before changing parsing, source mapping, or correction behavior.
4
4
 
5
5
  Keep user guidance in the README and cop guides, contributor workflow in CONTRIBUTING, architecture and rationale in DESIGN, and this file focused on high-value agent guidance. Link to the authoritative documentation instead of duplicating it.
6
6
 
7
+ Migration documentation must identify the source released version, for example `Migrating From 0.1.0`, rather than using generic “Migration” or “earlier versions” wording. Put migration sections last in cop guides, after configuration and all good/bad examples. Keep them focused on required configuration changes and examples, without explaining validation machinery or restating unchanged settings. Do not describe unreleased schema iterations as migrations.
8
+
9
+ Verify each configuration migration once with a focused unit test of its RuboCop migration rule. Do not add integration tests for obsolete configurations; keep integration coverage focused on supported configuration and cop behavior.
10
+
11
+ Update DESIGN only for new architectural decisions or non-obvious invariants not already covered there. Do not add per-cop implementation summaries or repeat configuration behavior from cop guides; ordinary feature changes usually need no DESIGN update.
12
+
7
13
  Preserve original source buffers and character-based locations, Markdown container prefixes and hard breaks, and atomic inline syntax. Plain text must remain literal; format-specific cops must not inspect the other format. Withhold corrections when a safe rewrite cannot be established.
8
14
 
9
15
  Keep common cleanup enabled by default and project-specific, editorial, or renderer-dependent policies opt-in. Do not add an external preprocessor dependency. Preserve functional dependency loading and compatibility settings.
10
16
 
11
17
  When adding a cop, follow the checklist in [CONTRIBUTING.md](CONTRIBUTING.md#adding-a-cop); document its user-visible behavior and meaningful limits without repeating shared exclusions.
12
18
 
13
- Do not edit historical changelog entries or add one for documentation, tooling, refactoring, or unreleased functionality. Preserve the vendored helmet SVG and its license; follow CONTRIBUTING for artwork changes.
19
+ Enable new cops in this repository's `.rubocop.yml` and include applicable self-linting changes in the feature PR so reviewers can see their effect. Keep the distributed default independent: editorial policies remain opt-in for users.
20
+
21
+ Do not edit historical changelog entries or add one for documentation, tooling, refactoring, or unreleased functionality. Keep `- Your contribution here.` at the end of the `(Next)` changelog change list without a blank line above it; remove it only when preparing that version for release. Preserve the vendored helmet SVG and its license; follow CONTRIBUTING for artwork changes.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## 0.2.0 (2026/11/06)
6
+
7
+ - [#126](https://github.com/dblock/rubocop-prose/pull/126): Report unit and integration test coverage to Coveralls - [@dblock](https://github.com/dblock).
8
+ - [#138](https://github.com/dblock/rubocop-prose/pull/138): Add opt-in `Markdown/ListItemPunctuation` to check punctuation presence across sibling list items - [@dblock](https://github.com/dblock).
9
+ - [#139](https://github.com/dblock/rubocop-prose/pull/139): Add an opt-in exception for a single trailing space on empty Markdown blockquote lines, including nested quotes - [@dblock](https://github.com/dblock).
10
+ - [#140](https://github.com/dblock/rubocop-prose/pull/140): Add per-element attribute allowlists to `Markdown/RawHtml` - [@dblock](https://github.com/dblock).
11
+ - [#141](https://github.com/dblock/rubocop-prose/pull/141): Add opt-in `Markdown/HeadingCapitalization` with title-case and initial-capital styles and unsafe autocorrection - [@dblock](https://github.com/dblock).
12
+ - [#142](https://github.com/dblock/rubocop-prose/pull/142): Add opt-in `Markdown/ListItemCapitalization` with consistent, initial-capital, and title-case styles and unsafe autocorrection - [@dblock](https://github.com/dblock).
13
+ - [#143](https://github.com/dblock/rubocop-prose/pull/143): Add default-enabled YAML syntax diagnostics for closed leading Markdown front matter - [@dblock](https://github.com/dblock).
14
+ - [#145](https://github.com/dblock/rubocop-prose/pull/145): Add opt-in `Markdown/FrontMatterKeys` for allowed and required top-level YAML metadata keys - [@dblock](https://github.com/dblock).
15
+ - [#146](https://github.com/dblock/rubocop-prose/pull/146): Add aligned list marker spacing with configurable minimum padding; breaking configuration change: replace the four `Single`/`Multi` spacing options with shared `EnforcedStyle` and `MinSpaces` settings - [@dblock](https://github.com/dblock).
16
+ - [#148](https://github.com/dblock/rubocop-prose/pull/148): Add opt-in `Prose/SentenceCapitalization` for Markdown and plain-text paragraph openings, reporting literal lowercase terms without autocorrecting them - [@dblock](https://github.com/dblock).
17
+ - [#149](https://github.com/dblock/rubocop-prose/pull/149): Add `Text/ProperNames` and `Text/HardTabs` for literal plain text alongside their Markdown counterparts - [@dblock](https://github.com/dblock).
18
+ - [#150](https://github.com/dblock/rubocop-prose/pull/150): Support per-level document, sibling, or disabled duplicate-heading scopes with range and comparison selectors - [@dblock](https://github.com/dblock).
19
+ - [#151](https://github.com/dblock/rubocop-prose/pull/151): Simplify `Markdown/StructuralLineLength` to per-element widths or `false`, remove shared and paired settings, and add migration diagnostics - [@dblock](https://github.com/dblock).
20
+ - [#152](https://github.com/dblock/rubocop-prose/pull/152): Simplify `Markdown/ReferenceDefinitions` configuration; breaking change: replace `CheckDuplicates` and `AllowIdenticalDuplicates` with `Duplicates: forbid | allow_identical | allow`, and rename `CheckUnused` to `Unused`, with migration diagnostics - [@dblock](https://github.com/dblock).
21
+ - [#153](https://github.com/dblock/rubocop-prose/pull/153): Simplify `Markdown/FirstHeading` front-matter configuration; replace `FrontMatterTitle: true` and `TitleKey` with the metadata key in `FrontMatterTitle` - [@dblock](https://github.com/dblock).
22
+ - [#154](https://github.com/dblock/rubocop-prose/pull/154): Standardize Markdown cop style settings on `Style`, migrating released `EnforcedStyle` keys - [@dblock](https://github.com/dblock).
23
+ - [#159](https://github.com/dblock/rubocop-prose/pull/159): Support RuboCop-md 3.0.0; rename `Markdown/Syntax` to `Markdown/KramdownSyntax` to avoid its upstream cop-name collision - [@dblock](https://github.com/dblock).
24
+
5
25
  ## 0.1.0 (2026/11/03)
6
26
 
7
27
  - [#120](https://github.com/dblock/rubocop-prose/pull/120): Add a default-enabled Markdown hard-break style policy with backslash and trailing-space syntax options - [@dblock](https://github.com/dblock).
data/CONTRIBUTING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Contributing
2
2
 
3
- ## Setup and validation
3
+ ## Setup and Validation
4
4
 
5
5
  Use Ruby 3.2 or newer. Supported RuboCop versions are 1.72.1 and newer within 1.x.
6
6
 
@@ -14,13 +14,19 @@ The default Rake task runs RuboCop and the full test suite. For focused changes,
14
14
 
15
15
  CI covers Ruby 3.2 and 4.0, gem packaging, and optional Markdown-preprocessor interoperability. See the [workflows](.github/workflows) for suite selection and dependency versions.
16
16
 
17
- The lint configuration loads this checkout's plugin alongside rubocop-rspec and rubocop-rake; intentionally invalid fixtures are excluded.
17
+ Run `COVERAGE=true bundle exec rake spec` to generate an HTML report in `coverage/` and `coverage/.resultset.json` for Coveralls. CI combines the Ruby 4.0 unit and standalone integration reports on [Coveralls](https://coveralls.io/github/dblock/rubocop-prose); subprocess smoke tests and optional interoperability are not instrumented.
18
+
19
+ The lint configuration loads this checkout's plugin alongside `rubocop-rspec` and `rubocop-rake`; intentionally invalid fixtures are excluded.
20
+
21
+ The repository also enables applicable opt-in prose cops for self-linting without changing their distributed defaults. `Markdown/HeadingStructure` stays disabled because documents do not share an exact outline. `Markdown/StructuralLineLength` limits headings to 120 columns, not code samples or tables. Raw HTML is limited to images with `src`, `alt`, and `width` attributes for the README artwork; the README is exempt from `Markdown/FirstHeading` to preserve its leading logo.
18
22
 
19
23
  ### Benchmarks
20
24
 
21
25
  Run `bundle exec rake benchmark`; set `ITERATIONS` and `SECTIONS` to override sample counts and corpus sizes, for example `ITERATIONS=5 SECTIONS=10,50,100 bundle exec rake benchmark`.
22
26
 
23
- The benchmark compares document analysis, cop investigation, and in-memory autocorrection on Markdown and text corpora. Each operation constructs a fresh document; compare results only across revisions using the same Ruby, RuboCop, and corpus settings. Timings are machine-dependent, not CI thresholds.
27
+ The benchmark compares document analysis, cop investigation, and in-memory autocorrection on Markdown and text corpora, using both distributed defaults and this repository's configuration (`default` and `project` profiles). The corpora include Unicode, front matter, references, tables, code, multi-digit lists, capitalization, proper names, and hard tabs. Each operation constructs a fresh document; compare results only across revisions using the same Ruby, RuboCop, corpus, and profile settings. Output fingerprints verify stable diagnostics and corrections across iterations. Timings are machine-dependent, not CI thresholds.
28
+
29
+ The `document/markdown` operation measures the basic AST and paragraph source mapping; `analysis/markdown` also exercises link/reference scanning, table cells, and positioned emphasis independently of cop execution.
24
30
 
25
31
  ## Tests
26
32
 
@@ -28,19 +34,21 @@ Keep focused cop tests in `spec/<name>_spec.rb`. Cover offenses, exclusions, Uni
28
34
 
29
35
  Exercise the real CLI when changing plugin loading, stdin, suppression directives, or cross-cop corrections. Test both CLI-option and YAML plugin loading. Interoperability changes also need both preprocessor loading orders, simultaneous prose/Ruby corrections, repeated runs, and stdin.
30
36
 
31
- ### Integration fixtures
37
+ ### Integration Fixtures
32
38
 
33
39
  Scenarios live under `spec/fixtures/{prose,markdown,text,markdown_interoperability}/`, with specs in `spec/integration/` and `spec/interoperability/`. Each contains an `input` document, a `case.yml` declaring `offenses` and `remaining_offenses` counts (empty maps for clean results), and an `expected` document when correction changes the input.
34
40
 
35
41
  Content fixtures call `RuboCop::CLI` in-process with fresh configuration state, checking explicit files, discovery, corrections, repeated runs, and stdin with both plugin-loading configurations. Fixtures with explicit `Enabled: true` cop entries run with `--only`; others exercise configured defaults. Mark whitespace-sensitive fixtures using the existing Git attributes.
36
42
 
43
+ Set `unsafe_autocorrect: true` in `case.yml` for fixtures that require `-A` instead of safe autocorrection.
44
+
37
45
  Fresh-process smoke tests in `spec/integration/cli_spec.rb` check YAML and CLI-option plugin boot for Markdown and text, standard and custom-extension discovery, stdin without disk mutation, and stable corrections. Interoperability keeps a combined Ruby/Markdown scenario across both loading orders and plugin-loading mechanisms; edge cases check reporting, correction, and stability under both loading orders using YAML plugin loading.
38
46
 
39
47
  Mixed default-cop scenarios in `spec/fixtures/markdown_stability/` check content and document structure after every correction, convergence without cycles, and byte-identical output after stabilization.
40
48
 
41
- For optional interoperability, set `RUBOCOP_MD_PATH` to a checkout supporting the [original-buffer mapping API](DESIGN.md#preprocessor-interoperability) and run `bundle exec rake spec:interoperability`. Without that variable, the suite is skipped. Its separate CI workflow runs only on Ruby 4.0; update the rubocop-md ref when the required API is released.
49
+ For optional interoperability, set `RUBOCOP_MD_PATH` to a `rubocop-md` checkout at `v3.0.0` and run `bundle exec rake spec:interoperability`. This release provides the [original-buffer mapping API](DESIGN.md#preprocessor-interoperability). Without that variable, the suite is skipped. Its separate CI workflow runs only on Ruby 4.0 and pins the same released tag.
42
50
 
43
- ## Adding a cop
51
+ ## Adding a Cop
44
52
 
45
53
  Add implementations under `lib/rubocop/cop/prose`, `lib/rubocop/cop/markdown`, or `lib/rubocop/cop/text`, inheriting from the corresponding department `Base`. Add a per-cop YAML file under `config/cops/<department>/` with an explicit `Enabled` value, supported options, correction policy, and applicable file patterns. The loader discovers implementations and merges their configuration files.
46
54
 
@@ -48,12 +56,14 @@ Add focused specs, a guide under `docs/cops/<department>/` with complete default
48
56
 
49
57
  Validate defaults, packaging, and the affected tests. Enable broadly applicable cleanup by default; keep project-specific, editorial, and renderer-dependent policies opt-in. Preserve functional dependency loading and compatibility CI settings.
50
58
 
51
- ## Pull requests
59
+ ## Pull Requests
52
60
 
53
61
  See [RELEASING.md](RELEASING.md) for the maintainer release procedure.
54
62
 
55
63
  Keep each pull request focused, with one coherent commit, and use squash merges. Include behavior and configuration documentation. Preserve unrelated worktree changes.
56
64
 
65
+ For breaking changes, add a one-line migration summary to [UPGRADING](UPGRADING.md) under the target release, linking to the detailed cop guide. Describe only net changes since the source released version, not unreleased configuration iterations.
66
+
57
67
  Add a linked unreleased changelog entry only for a notable user-facing change, using the actual pull-request number. Do not add entries for documentation, tooling, refactoring, or unreleased functionality; update an existing feature entry when appropriate.
58
68
 
59
69
  ```markdown
data/DESIGN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Design
2
2
 
3
- ## Scope and file selection
3
+ ## Scope and File Selection
4
4
 
5
5
  The plugin checks Markdown and plain-text prose without evaluating Ruby snippets. `Prose/*` policies apply to both formats; `Markdown/*` and `Text/*` are format-specific. Common cleanup is enabled by default, while project-specific, editorial, and renderer-dependent policies remain opt-in. User-visible behavior and defaults are in [the README cops catalog](README.md#cops) and the cop guides.
6
6
 
@@ -8,7 +8,7 @@ The plugin checks Markdown and plain-text prose without evaluating Ruby snippets
8
8
 
9
9
  The plugin loads document support and abstract cop bases before concrete cops, then merges shared and per-cop defaults. The runner supplies a file's configuration before source construction when its selected format differs from RuboCop's default classification. This keeps nested configuration, explicit files, stdin, and autocorrection on the same dispatch path.
10
10
 
11
- ## Documents and source preservation
11
+ ## Documents and Source Preservation
12
12
 
13
13
  `Document` retains the untouched input buffer and exposes character-based ranges. `MarkdownDocument` parses Markdown and provides its structure; `TextDocument` groups nonblank lines into paragraphs without interpreting headings, links, fences, HTML, or metadata. Text indentation may indicate preformatted content, so indented paragraphs can be reported but are not automatically reflowed.
14
14
 
@@ -20,13 +20,19 @@ Standalone Markdown and all plain text initialize Ruby parsing with empty input
20
20
 
21
21
  Each Markdown document shares positioned emphasis and strong ranges across style and spacing cops, including table-row source mapping. Both types are collected in one parse; style policies remain cop-local, and corrected sources receive fresh documents.
22
22
 
23
- ## Preprocessor interoperability
23
+ Source-oriented table scanning is also shared per document across table cops and structural blank-line protection. Corrected sources rebuild the table analysis rather than reusing stale cell positions.
24
+
25
+ Eligible inline lines and their protected spans are shared per document, not across configurations or corrections. Link destination parsing is cached by original-source position, and rendered link labels by their exact source spelling; cached destinations always describe the untouched source, not the masked scanner buffer.
26
+
27
+ ## Preprocessor Interoperability
24
28
 
25
29
  An optional Markdown preprocessor can expose `processed_source.markdown_document` with an untouched `buffer` and `original_range` / `processed_range` mapping methods. The plugin analyzes that original buffer and translates offense and correction ranges at the RuboCop boundary, preserving the preprocessor's Ruby buffer so both kinds of corrections can coexist. This API is optional; standalone Markdown and text linting do not require a preprocessor.
26
30
 
27
31
  Plain text never consults the preprocessor API. A preprocessor without the original-buffer mapping methods is unsupported. Custom Markdown extensions remain lintable standalone when the preprocessor does not recognize them; Ruby extraction is then unavailable. The shared `Markdown:` section preserves keys owned by the preprocessor, while `IgnoreFrontMatter` belongs to this plugin.
28
32
 
29
- ## Correction safety
33
+ Parser warnings belong to `Markdown/KramdownSyntax` in this plugin. The former `Markdown/Syntax` name is not registered as obsolete because RuboCop-md 3.0.0 owns that name; rejecting or redirecting it would break valid preprocessor configuration.
34
+
35
+ ## Correction Safety
30
36
 
31
37
  Corrections are limited to rewrites whose source mapping and resulting document semantics are known. Markdown reflow preserves container prefixes, hard breaks, inline atomic syntax, and HTML break behavior; text preserves literal contents and paragraph boundaries. Unbreakable tokens and ambiguous structural rewrites can be reported without correction. Markdown structural checks do not reflow headings, tables, or code.
32
38
 
@@ -42,10 +48,12 @@ Shell-prompt removal preserves code-content ranges and container prefixes. Block
42
48
 
43
49
  `Markdown/ListContinuationIndentation` uses parsed list-item membership and each paragraph's original-source mapping to find continuation lines, excluding following root paragraphs and child list blocks. Its expected column comes from the parsed item's marker, so ordered marker widths and container prefixes are retained. It reports only: reindentation could change Markdown block ownership, so no correction is offered.
44
50
 
51
+ `Markdown/ListItemPunctuation` uses parsed sibling membership and rendered inline text to check only terminal punctuation presence, not the punctuation character. Consistent mode uses the first item as its baseline; explicit always/never styles inspect every eligible item against the configured policy. It checks a list only when every item has exactly one paragraph and a source-mapped marker; code and multi-block items are ambiguous and skipped. Nested lists remain independent.
52
+
45
53
  Cop guides describe user-visible behavior and correction limits. Parsing, source mapping, and correction rationale belong here rather than in individual guides.
46
54
 
47
55
  ## Artwork
48
56
 
49
57
  The logo pairs the RuboCop helmet with a parchment scroll, keeping both silhouettes legible at the README's 160px display size. Its opaque white background preserves contrast on dark pages.
50
58
 
51
- `assets/rubocop-logo.svg` is copied unchanged from [the official website's SVG at a pinned commit](https://github.com/rubocop/rubocop.org/blob/e48d295d87264ea7dbfa0c6df7c7c4b56670979d/src/images/favicon.svg). The upstream MIT copyright and permission notice is preserved in [assets/RUBOCOP-LICENSE](assets/RUBOCOP-LICENSE); the newly drawn scroll uses this repository's [MIT license](LICENSE.txt). Editing and rendering instructions are in [CONTRIBUTING.md](CONTRIBUTING.md#artwork), and all artwork sources, rendered images, and the notice are packaged together.
59
+ The `assets/rubocop-logo.svg` asset is copied unchanged from [the official website's SVG at a pinned commit](https://github.com/rubocop/rubocop.org/blob/e48d295d87264ea7dbfa0c6df7c7c4b56670979d/src/images/favicon.svg). The upstream MIT copyright and permission notice is preserved in [assets/RUBOCOP-LICENSE](assets/RUBOCOP-LICENSE); the newly drawn scroll uses this repository's [MIT license](LICENSE.txt). Editing and rendering instructions are in [CONTRIBUTING.md](CONTRIBUTING.md#artwork), and all artwork sources, rendered images, and the notice are packaged together.
data/README.md CHANGED
@@ -1,13 +1,20 @@
1
1
  <img src="assets/logo.gif" alt="The RuboCop helmet logo alongside a parchment scroll rolling up and unfurling." width="160">
2
2
 
3
- # rubocop-prose
3
+ # `rubocop-prose`
4
4
 
5
- [![Lint](https://github.com/dblock/rubocop-prose/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/dblock/rubocop-prose/actions/workflows/lint.yml) [![Tests](https://github.com/dblock/rubocop-prose/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/dblock/rubocop-prose/actions/workflows/test.yml)
5
+ [![Gem Version](https://badge.fury.io/rb/rubocop-prose.svg)](https://rubygems.org/gems/rubocop-prose) [![Lint](https://github.com/dblock/rubocop-prose/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/dblock/rubocop-prose/actions/workflows/lint.yml) [![Tests](https://github.com/dblock/rubocop-prose/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/dblock/rubocop-prose/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/dblock/rubocop-prose/badge.svg?branch=main)](https://coveralls.io/github/dblock/rubocop-prose?branch=main)
6
6
 
7
7
  Markdown and plain-text prose checks for RuboCop.
8
8
 
9
9
  Use [rubocop-md](https://github.com/rubocop/rubocop-md) to lint Ruby code inside Markdown.
10
10
 
11
+ - Lint Markdown and plain text with native RuboCop configuration and file discovery.
12
+ - Wrap or unwrap paragraphs while preserving Markdown syntax and hard breaks.
13
+ - Check headings, lists, links, tables, code blocks, and whitespace.
14
+ - Validate YAML front matter, require keys, and restrict allowed keys.
15
+ - Check reference definitions, local heading fragments, and image alternative text.
16
+ - Configure capitalization and proper names, with automatic corrections where supported.
17
+
11
18
  This project was inspired by [To Wrap or Not to Wrap in Markdown](https://code.dblock.org/2021/06/07/to-wrap-or-not-to-wrap-in-markdown.html) and borrows many Markdown checks from [markdownlint](https://github.com/DavidAnson/markdownlint).
12
19
 
13
20
  ## Installation
@@ -15,7 +22,7 @@ This project was inspired by [To Wrap or Not to Wrap in Markdown](https://code.d
15
22
  Add to your Gemfile, then run `bundle install`:
16
23
 
17
24
  ```ruby
18
- gem 'rubocop-prose', '~> 0.1', require: false
25
+ gem 'rubocop-prose', '~> 0.2', require: false
19
26
  ```
20
27
 
21
28
  Add it to `.rubocop.yml` using RuboCop's plugin interface:
@@ -27,6 +34,8 @@ plugins:
27
34
 
28
35
  Ruby 3.2 or newer and RuboCop 1.72.1 or newer within 1.x are supported.
29
36
 
37
+ See [UPGRADING](UPGRADING.md) for breaking changes when updating an existing installation.
38
+
30
39
  ## Usage
31
40
 
32
41
  Given `example.md`:
@@ -52,9 +61,16 @@ Fix it automatically with `bundle exec rubocop -a example.md`.
52
61
 
53
62
  ## Cops
54
63
 
55
- ### Markdown
64
+ ### Prose
56
65
 
57
- Markdown checks ignore [front matter](docs/settings/front_matter.md) by default and do not treat code blocks as prose. Dedicated code-block cops check their structure; [Markdown/HardTabs](docs/cops/markdown/hard_tabs.md) and [Markdown/StructuralLineLength](docs/cops/markdown/structural_line_length.md) can also inspect code content. Inline formatting checks leave code spans, links, escaped syntax, and HTML untouched unless they specifically check those constructs.
66
+ | Cop | Default | Purpose |
67
+ | --- | --- | ------- |
68
+ | [Prose/MaxLength](docs/cops/prose/max_length.md) | Enabled | Wrap or unwrap prose paragraphs in Markdown and plain text. |
69
+ | [Prose/MultipleBlankLines](docs/cops/prose/multiple_blank_lines.md) | Enabled | Limit blank lines in prose and quotes, but not code. |
70
+ | [Prose/SentenceCapitalization](docs/cops/prose/sentence_capitalization.md) | Disabled | Check paragraph openings without changing quoted or code literals. |
71
+ | [Prose/TrailingNewline](docs/cops/prose/trailing_newline.md) | Enabled | Require exactly one final newline. |
72
+
73
+ ### Markdown
58
74
 
59
75
  | Cop | Default | Purpose |
60
76
  | --- | --- | ------- |
@@ -78,9 +94,12 @@ Markdown checks ignore [front matter](docs/settings/front_matter.md) by default
78
94
  | [Markdown/FenceLanguage](docs/cops/markdown/fence_language.md) | Enabled | Require a language and optionally restrict fence languages. |
79
95
  | [Markdown/FenceStyle](docs/cops/markdown/fence_style.md) | Enabled | Use backtick, tilde, or consistently styled fences. |
80
96
  | [Markdown/FirstHeading](docs/cops/markdown/first_heading.md) | Disabled | Begin documents with a heading or front-matter title. |
97
+ | [Markdown/FrontMatterKeys](docs/cops/markdown/front_matter_keys.md) | Disabled | Restrict allowed and require mandatory top-level front matter keys. |
98
+ | [Markdown/FrontMatterSyntax](docs/cops/markdown/front_matter_syntax.md) | Enabled | Report YAML syntax errors in closed leading front matter. |
81
99
  | [Markdown/HardBreakStyle](docs/cops/markdown/hard_break_style.md) | Enabled | Use backslashes or trailing spaces for paragraph hard breaks. |
82
- | [Markdown/HardTabs](docs/cops/markdown/hard_tabs.md) | Enabled | Disallow hard tabs with code-language exceptions. |
100
+ | [Markdown/HardTabs](docs/cops/markdown/hard_tabs.md) | Enabled | Report hard tabs with code-block and language exceptions. |
83
101
  | [Markdown/HeadingBlankLines](docs/cops/markdown/heading_blank_lines.md) | Enabled | Surround headings with blank lines. |
102
+ | [Markdown/HeadingCapitalization](docs/cops/markdown/heading_capitalization.md) | Disabled | Enforce initial capitalization or title case in headings. |
84
103
  | [Markdown/HeadingIncrement](docs/cops/markdown/heading_increment.md) | Enabled | Increase heading levels without skipping levels. |
85
104
  | [Markdown/HeadingIndentation](docs/cops/markdown/heading_indentation.md) | Enabled | Avoid leading indentation before headings. |
86
105
  | [Markdown/HeadingPunctuation](docs/cops/markdown/heading_punctuation.md) | Disabled | Avoid configured trailing heading punctuation. |
@@ -88,24 +107,26 @@ Markdown checks ignore [front matter](docs/settings/front_matter.md) by default
88
107
  | [Markdown/HeadingStyle](docs/cops/markdown/heading_style.md) | Disabled | Use a consistent heading syntax. |
89
108
  | [Markdown/ImageAltText](docs/cops/markdown/image_alt_text.md) | Enabled | Require nonblank Markdown image alternative text. |
90
109
  | [Markdown/ImagePathSeparators](docs/cops/markdown/image_path_separators.md) | Enabled | Use forward slashes in local image destinations. |
110
+ | [Markdown/KramdownSyntax](docs/cops/markdown/kramdown_syntax.md) | Enabled | Report Kramdown GFM parser diagnostics. |
91
111
  | [Markdown/LinkFragment](docs/cops/markdown/link_fragment.md) | Disabled | Validate local fragments using configurable heading anchors. |
92
112
  | [Markdown/LinkStyle](docs/cops/markdown/link_style.md) | Disabled | Configure permitted link and image styles independently. |
93
113
  | [Markdown/LinkTextSpacing](docs/cops/markdown/link_text_spacing.md) | Enabled | Remove leading and trailing whitespace from link text. |
94
114
  | [Markdown/ListBlankLines](docs/cops/markdown/list_blank_lines.md) | Enabled | Surround parsed lists with blank lines. |
95
115
  | [Markdown/ListContinuationIndentation](docs/cops/markdown/list_continuation_indentation.md) | Enabled | Indent list continuation text to its item's content column. |
96
116
  | [Markdown/ListIndentation](docs/cops/markdown/list_indentation.md) | Enabled | Keep sibling list markers consistently indented. |
117
+ | [Markdown/ListItemCapitalization](docs/cops/markdown/list_item_capitalization.md) | Disabled | Enforce consistent initials, initial capitals, or title case in list items. |
118
+ | [Markdown/ListItemPunctuation](docs/cops/markdown/list_item_punctuation.md) | Disabled | Require, forbid, or consistently use terminal punctuation in list items. |
97
119
  | [Markdown/ListMarkerSpacing](docs/cops/markdown/list_marker_spacing.md) | Enabled | Configure spaces after ordered and unordered list markers. |
98
120
  | [Markdown/OrderedListNumbering](docs/cops/markdown/ordered_list_numbering.md) | Disabled | Use sequential numbers or repeated ones in ordered lists. |
99
121
  | [Markdown/OutsideSpacing](docs/cops/markdown/outside_spacing.md) | Enabled | Report inline formatting directly adjacent to prose words. |
100
- | [Markdown/ProperNames](docs/cops/markdown/proper_names.md) | Disabled | Use configured capitalization for proper names. |
101
- | [Markdown/RawHtml](docs/cops/markdown/raw_html.md) | Disabled | Disallow raw HTML except explicitly allowed elements. |
102
- | [Markdown/ReferenceDefinitions](docs/cops/markdown/reference_definitions.md) | Enabled | Report unused and duplicate reference definitions. |
122
+ | [Markdown/ProperNames](docs/cops/markdown/proper_names.md) | Disabled | Use configured capitalization for proper names outside protected Markdown syntax. |
123
+ | [Markdown/RawHtml](docs/cops/markdown/raw_html.md) | Disabled | Disallow raw HTML except allowed elements, with optional attribute allowlists. |
124
+ | [Markdown/ReferenceDefinitions](docs/cops/markdown/reference_definitions.md) | Enabled | Report duplicate and optionally unused reference definitions. |
103
125
  | [Markdown/ReversedLink](docs/cops/markdown/reversed_link.md) | Enabled | Report reversed Markdown link delimiters. |
104
126
  | [Markdown/ShellPrompts](docs/cops/markdown/shell_prompts.md) | Enabled | Omit configured shell prompts in examples without output. |
105
127
  | [Markdown/SingleTopLevelHeading](docs/cops/markdown/single_top_level_heading.md) | Disabled | Allow at most one top-level heading. |
106
128
  | [Markdown/StrongStyle](docs/cops/markdown/strong_style.md) | Enabled | Use a configured or consistent strong delimiter. |
107
129
  | [Markdown/StructuralLineLength](docs/cops/markdown/structural_line_length.md) | Disabled | Report overlong heading, code-block, and table source lines without reflowing them. |
108
- | [Markdown/Syntax](docs/cops/markdown/syntax.md) | Enabled | Report native Markdown parser diagnostics. |
109
130
  | [Markdown/TableBlankLines](docs/cops/markdown/table_blank_lines.md) | Enabled | Surround Markdown tables with blank lines. |
110
131
  | [Markdown/TableColumns](docs/cops/markdown/table_columns.md) | Enabled | Match table body column counts to the header. |
111
132
  | [Markdown/TablePipes](docs/cops/markdown/table_pipes.md) | Enabled | Use consistent leading and trailing table pipes. |
@@ -117,9 +138,6 @@ Markdown checks ignore [front matter](docs/settings/front_matter.md) by default
117
138
  | [Markdown/UndefinedReference](docs/cops/markdown/undefined_reference.md) | Enabled | Require definitions for link and image references. |
118
139
  | [Markdown/UnorderedListIndentation](docs/cops/markdown/unordered_list_indentation.md) | Enabled | Use a configured indentation width for unordered lists. |
119
140
  | [Markdown/UnorderedListMarker](docs/cops/markdown/unordered_list_marker.md) | Enabled | Use a configured or consistent unordered list marker. |
120
- | [Prose/MaxLength](docs/cops/prose/max_length.md) | Enabled | Wrap or unwrap prose paragraphs in Markdown and plain text. |
121
- | [Prose/MultipleBlankLines](docs/cops/prose/multiple_blank_lines.md) | Enabled | Limit blank lines in prose and quotes, but not code. |
122
- | [Prose/TrailingNewline](docs/cops/prose/trailing_newline.md) | Enabled | Require exactly one final newline. |
123
141
 
124
142
  #### Settings
125
143
 
@@ -130,12 +148,11 @@ Markdown checks ignore [front matter](docs/settings/front_matter.md) by default
130
148
 
131
149
  ### Text
132
150
 
133
- | Cop | Default | Purpose |
134
- | --- | --- | ------- |
135
- | [Prose/MaxLength](docs/cops/prose/max_length.md) | Enabled | Wrap or unwrap prose paragraphs in Markdown and plain text. |
136
- | [Prose/MultipleBlankLines](docs/cops/prose/multiple_blank_lines.md) | Enabled | Limit consecutive literal blank lines. |
137
- | [Prose/TrailingNewline](docs/cops/prose/trailing_newline.md) | Enabled | Require exactly one final newline. |
138
- | [Text/TrailingWhitespace](docs/cops/text/trailing_whitespace.md) | Enabled | Remove all trailing spaces and tabs from plain-text lines. |
151
+ | Cop | Default | Purpose |
152
+ | --- | --- | ------- |
153
+ | [Text/HardTabs](docs/cops/text/hard_tabs.md) | Enabled | Report tabs on every plain-text line without correction. |
154
+ | [Text/ProperNames](docs/cops/text/proper_names.md) | Disabled | Use configured capitalization for proper names in literal text. |
155
+ | [Text/TrailingWhitespace](docs/cops/text/trailing_whitespace.md) | Enabled | Remove all trailing spaces and tabs from plain-text lines. |
139
156
 
140
157
  #### Settings
141
158
 
@@ -143,7 +160,7 @@ Markdown checks ignore [front matter](docs/settings/front_matter.md) by default
143
160
  | --- | --- |
144
161
  | [Text/Include](docs/settings/files.md) | Select files parsed as literal text using native RuboCop file patterns. |
145
162
 
146
- ## Project documentation
163
+ ## Project Documentation
147
164
 
148
165
  See [CONTRIBUTING](CONTRIBUTING.md) for development, testing, and artwork maintenance, [DESIGN](DESIGN.md) for architecture and design decisions, and [AGENTS](AGENTS.md) for contributor instructions for coding agents.
149
166
 
data/RELEASING.md CHANGED
@@ -1,16 +1,16 @@
1
- # Releasing rubocop-prose
1
+ # Releasing `rubocop-prose`
2
2
 
3
3
  Release only with explicit maintainer authorization. Release preparation happens on `main`; never force-push `main`.
4
4
 
5
5
  ## Prepare
6
6
 
7
- Update `main` with a fast-forward pull. Run `bundle exec rake` and confirm GitHub Actions checks pass, including the separate interoperability workflow. Verify the minimum supported RuboCop with `RUBOCOP_VERSION=1.72.1 bundle install` and `RUBOCOP_VERSION=1.72.1 bundle exec rake spec`; restore the normal dependency resolution afterward. Interoperability currently uses rubocop-md PR #57; update its workflow ref and README compatibility note when the original-source mapping API is released.
7
+ Update `main` with a fast-forward pull. Run `bundle exec rake` and confirm GitHub Actions checks pass, including the separate interoperability workflow against the released `rubocop-md` tag `v3.0.0`. Verify the minimum supported RuboCop with `RUBOCOP_VERSION=1.72.1 bundle install` and `RUBOCOP_VERSION=1.72.1 bundle exec rake spec`; restore the normal dependency resolution afterward.
8
8
 
9
- Set the version in `lib/rubocop/prose/version.rb`, date its CHANGELOG heading as `YYYY/MM/DD`, remove the contribution placeholder from that release, and check README installation instructions. Commit and push preparation changes, wait for green CI, then build and inspect the package:
9
+ Set the version in `lib/rubocop/prose/version.rb`, date its CHANGELOG heading as `YYYY/MM/DD`, remove the contribution placeholder from that release, update the target version in [UPGRADING](UPGRADING.md) and remove its `(Next)` marker, and check README installation instructions. Commit and push preparation changes, wait for green CI, then build and inspect the package:
10
10
 
11
11
  ```sh
12
12
  bundle exec rake build
13
- gem specification pkg/rubocop-prose-0.1.0.gem files
13
+ gem specification pkg/rubocop-prose-0.2.0.gem files
14
14
  ```
15
15
 
16
16
  Confirm runtime code, configuration, cop guides, README, CHANGELOG, licenses, and artwork are present; exclude tests, temporary workspaces, and dependency caches. Preserve the vendored helmet license and provenance. Install the exact built gem into a temporary gem environment outside the checkout and exercise plugin loading, discovery, stdin, configuration, and repeated autocorrection for Markdown and text.
@@ -22,11 +22,11 @@ Publish the exact inspected package. Enter a fresh RubyGems MFA code when prompt
22
22
  For an assistant-driven release, ask the maintainer for a fresh MFA code only when ready to publish and pass it through `GEM_HOST_OTP_CODE`, not the `--otp` command-line argument. Prefer a hidden local prompt. If the maintainer explicitly chooses chat, explain that the code will be visible in conversation history. Never save the code in repository files or documentation. Alternatively, the maintainer can run `gem push` interactively.
23
23
 
24
24
  ```sh
25
- gem push pkg/rubocop-prose-0.1.0.gem
25
+ gem push pkg/rubocop-prose-0.2.0.gem
26
26
  ```
27
27
 
28
- Verify that exact version on RubyGems before creating and pushing an annotated `v0.1.0` tag at the release commit. Create a GitHub release with matching changelog notes. Do not move an existing release tag.
28
+ Verify that exact version on RubyGems before creating and pushing an annotated `v0.2.0` tag at the release commit. Create a GitHub release with matching changelog notes. Do not move an existing release tag.
29
29
 
30
- ## Next development iteration
30
+ ## Next Development Iteration
31
31
 
32
- Bump the gem version, add a matching `(Next)` CHANGELOG section with `* Your contribution here.`, then commit and push to `main`.
32
+ Bump the gem version, add a matching `(Next)` CHANGELOG section with `- Your contribution here.`, then commit and push to `main`.
data/UPGRADING.md ADDED
@@ -0,0 +1,16 @@
1
+ # Upgrading
2
+
3
+ Breaking changes are grouped by target release; follow the linked cop guides for configuration examples.
4
+
5
+ ## From 0.1.0 To 0.2.0
6
+
7
+ - Rename this plugin's `Markdown/Syntax` configuration to [`Markdown/KramdownSyntax`](docs/cops/markdown/kramdown_syntax.md#migrating-from-010); `rubocop-md` now owns `Markdown/Syntax`.
8
+ - Replace `EnforcedStyle` with `Style` in [`Markdown/CodeBlockStyle`](docs/cops/markdown/code_block_style.md#migrating-from-010).
9
+ - Replace `EnforcedStyle` with `Style` in [`Markdown/FenceStyle`](docs/cops/markdown/fence_style.md#migrating-from-010).
10
+ - Replace `EnforcedStyle` with `Style` in [`Markdown/HeadingStyle`](docs/cops/markdown/heading_style.md#migrating-from-010).
11
+ - Replace `EnforcedStyle` with `Style` in [`Markdown/OrderedListNumbering`](docs/cops/markdown/ordered_list_numbering.md#migrating-from-010).
12
+ - Replace `EnforcedStyle` with `Style` in [`Markdown/UnorderedListMarker`](docs/cops/markdown/unordered_list_marker.md#migrating-from-010).
13
+ - Replace `OrderedSingle`, `OrderedMulti`, `UnorderedSingle`, and `UnorderedMulti` with shared `Style` and `MinSpaces` in [`Markdown/ListMarkerSpacing`](docs/cops/markdown/list_marker_spacing.md#migrating-from-010).
14
+ - Replace shared `Max` and enable/value pairs with integer widths or `false` for `Headings`, `CodeBlocks`, and `Tables` in [`Markdown/StructuralLineLength`](docs/cops/markdown/structural_line_length.md#migrating-from-010).
15
+ - Replace `CheckDuplicates` and `AllowIdenticalDuplicates` with `Duplicates`, and rename `CheckUnused` to `Unused` in [`Markdown/ReferenceDefinitions`](docs/cops/markdown/reference_definitions.md#migrating-from-010).
16
+ - Replace `FrontMatterTitle: true` and `TitleKey` with `FrontMatterTitle: <metadata key>` (or `false`) in [`Markdown/FirstHeading`](docs/cops/markdown/first_heading.md#migrating-from-010).
data/assets/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Logo artwork
1
+ # Logo Artwork
2
2
 
3
3
  See [DESIGN.md](../DESIGN.md#artwork) for composition and source attribution, [CONTRIBUTING.md](../CONTRIBUTING.md#artwork) for editing and rendering instructions, and [RUBOCOP-LICENSE](RUBOCOP-LICENSE) for the upstream copyright and permission notice.
@@ -1,7 +1,7 @@
1
1
  Markdown/CodeBlockStyle:
2
2
  Description: Use fenced, indented, or consistently styled code blocks.
3
3
  Enabled: false
4
- EnforcedStyle: consistent
4
+ Style: consistent
5
5
  SupportedStyles:
6
6
  - consistent
7
7
  - fenced
@@ -2,3 +2,7 @@ Markdown/EmphasisStyle:
2
2
  Description: 'Use a configured or consistent emphasis delimiter.'
3
3
  Enabled: true
4
4
  Style: consistent
5
+ SupportedStyles:
6
+ - consistent
7
+ - asterisk
8
+ - underscore
@@ -1,7 +1,7 @@
1
1
  Markdown/FenceStyle:
2
2
  Description: Use backtick, tilde, or consistently styled fences.
3
3
  Enabled: true
4
- EnforcedStyle: consistent
4
+ Style: consistent
5
5
  SupportedStyles:
6
6
  - consistent
7
7
  - backtick
@@ -2,5 +2,4 @@ Markdown/FirstHeading:
2
2
  Description: 'Begin documents with a heading or front-matter title.'
3
3
  Enabled: false
4
4
  Level: 1
5
- FrontMatterTitle: true
6
- TitleKey: title
5
+ FrontMatterTitle: title
@@ -0,0 +1,5 @@
1
+ Markdown/FrontMatterKeys:
2
+ Description: Restrict allowed and require mandatory top-level YAML front matter keys.
3
+ Enabled: false
4
+ AllowedKeys:
5
+ RequiredKeys: []
@@ -0,0 +1,3 @@
1
+ Markdown/FrontMatterSyntax:
2
+ Description: 'Report invalid YAML syntax in closed leading front matter.'
3
+ Enabled: true
@@ -2,3 +2,6 @@ Markdown/HardBreakStyle:
2
2
  Description: 'Use a configured Markdown hard-break syntax.'
3
3
  Enabled: true
4
4
  Style: backslash
5
+ SupportedStyles:
6
+ - backslash
7
+ - spaces
@@ -1,5 +1,5 @@
1
1
  Markdown/HardTabs:
2
- Description: 'Disallow hard tabs with code-language exceptions.'
2
+ Description: 'Report hard tabs in Markdown without correcting them.'
3
3
  Enabled: true
4
4
  CodeBlocks: false
5
5
  AllowedCodeLanguages: []
@@ -0,0 +1,31 @@
1
+ Markdown/HeadingCapitalization:
2
+ Description: 'Enforce initial capitalization or title case in headings.'
3
+ Enabled: false
4
+ SafeAutoCorrect: false
5
+ Style: title_case
6
+ PreserveMixedCase: true
7
+ IgnoredWords: []
8
+ MinorWords:
9
+ - a
10
+ - an
11
+ - and
12
+ - as
13
+ - at
14
+ - but
15
+ - by
16
+ - for
17
+ - from
18
+ - in
19
+ - nor
20
+ - of
21
+ - 'on'
22
+ - or
23
+ - per
24
+ - the
25
+ - to
26
+ - via
27
+ - vs
28
+ - with
29
+ SupportedStyles:
30
+ - initial_capital
31
+ - title_case
@@ -1,7 +1,7 @@
1
1
  Markdown/HeadingStyle:
2
2
  Description: 'Use a consistent heading syntax.'
3
3
  Enabled: false
4
- EnforcedStyle: consistent
4
+ Style: consistent
5
5
  SupportedStyles:
6
6
  - consistent
7
7
  - atx
@@ -1,3 +1,3 @@
1
- Markdown/Syntax:
1
+ Markdown/KramdownSyntax:
2
2
  Description: 'Report native Markdown parser diagnostics.'
3
3
  Enabled: true
@@ -0,0 +1,32 @@
1
+ Markdown/ListItemCapitalization:
2
+ Description: Enforce consistent initials, initial capitals, or title case in list items.
3
+ Enabled: false
4
+ SafeAutoCorrect: false
5
+ Style: consistent
6
+ SupportedStyles:
7
+ - consistent
8
+ - initial_capital
9
+ - title_case
10
+ PreserveMixedCase: true
11
+ IgnoredWords: []
12
+ MinorWords:
13
+ - a
14
+ - an
15
+ - and
16
+ - as
17
+ - at
18
+ - but
19
+ - by
20
+ - for
21
+ - from
22
+ - in
23
+ - nor
24
+ - of
25
+ - 'on'
26
+ - or
27
+ - per
28
+ - the
29
+ - to
30
+ - via
31
+ - vs
32
+ - with
@@ -0,0 +1,13 @@
1
+ Markdown/ListItemPunctuation:
2
+ Description: Require, forbid, or consistently use terminal punctuation in list items.
3
+ Enabled: false
4
+ Style: consistent
5
+ AllowedPunctuation:
6
+ - "."
7
+ - "!"
8
+ - "?"
9
+ - "…"
10
+ SupportedStyles:
11
+ - consistent
12
+ - always
13
+ - never
@@ -1,7 +1,8 @@
1
1
  Markdown/ListMarkerSpacing:
2
- Description: Configure spaces after ordered and unordered list markers.
2
+ Description: Enforce fixed or aligned spacing after list markers.
3
3
  Enabled: true
4
- UnorderedSingle: 1
5
- OrderedSingle: 1
6
- UnorderedMulti: 1
7
- OrderedMulti: 1
4
+ Style: fixed
5
+ SupportedStyles:
6
+ - fixed
7
+ - aligned
8
+ MinSpaces: 1
@@ -1,7 +1,7 @@
1
1
  Markdown/OrderedListNumbering:
2
2
  Description: Use sequential numbers or repeated ones in ordered lists.
3
3
  Enabled: false
4
- EnforcedStyle: sequential
4
+ Style: sequential
5
5
  SupportedStyles:
6
6
  - sequential
7
7
  - ones