Skip to content

Commit

Permalink
Add rubocop configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
benwh committed May 17, 2020
1 parent d5b9813 commit d0e017e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
AllCops:
# Matches the minimum version in .travis.yml
TargetRubyVersion: 2.4

Style/StringLiterals:
EnforcedStyle: "double_quotes"

# New cops: https://docs.rubocop.org/en/latest/versioning/
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/ExponentialNotation:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/SlicingWithRange:
Enabled: true
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ rvm:
- ruby-head

gemfile:
- Gemfile
- Gemfile

branches:
only:
- master

before_install: gem update bundler
script: bundle exec rake test
script:
- bundle exec rake test
- bundle exec rubocop

sudo: false

Expand Down
1 change: 1 addition & 0 deletions fluent-plugin-gcloud-pubsub-custom.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Gem::Specification.new do |gem|

gem.add_development_dependency "bundler"
gem.add_development_dependency "rake"
gem.add_development_dependency "rubocop", "~>0.83"
gem.add_development_dependency "test-unit"
gem.add_development_dependency "test-unit-rr"
end

0 comments on commit d0e017e

Please sign in to comment.