Skip to content

Conversation

@koic
Copy link
Collaborator

@koic koic commented Sep 28, 2023

This reverts commit a30ef79.

rubocop-md is a unique gem that doesn't possess any cops. It inspects Ruby code within Markdown files. However, as can be seen from the disabling of cops in rails/rails, which cops to disable is documented in the inspection target repository:

  Exclude:
+   - '**/CHANGELOG.md'
+   - '**/2_*_release_notes.md'
+   - '**/3_*_release_notes.md'
+   - '**/4_*_release_notes.md'
+   - '**/5_*_release_notes.md'
+   - '**/6_*_release_notes.md'

 Layout/IndentationConsistency:
   Enabled: true
   EnforcedStyle: indented_internal_methods
+  Exclude:
+    - '**/*.md'

 Style/FrozenStringLiteralComment:
   Enabled: true
   EnforcedStyle: always
   Exclude:
     - 'actionview/test/**/*.builder'
     - 'actionview/test/**/*.ruby'
     - 'actionpack/test/**/*.builder'
     - 'actionpack/test/**/*.ruby'
     - 'activestorage/db/migrate/**/*.rb'
     - 'activestorage/db/update_migrate/**/*.rb'
     - 'actionmailbox/db/migrate/**/*.rb'
     - 'actiontext/db/migrate/**/*.rb'
+    - '**/*.md'

This means that any false positives in documentation need to be addressed as they arise, leading one to question whether this is the behavior users expect.

This PR resolves the above-mentioned usability issues by disabling rubocop-md. If users wish to enable rubocop-md, they simply need to add it explicitly to their .rubocop.yml. In other words, the use of rubocop-md is a deliberate choice made by the user.

I believe this is a better configuration for rubocop-rails_config.

This reverts commit a30ef79.

`rubocop-md` is a unique gem that doesn't possess any cops. It inspects Ruby code within Markdown files.
However, as can be seen from the disabling of cops in `rails/rails`, which cops to disable is documented
in the inspection target repository:

```diff
  Exclude:
+   - '**/CHANGELOG.md'
+   - '**/2_*_release_notes.md'
+   - '**/3_*_release_notes.md'
+   - '**/4_*_release_notes.md'
+   - '**/5_*_release_notes.md'
+   - '**/6_*_release_notes.md'

 Layout/IndentationConsistency:
   Enabled: true
   EnforcedStyle: indented_internal_methods
+  Exclude:
+    - '**/*.md'

 Style/FrozenStringLiteralComment:
   Enabled: true
   EnforcedStyle: always
   Exclude:
     - 'actionview/test/**/*.builder'
     - 'actionview/test/**/*.ruby'
     - 'actionpack/test/**/*.builder'
     - 'actionpack/test/**/*.ruby'
     - 'activestorage/db/migrate/**/*.rb'
     - 'activestorage/db/update_migrate/**/*.rb'
     - 'actionmailbox/db/migrate/**/*.rb'
     - 'actiontext/db/migrate/**/*.rb'
+    - '**/*.md'
```

This means that any false positives in documentation need to be addressed as they arise, leading one to
question whether this is the behavior users expect.

This PR resolves the above-mentioned usability issues by disabling `rubocop-md`. If users wish to enable
`rubocop-md`, they simply need to add it explicitly to their `.rubocop.yml`. In other words, the use of
`rubocop-md` is a deliberate choice made by the user.

I believe this is a better configuration for `rubocop-rails_config`.
@toshimaru
Copy link
Owner

still considering this. Let me have a little more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants