Skip to content

Added Rubocop task after file generation. #650

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

Merged
merged 4 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AllCops:
TargetRubyVersion: 2.5
DisabledByDefault: true
Exclude:
- rdoc.gemspec

Layout/TrailingWhitespace:
Enabled: true
7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ $:.unshift File.expand_path 'lib'
require 'rdoc/task'
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'

task :docs => :generate
task :test => :generate
Expand Down Expand Up @@ -80,7 +81,11 @@ end

task "#{path}.gem" => package_parser_files

RuboCop::RakeTask.new(:rubocop) do |t|
t.options = [*parsed_files]
end

desc "Genrate all files used racc and kpeg"
task :generate => parsed_files

task :build => [:generate]
task :build => [:generate, "rubocop:auto_correct"]
1 change: 1 addition & 0 deletions rdoc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
s.add_development_dependency("racc", "> 1.4.10")
s.add_development_dependency("kpeg")
s.add_development_dependency("minitest", "~> 5")
s.add_development_dependency("rubocop")
end
2 changes: 1 addition & 1 deletion test/test_rdoc_parser_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4087,7 +4087,7 @@ def test_parse_include_by_dynamic_definition_without_paren
module A
class B
include(Module.new do
def e m
def e m
end
end)
end
Expand Down