Skip to content

Commit e12645a

Browse files
committed
Update RuboCop configuration and improve code block filter logic
1 parent 1aefbe5 commit e12645a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.rubocop.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ inherit_from: .rubocop_todo.yml
33
AllCops:
44
NewCops: enable
55

6+
Layout/LineLength:
7+
Enabled: false
8+
69
Metrics/ClassLength:
710
Enabled: false
811

12+
Naming/PredicatePrefix:
13+
ForbiddenPrefixes:
14+
- is_
15+
916
Style/Documentation:
1017
Enabled: false
1118

@@ -15,10 +22,6 @@ Style/EmptyCaseCondition:
1522
Style/GuardClause:
1623
Enabled: false
1724

18-
Style/PredicateName:
19-
ForbiddenPrefixes:
20-
- is_
21-
2225
Style/StringLiterals:
2326
EnforcedStyle: double_quotes
2427

@@ -34,9 +37,6 @@ Style/TrailingCommaInArrayLiteral:
3437
Style/RedundantPercentQ:
3538
Enabled: false
3639

37-
Metrics/LineLength:
38-
Enabled: false
39-
4040
Metrics/BlockLength:
4141
Exclude:
4242
- qiita-markdown.gemspec

lib/qiita/markdown/filters/code_block.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def empty?
8282
end
8383

8484
def has_only_filename?
85-
sections[1].nil? && sections[0] && sections[0].include?(".")
85+
sections[1].nil? && sections[0]&.include?(".")
8686
end
8787

8888
def linguist_language

0 commit comments

Comments
 (0)