-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint: Remove unreachable code #1137
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has failing tests. Please green it up.
@zenspider Thank you for pointing out. It's weird because |
I was curious why it was only failing in one env... Your difference is even more curious. What does the rake version do differently? |
Because the job will only run on |
RuboCop is only used to format and autocorrect generated files. parsed_files = [
"lib/rdoc/rd/block_parser.rb",
"lib/rdoc/rd/inline_parser.rb",
"lib/rdoc/markdown.rb",
"lib/rdoc/markdown/literals.rb"
]
# Rakefile L108
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = [*parsed_files]
end
task :build => [:generate, "rubocop:autocorrect"] This means, |
@tompng Thank you for clarifying it, now I can understand what is going on here. First of all, we usually run Therefore, I'd like to suggest creating another rubocop config file such as I'd like to hear your opinions! |
I will try to implement the above changes in a separate PR. And then we can add more rules to the new That said, I'd really like to see consistent rules across |
I've merged #1139 that implemented the above changes. |
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.
b0e7f50
to
000d3ab
Compare
@st0012 Thank you, rebased. Do we need to run |
It’s already on CI. And it’ll be very helpful if you can also post what warnings you got. |
The output of
|
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.