mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Address todos generated by rubocop for files starting with lib/factory_bot_rails (#296)
This partially addresses #293. Since rubocop generated quite a few todos, the commits addressing them are split up into a few different PRs that cover different files.
This commit is contained in:
parent
dc6c6012c4
commit
c6b66bbb1a
4 changed files with 8 additions and 24 deletions
22
.rubocop.yml
22
.rubocop.yml
|
@ -5,6 +5,9 @@ AllCops:
|
|||
Exclude:
|
||||
- "tmp/**/*"
|
||||
|
||||
Style/EmptyMethod:
|
||||
EnforcedStyle: expanded
|
||||
|
||||
# TODO:
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
|
@ -86,24 +89,8 @@ Style/Documentation:
|
|||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'test/**/*'
|
||||
- 'lib/factory_bot_rails.rb'
|
||||
- 'lib/factory_bot_rails/definition_file_paths.rb'
|
||||
- 'lib/factory_bot_rails/generator.rb'
|
||||
- 'lib/factory_bot_rails/generators/non_rspec_generator.rb'
|
||||
- 'lib/factory_bot_rails/generators/null_generator.rb'
|
||||
- 'lib/factory_bot_rails/generators/rspec_generator.rb'
|
||||
- 'lib/factory_bot_rails/railtie.rb'
|
||||
- 'lib/factory_bot_rails/reloader.rb'
|
||||
- 'lib/generators/factory_bot/model/model_generator.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: compact, expanded
|
||||
Style/EmptyMethod:
|
||||
Exclude:
|
||||
- 'lib/factory_bot_rails/generators/null_generator.rb'
|
||||
|
||||
# Offense count: 29
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
|
@ -143,9 +130,6 @@ Style/StringLiterals:
|
|||
- 'factory_bot_rails.gemspec'
|
||||
- 'features/step_definitions/rails_steps.rb'
|
||||
- 'features/support/env.rb'
|
||||
- 'lib/factory_bot_rails.rb'
|
||||
- 'lib/factory_bot_rails/generator.rb'
|
||||
- 'lib/factory_bot_rails/generators/rspec_generator.rb'
|
||||
- 'lib/generators/factory_bot.rb'
|
||||
- 'lib/generators/factory_bot/model/model_generator.rb'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'factory_bot_rails/railtie'
|
||||
require "factory_bot_rails/railtie"
|
||||
|
||||
module FactoryBotRails
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'factory_bot_rails/generators/rspec_generator'
|
||||
require 'factory_bot_rails/generators/non_rspec_generator'
|
||||
require 'factory_bot_rails/generators/null_generator'
|
||||
require "factory_bot_rails/generators/rspec_generator"
|
||||
require "factory_bot_rails/generators/non_rspec_generator"
|
||||
require "factory_bot_rails/generators/null_generator"
|
||||
|
||||
module FactoryBotRails
|
||||
class Generator
|
||||
|
|
|
@ -16,7 +16,7 @@ module FactoryBotRails
|
|||
end
|
||||
|
||||
def factory_bot_directory
|
||||
@generators.options.fetch(:factory_bot, {}).fetch(:dir, 'spec/factories')
|
||||
@generators.options.fetch(:factory_bot, {}).fetch(:dir, "spec/factories")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue