rdoc-markdown 0.17.2 → 0.19.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +19 -82
- data/lib/markdown.rb +0 -4
- data/lib/rdoc/discover.rb +1 -7
- data/lib/rdoc/generator/markdown/conversion.rb +196 -0
- data/lib/rdoc/generator/markdown/crossref.rb +13 -5
- data/lib/rdoc/generator/markdown/descriptions.rb +163 -0
- data/lib/rdoc/generator/markdown/index.rb +47 -0
- data/lib/rdoc/generator/markdown/paths.rb +118 -0
- data/lib/rdoc/generator/markdown/selection.rb +39 -0
- data/lib/rdoc/generator/markdown/signatures.rb +174 -0
- data/lib/rdoc/generator/markdown.rb +80 -680
- data/lib/rdoc/markdown/version.rb +1 -1
- data/lib/templates/classfile.md.erb +14 -11
- metadata +19 -43
- data/.editorconfig +0 -13
- data/.erb_lint.yml +0 -36
- data/.erb_linters/no_embedded_assets.rb +0 -29
- data/.erb_linters/non_raw_html.rb +0 -29
- data/.standard.yml +0 -3
- data/.yard-lint.yml +0 -290
- data/AGENTS.md +0 -50
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -202
- data/Rakefile +0 -296
- data/example/Bird.md +0 -21
- data/example/Duck.md +0 -56
- data/example/Object.md +0 -8
- data/example/Waterfowl.md +0 -9
- data/example/index.csv +0 -16
- data/example/jekyll-seo-tag/Jekyll/SeoTag/AuthorDrop.md +0 -35
- data/example/jekyll-seo-tag/Jekyll/SeoTag/Drop.md +0 -108
- data/example/jekyll-seo-tag/Jekyll/SeoTag/Filters.md +0 -8
- data/example/jekyll-seo-tag/Jekyll/SeoTag/ImageDrop.md +0 -29
- data/example/jekyll-seo-tag/Jekyll/SeoTag/JSONLD.md +0 -15
- data/example/jekyll-seo-tag/Jekyll/SeoTag/JSONLDDrop.md +0 -34
- data/example/jekyll-seo-tag/Jekyll/SeoTag/UrlHelper.md +0 -4
- data/example/jekyll-seo-tag/Jekyll/SeoTag.md +0 -48
- data/example/jekyll-seo-tag/Jekyll.md +0 -3
- data/example/jekyll-seo-tag/Liquid/Tag.md +0 -3
- data/example/jekyll-seo-tag/Liquid.md +0 -4
- data/example/jekyll-seo-tag/index.csv +0 -60
- data/mutant.yml +0 -15
- data/rdoc-markdown.gemspec +0 -46
|
@@ -25,30 +25,33 @@
|
|
|
25
25
|
<%- end -%>
|
|
26
26
|
<% klass.each_section do |section, constants, attributes| -%>
|
|
27
27
|
<%- section_title = section.title.to_s.strip -%>
|
|
28
|
+
<%- section_heading_level = section_title.empty? ? 1 : 2 -%>
|
|
29
|
+
<%- group_heading_level = section_heading_level + 1 -%>
|
|
30
|
+
<%- member_heading_level = group_heading_level + 1 -%>
|
|
28
31
|
<%- unless section_title.empty? -%>
|
|
29
|
-
|
|
32
|
+
<%= "#" * section_heading_level %> <%= section_title %>
|
|
30
33
|
<%- end -%>
|
|
31
|
-
<%- section_description = section_description(section, heading_level_offset:
|
|
34
|
+
<%- section_description = section_description(section, heading_level_offset: section_heading_level) -%>
|
|
32
35
|
<%- unless section_description.empty? -%>
|
|
33
36
|
|
|
34
37
|
<%= section_description %>
|
|
35
38
|
<%- end -%>
|
|
36
39
|
<%- unless constants.empty? -%>
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
<%= "#" * group_heading_level %> Constants
|
|
39
42
|
<% constants.sort_by(&:name).each do |const| -%>
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
<%= describe(const, fallback: "Not documented.", heading_level_offset:
|
|
44
|
+
<%= "#" * member_heading_level %> `<%= const.name %>`<%= anchor(const.name) %>
|
|
45
|
+
<%= describe(const, fallback: "Not documented.", heading_level_offset: member_heading_level) %>
|
|
43
46
|
<% end -%>
|
|
44
47
|
<%- end -%>
|
|
45
48
|
<%- unless attributes.empty? -%>
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
<%= "#" * group_heading_level %> Attributes
|
|
48
51
|
<% attributes.sort_by(&:name).each do |attr| -%>
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
<%= describe(attr, fallback: "Not documented.", heading_level_offset:
|
|
53
|
+
<%= "#" * member_heading_level %> `<%= attr.name %>` [<%= attr.rw %>]<%= anchor(attr.aref.strip) %>
|
|
54
|
+
<%= describe(attr, fallback: "Not documented.", heading_level_offset: member_heading_level) %>
|
|
52
55
|
<% end -%>
|
|
53
56
|
<%- end -%>
|
|
54
57
|
<% klass.methods_by_type(section).each do |type, visibilities| -%>
|
|
@@ -56,10 +59,10 @@
|
|
|
56
59
|
<% methods = methods.select(&:display?) -%>
|
|
57
60
|
<% next if methods.empty? -%>
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
<%= "#" * group_heading_level %> <%= visibility.capitalize %> <%= type.capitalize %> Methods
|
|
60
63
|
<% methods.each do |method| -%>
|
|
61
|
-
|
|
62
|
-
<%= method_description(method, current_class: klass) %>
|
|
64
|
+
<%= "#" * member_heading_level %> `<%= method.name %><%= method_signature(method) %>`<%= anchor(method.aref) %>
|
|
65
|
+
<%= method_description(method, current_class: klass, heading_level_offset: member_heading_level) %>
|
|
63
66
|
<% end -%>
|
|
64
67
|
<% end -%>
|
|
65
68
|
<% end -%>
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rdoc-markdown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stanislav (Stas) Katkov
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -136,33 +136,33 @@ dependencies:
|
|
|
136
136
|
- !ruby/object:Gem::Version
|
|
137
137
|
version: '13.0'
|
|
138
138
|
- !ruby/object:Gem::Dependency
|
|
139
|
-
name:
|
|
139
|
+
name: simplecov
|
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
|
142
|
-
- - "
|
|
142
|
+
- - ">="
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: '
|
|
144
|
+
version: '0'
|
|
145
145
|
type: :development
|
|
146
146
|
prerelease: false
|
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
148
148
|
requirements:
|
|
149
|
-
- - "
|
|
149
|
+
- - ">="
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: '
|
|
151
|
+
version: '0'
|
|
152
152
|
- !ruby/object:Gem::Dependency
|
|
153
|
-
name:
|
|
153
|
+
name: ruby-lsp
|
|
154
154
|
requirement: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements:
|
|
156
|
-
- - "
|
|
156
|
+
- - ">="
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '0
|
|
158
|
+
version: '0'
|
|
159
159
|
type: :development
|
|
160
160
|
prerelease: false
|
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
|
163
|
-
- - "
|
|
163
|
+
- - ">="
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '0
|
|
165
|
+
version: '0'
|
|
166
166
|
description: RDoc plugin to generate markdown documentation and search index as sqlite
|
|
167
167
|
database for entire content.
|
|
168
168
|
email:
|
|
@@ -171,45 +171,21 @@ executables: []
|
|
|
171
171
|
extensions: []
|
|
172
172
|
extra_rdoc_files: []
|
|
173
173
|
files:
|
|
174
|
-
- ".editorconfig"
|
|
175
|
-
- ".erb_lint.yml"
|
|
176
|
-
- ".erb_linters/no_embedded_assets.rb"
|
|
177
|
-
- ".erb_linters/non_raw_html.rb"
|
|
178
|
-
- ".standard.yml"
|
|
179
|
-
- ".yard-lint.yml"
|
|
180
|
-
- AGENTS.md
|
|
181
174
|
- CHANGELOG.md
|
|
182
|
-
- CODE_OF_CONDUCT.md
|
|
183
|
-
- Gemfile
|
|
184
|
-
- Gemfile.lock
|
|
185
175
|
- LICENSE
|
|
186
176
|
- README.md
|
|
187
|
-
- Rakefile
|
|
188
|
-
- example/Bird.md
|
|
189
|
-
- example/Duck.md
|
|
190
|
-
- example/Object.md
|
|
191
|
-
- example/Waterfowl.md
|
|
192
|
-
- example/index.csv
|
|
193
|
-
- example/jekyll-seo-tag/Jekyll.md
|
|
194
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag.md
|
|
195
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/AuthorDrop.md
|
|
196
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/Drop.md
|
|
197
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/Filters.md
|
|
198
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/ImageDrop.md
|
|
199
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/JSONLD.md
|
|
200
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/JSONLDDrop.md
|
|
201
|
-
- example/jekyll-seo-tag/Jekyll/SeoTag/UrlHelper.md
|
|
202
|
-
- example/jekyll-seo-tag/Liquid.md
|
|
203
|
-
- example/jekyll-seo-tag/Liquid/Tag.md
|
|
204
|
-
- example/jekyll-seo-tag/index.csv
|
|
205
177
|
- lib/markdown.rb
|
|
206
178
|
- lib/rdoc/discover.rb
|
|
207
179
|
- lib/rdoc/generator/markdown.rb
|
|
180
|
+
- lib/rdoc/generator/markdown/conversion.rb
|
|
208
181
|
- lib/rdoc/generator/markdown/crossref.rb
|
|
182
|
+
- lib/rdoc/generator/markdown/descriptions.rb
|
|
183
|
+
- lib/rdoc/generator/markdown/index.rb
|
|
184
|
+
- lib/rdoc/generator/markdown/paths.rb
|
|
185
|
+
- lib/rdoc/generator/markdown/selection.rb
|
|
186
|
+
- lib/rdoc/generator/markdown/signatures.rb
|
|
209
187
|
- lib/rdoc/markdown/version.rb
|
|
210
188
|
- lib/templates/classfile.md.erb
|
|
211
|
-
- mutant.yml
|
|
212
|
-
- rdoc-markdown.gemspec
|
|
213
189
|
- sig/rdoc/markdown.rbs
|
|
214
190
|
homepage: https://poshtui.com
|
|
215
191
|
licenses:
|
|
@@ -232,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
232
208
|
- !ruby/object:Gem::Version
|
|
233
209
|
version: '0'
|
|
234
210
|
requirements: []
|
|
235
|
-
rubygems_version: 4.0.
|
|
211
|
+
rubygems_version: 4.0.16
|
|
236
212
|
specification_version: 4
|
|
237
213
|
summary: RDoc plugin to generate markdown documentation
|
|
238
214
|
test_files: []
|
data/.editorconfig
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# top-most EditorConfig file
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
# Unix-style newlines with a newline ending every file
|
|
5
|
-
# Two spaces for indenting
|
|
6
|
-
[*]
|
|
7
|
-
end_of_line = lf
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
charset = utf-8
|
|
12
|
-
trim_trailing_whitespace = true
|
|
13
|
-
max_line_length = 120
|
data/.erb_lint.yml
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
glob: "**/*.{md,markdown}.erb"
|
|
3
|
-
EnableDefaultLinters: false
|
|
4
|
-
linters:
|
|
5
|
-
ClosingErbTagIndent:
|
|
6
|
-
enabled: true
|
|
7
|
-
CommentSyntax:
|
|
8
|
-
enabled: true
|
|
9
|
-
ExtraNewline:
|
|
10
|
-
enabled: true
|
|
11
|
-
FinalNewline:
|
|
12
|
-
enabled: true
|
|
13
|
-
NoEmbeddedAssets:
|
|
14
|
-
enabled: true
|
|
15
|
-
NonRawHtml:
|
|
16
|
-
enabled: true
|
|
17
|
-
NoUnusedDisable:
|
|
18
|
-
enabled: true
|
|
19
|
-
ParserErrors:
|
|
20
|
-
enabled: true
|
|
21
|
-
RightTrim:
|
|
22
|
-
enabled: true
|
|
23
|
-
enforced_style: "-"
|
|
24
|
-
Rubocop:
|
|
25
|
-
enabled: true
|
|
26
|
-
only:
|
|
27
|
-
- Lint/Debugger
|
|
28
|
-
- Lint/DuplicateBranch
|
|
29
|
-
- Lint/DuplicateHashKey
|
|
30
|
-
- Lint/EmptyExpression
|
|
31
|
-
- Lint/SelfAssignment
|
|
32
|
-
- Security/Eval
|
|
33
|
-
SpaceAroundErbTag:
|
|
34
|
-
enabled: true
|
|
35
|
-
TrailingWhitespace:
|
|
36
|
-
enabled: true
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ERBLint
|
|
4
|
-
module Linters
|
|
5
|
-
class NoEmbeddedAssets < Linter
|
|
6
|
-
include LinterRegistry
|
|
7
|
-
|
|
8
|
-
PATTERNS = [
|
|
9
|
-
[/(?:javascript_tag|javascript_include_tag|javascript_pack_tag|stylesheet_link_tag|stylesheet_pack_tag)\b/i,
|
|
10
|
-
"Avoid Rails JavaScript and stylesheet helpers in markdown ERB templates."],
|
|
11
|
-
[/\bcontent_tag\s*\(?\s*[:"'](?:script|style)\b/i,
|
|
12
|
-
"Avoid helper-generated `<script>` and `<style>` tags in markdown ERB templates."],
|
|
13
|
-
[/\btag\.(?:link|script|style)\b/i,
|
|
14
|
-
"Avoid helper-generated asset tags in markdown ERB templates."]
|
|
15
|
-
].freeze
|
|
16
|
-
|
|
17
|
-
def run(processed_source)
|
|
18
|
-
content = processed_source.file_content
|
|
19
|
-
|
|
20
|
-
PATTERNS.each do |pattern, message|
|
|
21
|
-
content.scan(pattern) do
|
|
22
|
-
match = Regexp.last_match
|
|
23
|
-
add_offense(processed_source.to_source_range(match.begin(0)...match.end(0)), message)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ERBLint
|
|
4
|
-
module Linters
|
|
5
|
-
class NonRawHtml < Linter
|
|
6
|
-
include LinterRegistry
|
|
7
|
-
|
|
8
|
-
HTML_PATTERN = /<!--.*?-->|<!DOCTYPE\b[^>]*>|<\/?[A-Za-z][A-Za-z0-9-]*(?=[\s>\/])[^<>]*\/?>/im
|
|
9
|
-
|
|
10
|
-
def run(processed_source)
|
|
11
|
-
content = processed_source.file_content
|
|
12
|
-
reported_lines = {}
|
|
13
|
-
|
|
14
|
-
content.scan(HTML_PATTERN) do
|
|
15
|
-
match = Regexp.last_match
|
|
16
|
-
source_range = processed_source.to_source_range(match.begin(0)...match.end(0))
|
|
17
|
-
line = source_range.line_range.first
|
|
18
|
-
next if reported_lines[line]
|
|
19
|
-
|
|
20
|
-
reported_lines[line] = true
|
|
21
|
-
add_offense(
|
|
22
|
-
source_range,
|
|
23
|
-
"Avoid raw HTML in markdown ERB templates. Generate markdown instead."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
data/.standard.yml
DELETED
data/.yard-lint.yml
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
# YARD-Lint Configuration (Strict Mode)
|
|
2
|
-
# See https://github.com/mensfeld/yard-lint for documentation
|
|
3
|
-
|
|
4
|
-
AllValidators:
|
|
5
|
-
YardOptions:
|
|
6
|
-
- --private
|
|
7
|
-
- --protected
|
|
8
|
-
|
|
9
|
-
Exclude:
|
|
10
|
-
- '\.git'
|
|
11
|
-
- ".erb_linters"
|
|
12
|
-
- ".erb_linters/**/*"
|
|
13
|
-
- "coverage"
|
|
14
|
-
- "coverage/**/*"
|
|
15
|
-
- "tmp"
|
|
16
|
-
- "vendor/**/*"
|
|
17
|
-
- "vendor"
|
|
18
|
-
- "node_modules/**/*"
|
|
19
|
-
- "spec/**/*"
|
|
20
|
-
- "test/**/*"
|
|
21
|
-
- "tmp/**/*"
|
|
22
|
-
- "lib/rdoc/markdown/version.rb"
|
|
23
|
-
|
|
24
|
-
FailOnSeverity: error
|
|
25
|
-
MinCoverage: 100.0
|
|
26
|
-
|
|
27
|
-
DiffMode:
|
|
28
|
-
DefaultBaseRef: ~
|
|
29
|
-
|
|
30
|
-
Documentation/UndocumentedObjects:
|
|
31
|
-
Description: "Checks for classes, modules, and methods without documentation."
|
|
32
|
-
Enabled: true
|
|
33
|
-
Severity: error
|
|
34
|
-
ExcludedMethods:
|
|
35
|
-
- "initialize/0"
|
|
36
|
-
- "/^_/"
|
|
37
|
-
|
|
38
|
-
Documentation/UndocumentedMethodArguments:
|
|
39
|
-
Description: "Checks for method parameters without @param tags."
|
|
40
|
-
Enabled: true
|
|
41
|
-
Severity: error
|
|
42
|
-
|
|
43
|
-
Documentation/UndocumentedBooleanMethods:
|
|
44
|
-
Description: "Checks that question mark methods document their boolean return."
|
|
45
|
-
Enabled: true
|
|
46
|
-
Severity: error
|
|
47
|
-
|
|
48
|
-
Documentation/UndocumentedOptions:
|
|
49
|
-
Description: "Detects methods with options hash parameters but no @option tags."
|
|
50
|
-
Enabled: true
|
|
51
|
-
Severity: error
|
|
52
|
-
|
|
53
|
-
Documentation/MissingReturn:
|
|
54
|
-
Description: "Requires @return tags on all methods."
|
|
55
|
-
Enabled: true
|
|
56
|
-
Severity: error
|
|
57
|
-
ExcludedMethods:
|
|
58
|
-
- "initialize"
|
|
59
|
-
|
|
60
|
-
Documentation/MarkdownSyntax:
|
|
61
|
-
Description: "Detects common markdown syntax errors in documentation."
|
|
62
|
-
Enabled: true
|
|
63
|
-
Severity: error
|
|
64
|
-
|
|
65
|
-
Documentation/EmptyCommentLine:
|
|
66
|
-
Description: "Detects empty comment lines at the start or end of documentation blocks."
|
|
67
|
-
Enabled: true
|
|
68
|
-
Severity: error
|
|
69
|
-
EnabledPatterns:
|
|
70
|
-
Leading: true
|
|
71
|
-
Trailing: true
|
|
72
|
-
|
|
73
|
-
Documentation/BlankLineBeforeDefinition:
|
|
74
|
-
Description: "Detects blank lines between YARD documentation and method definition."
|
|
75
|
-
Enabled: true
|
|
76
|
-
Severity: error
|
|
77
|
-
OrphanedSeverity: error
|
|
78
|
-
EnabledPatterns:
|
|
79
|
-
SingleBlankLine: true
|
|
80
|
-
OrphanedDocs: true
|
|
81
|
-
|
|
82
|
-
Tags/Order:
|
|
83
|
-
Description: "Enforces consistent ordering of YARD tags."
|
|
84
|
-
Enabled: true
|
|
85
|
-
Severity: error
|
|
86
|
-
EnforcedOrder:
|
|
87
|
-
- param
|
|
88
|
-
- option
|
|
89
|
-
- yield
|
|
90
|
-
- yieldparam
|
|
91
|
-
- yieldreturn
|
|
92
|
-
- return
|
|
93
|
-
- raise
|
|
94
|
-
- see
|
|
95
|
-
- example
|
|
96
|
-
- note
|
|
97
|
-
- todo
|
|
98
|
-
|
|
99
|
-
Tags/InvalidTypes:
|
|
100
|
-
Description: "Validates type definitions in @param, @return, @option tags."
|
|
101
|
-
Enabled: true
|
|
102
|
-
Severity: error
|
|
103
|
-
ValidatedTags:
|
|
104
|
-
- param
|
|
105
|
-
- option
|
|
106
|
-
- return
|
|
107
|
-
|
|
108
|
-
Tags/TypeSyntax:
|
|
109
|
-
Description: "Validates YARD type syntax using YARD parser."
|
|
110
|
-
Enabled: true
|
|
111
|
-
Severity: error
|
|
112
|
-
ValidatedTags:
|
|
113
|
-
- param
|
|
114
|
-
- option
|
|
115
|
-
- return
|
|
116
|
-
- yieldreturn
|
|
117
|
-
|
|
118
|
-
Tags/MeaninglessTag:
|
|
119
|
-
Description: "Detects @param/@option tags on classes, modules, or constants."
|
|
120
|
-
Enabled: true
|
|
121
|
-
Severity: error
|
|
122
|
-
CheckedTags:
|
|
123
|
-
- param
|
|
124
|
-
- option
|
|
125
|
-
InvalidObjectTypes:
|
|
126
|
-
- class
|
|
127
|
-
- module
|
|
128
|
-
- constant
|
|
129
|
-
|
|
130
|
-
Tags/CollectionType:
|
|
131
|
-
Description: "Validates Hash collection syntax consistency."
|
|
132
|
-
Enabled: true
|
|
133
|
-
Severity: error
|
|
134
|
-
EnforcedStyle: long
|
|
135
|
-
ValidatedTags:
|
|
136
|
-
- param
|
|
137
|
-
- option
|
|
138
|
-
- return
|
|
139
|
-
- yieldreturn
|
|
140
|
-
|
|
141
|
-
Tags/TagTypePosition:
|
|
142
|
-
Description: "Validates type annotation position in tags."
|
|
143
|
-
Enabled: true
|
|
144
|
-
Severity: error
|
|
145
|
-
CheckedTags:
|
|
146
|
-
- param
|
|
147
|
-
- option
|
|
148
|
-
EnforcedStyle: type_after_name
|
|
149
|
-
|
|
150
|
-
Tags/ApiTags:
|
|
151
|
-
Description: "Enforces @api tags on public objects."
|
|
152
|
-
Enabled: false
|
|
153
|
-
Severity: error
|
|
154
|
-
AllowedApis:
|
|
155
|
-
- public
|
|
156
|
-
- private
|
|
157
|
-
- internal
|
|
158
|
-
|
|
159
|
-
Tags/OptionTags:
|
|
160
|
-
Description: "Requires @option tags for methods with options parameters."
|
|
161
|
-
Enabled: true
|
|
162
|
-
Severity: error
|
|
163
|
-
|
|
164
|
-
Tags/ExampleSyntax:
|
|
165
|
-
Description: "Validates Ruby syntax in @example tags."
|
|
166
|
-
Enabled: true
|
|
167
|
-
Severity: error
|
|
168
|
-
|
|
169
|
-
Tags/ExampleStyle:
|
|
170
|
-
Description: "Validates code style in @example tags using RuboCop/StandardRB."
|
|
171
|
-
Enabled: false
|
|
172
|
-
Severity: convention
|
|
173
|
-
|
|
174
|
-
Tags/RedundantParamDescription:
|
|
175
|
-
Description: "Detects meaningless parameter descriptions that add no value."
|
|
176
|
-
Enabled: true
|
|
177
|
-
Severity: error
|
|
178
|
-
CheckedTags:
|
|
179
|
-
- param
|
|
180
|
-
- option
|
|
181
|
-
Articles:
|
|
182
|
-
- The
|
|
183
|
-
- the
|
|
184
|
-
- A
|
|
185
|
-
- a
|
|
186
|
-
- An
|
|
187
|
-
- an
|
|
188
|
-
MaxRedundantWords: 6
|
|
189
|
-
GenericTerms:
|
|
190
|
-
- object
|
|
191
|
-
- instance
|
|
192
|
-
- value
|
|
193
|
-
- data
|
|
194
|
-
- item
|
|
195
|
-
- element
|
|
196
|
-
EnabledPatterns:
|
|
197
|
-
ArticleParam: true
|
|
198
|
-
PossessiveParam: true
|
|
199
|
-
TypeRestatement: true
|
|
200
|
-
ParamToVerb: true
|
|
201
|
-
IdPattern: true
|
|
202
|
-
DirectionalDate: true
|
|
203
|
-
TypeGeneric: true
|
|
204
|
-
|
|
205
|
-
Tags/InformalNotation:
|
|
206
|
-
Description: 'Detects informal tag notation patterns like "Note:" instead of @note.'
|
|
207
|
-
Enabled: true
|
|
208
|
-
Severity: error
|
|
209
|
-
CaseSensitive: false
|
|
210
|
-
RequireStartOfLine: true
|
|
211
|
-
Patterns:
|
|
212
|
-
Note: "@note"
|
|
213
|
-
Todo: "@todo"
|
|
214
|
-
TODO: "@todo"
|
|
215
|
-
FIXME: "@todo"
|
|
216
|
-
See: "@see"
|
|
217
|
-
See also: "@see"
|
|
218
|
-
Warning: "@deprecated"
|
|
219
|
-
Deprecated: "@deprecated"
|
|
220
|
-
Author: "@author"
|
|
221
|
-
Version: "@version"
|
|
222
|
-
Since: "@since"
|
|
223
|
-
Returns: "@return"
|
|
224
|
-
Raises: "@raise"
|
|
225
|
-
Example: "@example"
|
|
226
|
-
|
|
227
|
-
Tags/NonAsciiType:
|
|
228
|
-
Description: "Detects non-ASCII characters in type annotations."
|
|
229
|
-
Enabled: true
|
|
230
|
-
Severity: error
|
|
231
|
-
ValidatedTags:
|
|
232
|
-
- param
|
|
233
|
-
- option
|
|
234
|
-
- return
|
|
235
|
-
- yieldreturn
|
|
236
|
-
- yieldparam
|
|
237
|
-
|
|
238
|
-
Tags/TagGroupSeparator:
|
|
239
|
-
Description: "Enforces blank line separators between different YARD tag groups."
|
|
240
|
-
Enabled: false
|
|
241
|
-
Severity: error
|
|
242
|
-
TagGroups:
|
|
243
|
-
param: [param, option]
|
|
244
|
-
return: [return]
|
|
245
|
-
error: [raise, throws]
|
|
246
|
-
example: [example]
|
|
247
|
-
meta: [see, note, todo, deprecated, since, version, api]
|
|
248
|
-
yield: [yield, yieldparam, yieldreturn]
|
|
249
|
-
RequireAfterDescription: false
|
|
250
|
-
|
|
251
|
-
Tags/ForbiddenTags:
|
|
252
|
-
Description: "Detects forbidden tag and type combinations."
|
|
253
|
-
Enabled: false
|
|
254
|
-
Severity: error
|
|
255
|
-
ForbiddenPatterns: []
|
|
256
|
-
|
|
257
|
-
Warnings/UnknownTag:
|
|
258
|
-
Description: "Detects unknown YARD tags."
|
|
259
|
-
Enabled: true
|
|
260
|
-
Severity: error
|
|
261
|
-
|
|
262
|
-
Warnings/UnknownDirective:
|
|
263
|
-
Description: "Detects unknown YARD directives."
|
|
264
|
-
Enabled: true
|
|
265
|
-
Severity: error
|
|
266
|
-
|
|
267
|
-
Warnings/InvalidTagFormat:
|
|
268
|
-
Description: "Detects malformed tag syntax."
|
|
269
|
-
Enabled: true
|
|
270
|
-
Severity: error
|
|
271
|
-
|
|
272
|
-
Warnings/InvalidDirectiveFormat:
|
|
273
|
-
Description: "Detects malformed directive syntax."
|
|
274
|
-
Enabled: true
|
|
275
|
-
Severity: error
|
|
276
|
-
|
|
277
|
-
Warnings/DuplicatedParameterName:
|
|
278
|
-
Description: "Detects duplicate @param tags."
|
|
279
|
-
Enabled: true
|
|
280
|
-
Severity: error
|
|
281
|
-
|
|
282
|
-
Warnings/UnknownParameterName:
|
|
283
|
-
Description: "Detects @param tags for non-existent parameters."
|
|
284
|
-
Enabled: true
|
|
285
|
-
Severity: error
|
|
286
|
-
|
|
287
|
-
Semantic/AbstractMethods:
|
|
288
|
-
Description: "Ensures @abstract methods do not have real implementations."
|
|
289
|
-
Enabled: true
|
|
290
|
-
Severity: error
|
data/AGENTS.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
You are working in a Ruby project that uses mutation testing.
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
|
|
5
|
-
Achieve 100% mutation coverage. Verify with:
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
bundle exec mutant run
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
When iterating, prefer `--fail-fast` so you address one surviving
|
|
12
|
-
mutant at a time:
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
bundle exec mutant run --fail-fast
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## When you find an alive mutation
|
|
19
|
-
|
|
20
|
-
Decide which bucket it falls into:
|
|
21
|
-
|
|
22
|
-
- **A) The code does too much** for what the tests ask for. The
|
|
23
|
-
surviving mutation reveals behavior that no test requires. The
|
|
24
|
-
fix is to simplify the implementation.
|
|
25
|
-
- **B) A test is missing.** The behavior is intentional but no test
|
|
26
|
-
observes it. The fix is to add a test.
|
|
27
|
-
|
|
28
|
-
Decide between A) and B) before changing anything. If unsure, ask
|
|
29
|
-
the user.
|
|
30
|
-
|
|
31
|
-
## Constraints
|
|
32
|
-
|
|
33
|
-
- You may not skip mutants by configuring mutant to ignore them.
|
|
34
|
-
No `expressions:` filters, no `coverage_criteria:` tweaks.
|
|
35
|
-
- You may not use `send` or `__send__` to invoke private methods
|
|
36
|
-
in tests just to satisfy mutant.
|
|
37
|
-
|
|
38
|
-
## Done
|
|
39
|
-
|
|
40
|
-
You are done when all of these are green and not reporting any issues:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
bundle exec rake test
|
|
44
|
-
# don't run again if fail-fast has already passed
|
|
45
|
-
bundle exec mutant run --fail-fast --since origin/main
|
|
46
|
-
bundle exec standardrb --fix
|
|
47
|
-
bundle exec rake markdown:validate
|
|
48
|
-
bundle exec yard-lint
|
|
49
|
-
bundle exec rake erb:lint
|
|
50
|
-
```
|