docquet 1.0.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 (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +20 -0
  3. data/LICENSE +21 -0
  4. data/README.md +205 -0
  5. data/config/cops/bundler.yml +19 -0
  6. data/config/cops/capybara.yml +1 -0
  7. data/config/cops/capybara_rspec.yml +1 -0
  8. data/config/cops/gemspec.yml +4 -0
  9. data/config/cops/i18n_gettext.yml +2 -0
  10. data/config/cops/i18n_railsi18n.yml +1 -0
  11. data/config/cops/layout.yml +79 -0
  12. data/config/cops/lint.yml +7 -0
  13. data/config/cops/metrics.yml +14 -0
  14. data/config/cops/migration.yml +2 -0
  15. data/config/cops/naming.yml +4 -0
  16. data/config/cops/performance.yml +7 -0
  17. data/config/cops/rake.yml +5 -0
  18. data/config/cops/rspec.yml +41 -0
  19. data/config/cops/security.yml +1 -0
  20. data/config/cops/sequel.yml +2 -0
  21. data/config/cops/style.yml +153 -0
  22. data/config/cops/thread_safety.yml +5 -0
  23. data/config/defaults/bundler.yml +97 -0
  24. data/config/defaults/capybara.yml +103 -0
  25. data/config/defaults/capybara_rspec.yml +24 -0
  26. data/config/defaults/gemspec.yml +121 -0
  27. data/config/defaults/i18n_gettext.yml +20 -0
  28. data/config/defaults/i18n_railsi18n.yml +9 -0
  29. data/config/defaults/layout.yml +1121 -0
  30. data/config/defaults/lint.yml +1315 -0
  31. data/config/defaults/metrics.yml +119 -0
  32. data/config/defaults/migration.yml +9 -0
  33. data/config/defaults/naming.yml +332 -0
  34. data/config/defaults/performance.yml +445 -0
  35. data/config/defaults/rake.yml +34 -0
  36. data/config/defaults/rspec.yml +1081 -0
  37. data/config/defaults/security.yml +67 -0
  38. data/config/defaults/sequel.yml +59 -0
  39. data/config/defaults/style.yml +2985 -0
  40. data/config/defaults/thread_safety.yml +45 -0
  41. data/exe/docquet +7 -0
  42. data/lib/docquet/cli/base.rb +21 -0
  43. data/lib/docquet/cli/install_config.rb +75 -0
  44. data/lib/docquet/cli/regenerate_todo.rb +46 -0
  45. data/lib/docquet/cli.rb +6 -0
  46. data/lib/docquet/commands.rb +12 -0
  47. data/lib/docquet/config_processor.rb +52 -0
  48. data/lib/docquet/generators/rubocop_yml_generator.rb +78 -0
  49. data/lib/docquet/inflector.rb +22 -0
  50. data/lib/docquet/plugin_detector.rb +29 -0
  51. data/lib/docquet/rake_task.rb +126 -0
  52. data/lib/docquet/version.rb +6 -0
  53. data/lib/docquet.rb +17 -0
  54. data/templates/rubocop.yml.erb +35 -0
  55. metadata +172 -0
@@ -0,0 +1,97 @@
1
+ # Department 'Bundler' (7):
2
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlerduplicatedgem
3
+ Bundler/DuplicatedGem:
4
+ Description: Checks for duplicate gem entries in Gemfile.
5
+ Enabled: true
6
+ Severity: warning
7
+ VersionAdded: '0.46'
8
+ VersionChanged: '1.40'
9
+ Include:
10
+ - "**/*.gemfile"
11
+ - "**/Gemfile"
12
+ - "**/gems.rb"
13
+
14
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlerduplicatedgroup
15
+ Bundler/DuplicatedGroup:
16
+ Description: Checks for duplicate group entries in Gemfile.
17
+ Enabled: true
18
+ Severity: warning
19
+ VersionAdded: '1.56'
20
+ Include:
21
+ - "**/*.gemfile"
22
+ - "**/Gemfile"
23
+ - "**/gems.rb"
24
+
25
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlergemcomment
26
+ Bundler/GemComment:
27
+ Description: Add a comment describing each gem.
28
+ Enabled: true # was false
29
+ VersionAdded: '0.59'
30
+ VersionChanged: '0.85'
31
+ Include:
32
+ - "**/*.gemfile"
33
+ - "**/Gemfile"
34
+ - "**/gems.rb"
35
+ IgnoredGems: []
36
+ OnlyFor: []
37
+
38
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlergemfilename
39
+ Bundler/GemFilename:
40
+ Description: Enforces the filename for managing gems.
41
+ Enabled: true
42
+ VersionAdded: '1.20'
43
+ EnforcedStyle: Gemfile
44
+ SupportedStyles:
45
+ - Gemfile
46
+ - gems.rb
47
+ Include:
48
+ - "**/Gemfile"
49
+ - "**/gems.rb"
50
+ - "**/Gemfile.lock"
51
+ - "**/gems.locked"
52
+
53
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlergemversion
54
+ Bundler/GemVersion:
55
+ Description: Requires or forbids specifying gem versions.
56
+ Enabled: true # was false
57
+ VersionAdded: '1.14'
58
+ EnforcedStyle: required
59
+ SupportedStyles:
60
+ - required
61
+ - forbidden
62
+ Include:
63
+ - "**/*.gemfile"
64
+ - "**/Gemfile"
65
+ - "**/gems.rb"
66
+ AllowedGems: []
67
+
68
+ # Supports --autocorrect
69
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlerinsecureprotocolsource
70
+ Bundler/InsecureProtocolSource:
71
+ Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
72
+ because HTTP requests are insecure. Please change your source to 'https://rubygems.org'
73
+ if possible, or 'http://rubygems.org' if not.
74
+ Enabled: true
75
+ Severity: warning
76
+ VersionAdded: '0.50'
77
+ VersionChanged: '1.40'
78
+ AllowHttpProtocol: true
79
+ Include:
80
+ - "**/*.gemfile"
81
+ - "**/Gemfile"
82
+ - "**/gems.rb"
83
+
84
+ # Supports --autocorrect
85
+ # https://docs.rubocop.org/rubocop/cops_bundler.html#bundlerorderedgems
86
+ Bundler/OrderedGems:
87
+ Description: Gems within groups in the Gemfile should be alphabetically sorted.
88
+ Enabled: true
89
+ VersionAdded: '0.46'
90
+ VersionChanged: '0.47'
91
+ TreatCommentsAsGroupSeparators: true
92
+ ConsiderPunctuation: false
93
+ Include:
94
+ - "**/*.gemfile"
95
+ - "**/Gemfile"
96
+ - "**/gems.rb"
97
+
@@ -0,0 +1,103 @@
1
+ # Department 'Capybara' (12):
2
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaraambiguousclick
3
+ Capybara/AmbiguousClick:
4
+ Description: Specify the exact target to click on.
5
+ Enabled: true # was false
6
+ VersionAdded: '2.22'
7
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/AmbiguousClick
8
+
9
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaraclicklinkorbuttonstyle
10
+ Capybara/ClickLinkOrButtonStyle:
11
+ Description: Checks for methods of button or link clicks.
12
+ Enabled: true # was false
13
+ VersionAdded: '2.19'
14
+ VersionChanged: '2.22'
15
+ EnforcedStyle: link_or_button
16
+ SupportedStyles:
17
+ - link_or_button
18
+ - strict
19
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/ClickLinkOrButtonStyle
20
+
21
+ # Supports --autocorrect
22
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaracurrentpathexpectation
23
+ Capybara/CurrentPathExpectation:
24
+ Description: Checks that no expectations are set on Capybara's `current_path`.
25
+ Enabled: true
26
+ VersionAdded: '1.18'
27
+ VersionChanged: '2.0'
28
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/CurrentPathExpectation
29
+
30
+ # Supports --autocorrect
31
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybarafindallfirst
32
+ Capybara/FindAllFirst:
33
+ Description: Enforces use of `first` instead of `all` with `first` or `[0]`.
34
+ Enabled: true # was pending
35
+ VersionAdded: '2.22'
36
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/FindAllFirst
37
+
38
+ # Supports --autocorrect
39
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaramatchstyle
40
+ Capybara/MatchStyle:
41
+ Description: Checks for usage of deprecated style methods.
42
+ Enabled: true # was pending
43
+ VersionAdded: '2.17'
44
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/MatchStyle
45
+
46
+ # Supports --autocorrect
47
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaranegationmatcher
48
+ Capybara/NegationMatcher:
49
+ Description: Enforces use of `have_no_*` or `not_to` for negated expectations.
50
+ Enabled: true # was pending
51
+ VersionAdded: '2.14'
52
+ VersionChanged: '2.20'
53
+ EnforcedStyle: have_no
54
+ SupportedStyles:
55
+ - have_no
56
+ - not_to
57
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/NegationMatcher
58
+
59
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaranegationmatcheraftervisit
60
+ Capybara/NegationMatcherAfterVisit:
61
+ Description: Do not allow negative matchers to be used immediately after `visit`.
62
+ Enabled: true # was pending
63
+ VersionAdded: '2.22'
64
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/NegationMatcherAfterVisit
65
+
66
+ # Supports --autocorrect
67
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybararedundantwithinfind
68
+ Capybara/RedundantWithinFind:
69
+ Description: Checks for redundant `within find(...)` calls.
70
+ Enabled: true # was pending
71
+ VersionAdded: '2.20'
72
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/RedundantWithinFind
73
+
74
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaraspecificactions
75
+ Capybara/SpecificActions:
76
+ Description: Checks for there is a more specific actions offered by Capybara.
77
+ Enabled: true # was pending
78
+ VersionAdded: '2.14'
79
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/SpecificActions
80
+
81
+ # Supports --autocorrect
82
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaraspecificfinders
83
+ Capybara/SpecificFinders:
84
+ Description: Checks if there is a more specific finder offered by Capybara.
85
+ Enabled: true # was pending
86
+ VersionAdded: '2.13'
87
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/SpecificFinders
88
+
89
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaraspecificmatcher
90
+ Capybara/SpecificMatcher:
91
+ Description: Checks for there is a more specific matcher offered by Capybara.
92
+ Enabled: true # was pending
93
+ VersionAdded: '2.12'
94
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/SpecificMatcher
95
+
96
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaravisibilitymatcher
97
+ Capybara/VisibilityMatcher:
98
+ Description: Checks for boolean visibility in Capybara finders.
99
+ Enabled: true
100
+ VersionAdded: '1.39'
101
+ VersionChanged: '2.0'
102
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/VisibilityMatcher
103
+
@@ -0,0 +1,24 @@
1
+ # Department 'Capybara/RSpec' (2):
2
+ # Supports --autocorrect
3
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara_rspec.html#capybararspechaveselector
4
+ Capybara/RSpec/HaveSelector:
5
+ Description: Use `have_css` or `have_xpath` instead of `have_selector`.
6
+ Enabled: true # was pending
7
+ DefaultSelector: css
8
+ VersionAdded: '2.19'
9
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/RSpec/HaveSelector
10
+
11
+ # Supports --autocorrect
12
+ # https://docs.rubocop.org/rubocop-capybara/cops_capybara_rspec.html#capybararspecpredicatematcher
13
+ Capybara/RSpec/PredicateMatcher:
14
+ Description: Prefer using predicate matcher over using predicate method directly.
15
+ Enabled: true # was pending
16
+ Strict: true
17
+ EnforcedStyle: inflected
18
+ AllowedExplicitMatchers: []
19
+ SupportedStyles:
20
+ - inflected
21
+ - explicit
22
+ VersionAdded: '2.19'
23
+ Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/RSpec/PredicateMatcher
24
+
@@ -0,0 +1,121 @@
1
+ # Department 'Gemspec' (10):
2
+ # Supports --autocorrect
3
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecaddruntimedependency
4
+ Gemspec/AddRuntimeDependency:
5
+ Description: Prefer `add_dependency` over `add_runtime_dependency`.
6
+ StyleGuide: "#add_dependency_vs_add_runtime_dependency"
7
+ References:
8
+ - https://github.com/ruby/rubygems/issues/7799#issuecomment-2192720316
9
+ Enabled: true # was pending
10
+ VersionAdded: '1.65'
11
+ Include:
12
+ - "**/*.gemspec"
13
+
14
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecattributeassignment
15
+ Gemspec/AttributeAssignment:
16
+ Description: Use consistent style for Gemspec attributes assignment.
17
+ Enabled: true # was pending
18
+ VersionAdded: '1.77'
19
+ Include:
20
+ - "**/*.gemspec"
21
+
22
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdependencyversion
23
+ Gemspec/DependencyVersion:
24
+ Description: Requires or forbids specifying gem dependency versions.
25
+ Enabled: true # was false
26
+ VersionAdded: '1.29'
27
+ EnforcedStyle: required
28
+ SupportedStyles:
29
+ - required
30
+ - forbidden
31
+ Include:
32
+ - "**/*.gemspec"
33
+ AllowedGems: []
34
+
35
+ # Supports --autocorrect
36
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdeprecatedattributeassignment
37
+ Gemspec/DeprecatedAttributeAssignment:
38
+ Description: Checks that deprecated attribute assignments are not set in a gemspec
39
+ file.
40
+ Enabled: true # was pending
41
+ Severity: warning
42
+ VersionAdded: '1.30'
43
+ VersionChanged: '1.40'
44
+ Include:
45
+ - "**/*.gemspec"
46
+
47
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdevelopmentdependencies
48
+ Gemspec/DevelopmentDependencies:
49
+ Description: Checks that development dependencies are specified in Gemfile rather
50
+ than gemspec.
51
+ Enabled: true # was pending
52
+ VersionAdded: '1.44'
53
+ EnforcedStyle: Gemfile
54
+ SupportedStyles:
55
+ - Gemfile
56
+ - gems.rb
57
+ - gemspec
58
+ AllowedGems: []
59
+ Include:
60
+ - "**/*.gemspec"
61
+ - "**/Gemfile"
62
+ - "**/gems.rb"
63
+
64
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecduplicatedassignment
65
+ Gemspec/DuplicatedAssignment:
66
+ Description: An attribute assignment method calls should be listed only once in a
67
+ gemspec.
68
+ Enabled: true
69
+ Severity: warning
70
+ VersionAdded: '0.52'
71
+ VersionChanged: '1.40'
72
+ Include:
73
+ - "**/*.gemspec"
74
+
75
+ # Supports --autocorrect
76
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecordereddependencies
77
+ Gemspec/OrderedDependencies:
78
+ Description: Dependencies in the gemspec should be alphabetically sorted.
79
+ Enabled: true
80
+ VersionAdded: '0.51'
81
+ TreatCommentsAsGroupSeparators: true
82
+ ConsiderPunctuation: false
83
+ Include:
84
+ - "**/*.gemspec"
85
+
86
+ # Supports --autocorrect
87
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecrequiremfa
88
+ Gemspec/RequireMFA:
89
+ Description: Checks that the gemspec has metadata to require Multi-Factor Authentication
90
+ from RubyGems.
91
+ Enabled: true # was pending
92
+ Severity: warning
93
+ VersionAdded: '1.23'
94
+ VersionChanged: '1.40'
95
+ References:
96
+ - https://guides.rubygems.org/mfa-requirement-opt-in/
97
+ Include:
98
+ - "**/*.gemspec"
99
+
100
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecrequiredrubyversion
101
+ Gemspec/RequiredRubyVersion:
102
+ Description: Checks that `required_ruby_version` of gemspec is specified and equal
103
+ to `TargetRubyVersion` of .rubocop.yml.
104
+ Enabled: true
105
+ Severity: warning
106
+ VersionAdded: '0.52'
107
+ VersionChanged: '1.40'
108
+ Include:
109
+ - "**/*.gemspec"
110
+
111
+ # https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecrubyversionglobalsusage
112
+ Gemspec/RubyVersionGlobalsUsage:
113
+ Description: Checks usage of RUBY_VERSION in gemspec.
114
+ StyleGuide: "#no-ruby-version-in-the-gemspec"
115
+ Enabled: true
116
+ Severity: warning
117
+ VersionAdded: '0.72'
118
+ VersionChanged: '1.40'
119
+ Include:
120
+ - "**/*.gemspec"
121
+
@@ -0,0 +1,20 @@
1
+ # Department 'I18n/GetText' (4):
2
+ # Supports --autocorrect
3
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_gettext.html#i18ngettextdecoratefunctionmessage
4
+ I18n/GetText/DecorateFunctionMessage:
5
+ Enabled: true
6
+
7
+ # Supports --autocorrect
8
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_gettext.html#i18ngettextdecoratestring
9
+ I18n/GetText/DecorateString:
10
+ Enabled: true
11
+ AutoCorrect: false
12
+
13
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_gettext.html#i18ngettextdecoratestringformattingusinginterpolation
14
+ I18n/GetText/DecorateStringFormattingUsingInterpolation:
15
+ Enabled: true
16
+
17
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_gettext.html#i18ngettextdecoratestringformattingusingpercent
18
+ I18n/GetText/DecorateStringFormattingUsingPercent:
19
+ Enabled: true
20
+
@@ -0,0 +1,9 @@
1
+ # Department 'I18n/RailsI18n' (2):
2
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_railsi18n.html#i18nrailsi18ndecoratestring
3
+ I18n/RailsI18n/DecorateString:
4
+ Enabled: true
5
+
6
+ # https://docs.rubocop.org/rubocop-i18n/cops_i18n_railsi18n.html#i18nrailsi18ndecoratestringformattingusinginterpolation
7
+ I18n/RailsI18n/DecorateStringFormattingUsingInterpolation:
8
+ Enabled: true # was false
9
+