Skip to content

Commit b0e7f50

Browse files
committed
lint: Remove unreachable code
This is an attempt to utilize RuboCop further. RuboCop was added in 9262fdd but only a few rules have been enabled. I believe we can utilize RuboCop more for better code quality, especially with Lint cops. This is the first step to enable other Lint cops. This commit also exclude some auto generated files.
1 parent 554e0f5 commit b0e7f50

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ AllCops:
33
DisabledByDefault: true
44
Exclude:
55
- rdoc.gemspec
6+
- lib/rdoc/markdown.rb # Auto generated
7+
- lib/rdoc/rd/block_parser.rb # Auto generated
68

79
Layout/TrailingWhitespace:
810
Enabled: true
911
Layout/TrailingEmptyLines:
1012
Enabled: true
13+
Lint/UnreachableCode:
14+
Enabled: true

lib/rdoc/rdoc.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ def parse_file filename
395395
$stderr.puts e.backtrace.join("\n\t") if $DEBUG_RDOC
396396

397397
raise e
398-
nil
399398
end
400399

401400
##

0 commit comments

Comments
 (0)