Skip to content

Commit

Permalink
Properly exclude cops for all markdown extension types
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain authored and palkan committed Dec 12, 2023
1 parent aaf7820 commit 6a9db74
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 61 deletions.
93 changes: 32 additions & 61 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,81 @@ Markdown:
WarnInvalid: true
Autodetect: true

Layout/CommentIndentation:
# Keep in sync with MARKDOWN_EXTENSIONS
Layout/CommentIndentation: &markdown_excludes
Exclude:
- '**/*.md'
- '**/*.livemd'
- '**/*.markdown'
- '**/*.mdown'
- '**/*.mdwn'
- '**/*.mdx'
- '**/*.mkd'
- '**/*.mkdn'
- '**/*.mkdown'
- '**/*.ronn'
- '**/*.scd'
- '**/*.workbook'

Layout/LeadingCommentSpace:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Layout/TrailingBlankLines:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Layout/TrailingEmptyLines:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Layout/EmptyLineBetweenDefs:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/DuplicateRequire:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/DuplicateMethods:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/RedundantCopDisableDirective:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/RedundantCopEnableDirective:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/RedundantRequireStatement:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/UnusedMethodArgument:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/UnusedBlockArgument:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/UselessAssignment:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/UselessMethodDefinition:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/UselessAccessModifier:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Lint/Void:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Naming/FileName:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Style/AsciiComments:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Style/Documentation:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Style/CommentAnnotation:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Style/FrozenStringLiteralComment:
Exclude:
- '**/*.md'
- '**/*.markdown'
<<: *markdown_excludes

Layout/LineLength:
IgnoredPatterns:
Expand Down
1 change: 1 addition & 0 deletions lib/rubocop/markdown/rubocop_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module RuboCop
module Markdown # :nodoc:
# According to Linguist. mdx was dropped but is being kept for backwards compatibility.
# See https://github.com/github-linguist/linguist/blob/8c380f360ce00b95fa08d14ce0ebccd481af1b33/lib/linguist/languages.yml#L4088-L4098
# Keep in sync with config/default.yml
MARKDOWN_EXTENSIONS = %w[
.md
.livemd
Expand Down

0 comments on commit 6a9db74

Please sign in to comment.