Skip to content
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

fix simplecov with jruby, add a .rubocop.yml config file #3

Merged
merged 1 commit into from
Dec 10, 2021
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
2 changes: 2 additions & 0 deletions .jrubyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# for simplecov to work in jruby, without this we are getting errors when debugging spec tests
debug.fullTrace=true
51 changes: 51 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
AllCops:
Include:
- 'lib/**/*.rb'
Exclude:
- 'scripts/**/*'
- 'spec/**/*'
- 'vendor/**/*'
- Gemfile
- Rakefile

# These short variable names make sense as exceptions to the rule, but generally I think short variable names do hurt readability
Naming/MethodParameterName:
AllowedNames:
- vm
- dc
- s
- x
- f

#new cops:
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: true
Lint/EmptyBlock: # (new in 1.1)
Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
Enabled: true
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: true
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: false
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: true
Style/SwapValues: # (new in 1.1)
Enabled: false

#disabled

Metrics/AbcSize:
Max: 77
Metrics/ClassLength:
Max: 430
Metrics/CyclomaticComplexity:
Max: 14
Metrics/MethodLength:
Max: 48
Metrics/PerceivedComplexity:
Max: 14
Metrics/ParameterLists:
Max: 6
Layout/LineLength:
Max: 220
8 changes: 4 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

# require 'simplecov'
# SimpleCov.start do
# add_filter '/spec/'
# end
require 'simplecov'
SimpleCov.start do
add_filter '/spec/'
end
require 'helpers'
require 'rspec'
require 'vmpooler'
Expand Down
2 changes: 1 addition & 1 deletion vmpooler-provider-gce.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rack-test', '>= 0.6'
s.add_development_dependency 'rspec', '>= 3.2'
s.add_development_dependency 'rubocop', '~> 1.1.0'
#s.add_development_dependency 'simplecov', '>= 0.11.2'
s.add_development_dependency 'simplecov', '>= 0.11.2'
s.add_development_dependency 'thor', '~> 1.0', '>= 1.0.1'
s.add_development_dependency 'yarjuf', '>= 2.0'
end