- Split RSpec/FilePath into RSpec/SpecFilePathSuffix and RSpec/SpecFilePathFormat.
- Remove the
RSpec/
prefix from the Capybara and FactoryBot configurations. These namespaces changes should be hidden untilrubocop-rspec
v3.0 according to https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md but we are seeing warnings now so we are moving the new namespaces immediately.
- Remove RSpec/ExpectActual: Whenever we do routing, there's always false positives, e.g.
expect(post: '/email_updates/123').to route_to('email_updates#create', id: '123')
.
- Do not suggest extensions
- Remove Rails/FindById (it isn't safe if you're using MongoId in a project depending on your configuration)
- Use
braces_for_chaining
forStyle/BlockDelimiters
. As a team, we've agreed to use this more general extended approach among the community. It also simplifies configuration for specs, fixtures, migrations... etc.
- In RSpec template, do not inherit the root configuration, as the rspec .rubocop.yml file already inherits the ruby configuration itself.
- Change the Rails template so the require for the rspec plugin is done in the main .rubocop.yml file. Otherwise generating the TODO doesn't work properly.
- Disable all cops by default (including the new ones), and specifically set the enabled ones.
- Remove rubocop-rake plugin.
- Reduce the number of configuration files,
rubocop.yml
will include the cops configuration for each environment/plugin - Set mininum Rubocop version to 1.31 (which includes rubocop server). Relax rubocop version restriction, as it should remain compatible on 1.x branch now that we allow specific cops only.
- Relax plugin versions
- Autocorrect disabled for Rspec/Focus
- Allow numbers at the end of block parameter names
- Be quite relaxed with Layout/LineLength cop, ignore patterns related to strings/descriptions/logs and encourage autocorrection.
- Exclude more Rails configuration files affected by rails app:update.
- Do not skip features/ directory in the gem when packaging.
- Install db_migrate.yml only if
db/migrate/
folder exists rather than justdb/
folder.
- Rails: Move the AllCops to the Ruby one instead of repeating the same block. Disable Rails/SquishedSQLHeredocs and Rails/SkipsModelValidations.
- RSpec: Disable Spec/ContextWording, RSpec/NestedGroups, RSpec/DescribeClass and Style/BlockDelimiters.
- Add new configuration for feature tests inside
features/
folder.
- Enable NewCops by default
- Support Rubocop up to 1.22.x and latest extensions
- Exclude Guardfile from Ruby & Rails configurations
- Ignore other database schemas in /db for Rails apps
- Disable
RSpec/MultipleExpectations
cop. - Tweak
RSpec/MultipleMemoizedHelpers
to 10.
- Add new rubocop extensions: rubocop-performance & rubocop-rake. Both enabled by default on Ruby configuration.
- Restrict extensions versions to avoid introducing new cops in the apps depending on house_style without previously configuing them here.
- Exclude most Rails default configuration files for our cops to decrease the number of conflicts during Rails upgrades.
- Update Travis CI configuration and add a default Rake task (rubocop)
- Upgrade development dependencies: Bundler & Rake.
- Upgrade rubocop to 1.15.0, rubocop-rails to 2.10.1 and rubocop-rspec to 2.3.0.
- Remove old pre-1.0 post-install message.
- [FIX] Require Rubocop higher than 0.49 to fix security issue: https://nvd.nist.gov/vuln/detail/CVE-2017-8418
- [FIX] Rename
IndentHash
toIndentFirstHashElement
, and require Rubocop 0.68 or higher because of this change. - Rails cops are now split into a different gem
rubocop-rails
that we include by default. - Disable new Rails cops InverseOf & HasManyOrHasOneDependent.
- Exclude spec files for Lint/AmbiguousBlockAssociation as recommended in rubocop/rubocop#4222 (comment)
- Exclude specific rake configuration file for RSpec/ContextWording.
- Specify
indented
as the default value forIndentFirstArrayElement
. - Enforce
single_quotes
forStringLiterals
by default.
- [FIX] Remove
Include
values. Since 0.57Include
overwrites the hardcoded defaults. All values here are already included in the defaults, so no point in defining them here anymore. - [FIX]
SpaceInsideHashLiteralBraces
now belongs toLayout
instead ofStyle
- [FIX] Disabling new added cop
Style/AccessModifierDeclarations
. We use inline declarations (private :foo :bar
) as default in our codebase.
- updated rubocop to 0.63.1
- updated rubocop to 0.52.0
- rename cops with changed names and remove deprecated definitions.
- updated rubocop to 0.46.0
- Exclude
lib/tasks/cucumber.rake
, which is not intended to be edited.
- updated rubocop to 0.45.0 and rubocop-rspec to 1.8.
- Exclude
/bin
,/vendor
anddb/schema.rb
from ever being checked by rubocop in Rails projects
- Hound-CI uses the default rubocop configuration. It will now comment on pull requests only if code is committed that conflicts with the house style. [#11]
- The generator will no longer create
db/migrate/.rubocop.yml
if the Railsdb/
is not present. [#10] - Updated rubocop to 0.41.2 and rubocop-rspec to 1.5. This has some consequences:
- a
TargetRubyVersion
is no longer needed, as rubocop defaults to using.ruby-version
for identifying which version of ruby to parse against. When upgrading, it is safe to remove those lines from the host application's.rubocop.yml
file. - a new
RSpec/ExampleLength
cop is disabled for now. Nice idea, but if it's a choice between long examples and not being able to deploy because of a style issue, we should take the long examples.
- a
- Increases dependency to Rubocop 0.37.2, which changes how to specify Rails cops and introduces the requirement of a Ruby version in each project's
.rubocop.yml
file. A working value for this value will be inserted whenrails generate house_style:install
is run. - Support for turning off cops in the Rails
db/migrate/
folder is improved to a system that should actually work. - New cop
Style/FrozenStringLiteralComment
is disabled by default. - New cop
Style/SignalException
is supported, using thesemantic
default to best match existing practice.
- [FIX] Revert gemspec file selection, as replacement was not correctly including the essential rubocop
.yml
files.
- [FIX] Rename generator template files so they are included in gem release.
- New defaults for
db/migrate
folders in Rails projects. - Rails projects using
house_style
can now use a Rails generator to install the relevant house style configurations:{Rails.root}/.rubocop.yml
loads the default Rubocop config{Rails.root}/spec/.rubocop.yml
loads tweaked config for RSpec folders, including use of therubocop-rspec
plugin{Rails.root}/db/migrate/.rubocop.yml
ignores key rules for compatibility with Rails-generated migrations, etc.
- New
rspec/rubocop.yml
defaults.
- Initial release