Skip to content

Commit 0a5b70b

Browse files
committed
Add Finstyle (driven by RuboCop) to maintain style/linting direction.
For more details, see http://fnichol.github.io/finstyle/
1 parent 7b7d6a1 commit 0a5b70b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Style/FileName:
2+
Exclude:
3+
- 'support/**/*'

Rakefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ task :stats do
2626
sh "countloc -r spec features"
2727
end
2828

29+
require "finstyle"
30+
require "rubocop/rake_task"
31+
RuboCop::RakeTask.new(:style) do |task|
32+
task.options << "--display-cop-names"
33+
end
34+
2935
if RUBY_ENGINE != "jruby"
3036
require "cane/rake_task"
3137
desc "Run cane to check quality metrics"
@@ -34,10 +40,10 @@ if RUBY_ENGINE != "jruby"
3440
end
3541

3642
desc "Run all quality tasks"
37-
task :quality => [:cane, :stats]
43+
task :quality => [:cane, :style, :stats]
3844
else
3945
desc "Run all quality tasks"
40-
task :quality => [:stats]
46+
task :quality => [:style, :stats]
4147
end
4248

4349
require "yard"

test-kitchen.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ Gem::Specification.new do |gem|
4747
# style and complexity libraries are tightly version pinned as newer releases
4848
# may introduce new and undesireable style choices which would be immediately
4949
# enforced in CI
50+
gem.add_development_dependency "finstyle", "1.0.1"
5051
gem.add_development_dependency "cane", "2.6.2"
5152
end

0 commit comments

Comments
 (0)