Git Product home page Git Product logo

house_style's People

Contributors

jbilbo avatar mattmacleod avatar mowat27 avatar orthodox avatar scottmatthewman avatar shamess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

house_style's Issues

Update, rather than overwrite, .rubocop.yml on new installations

Currently, running rails generate house_style:install creates new .rubocop.yml files with the relevant inheritance commands to set up the use of house_style.

However, when adding the gem to existing projects, we should really accommodate existing Rubocop settings. While we want all projects to be written to a consistent style, that's not always practical โ€“ hence why the Rubocop documentation provides an example workflow of creating a .rubocop_todo.yml file to accommodate existing style violations.

In the house_style:install process, we should maybe perform the same process for each .rubocop.yml file that we are creating:

  1. If a .rubocop.yml file exists in that location, insert a inherit_from: block at the top of the file so that the house_style defaults are handled first, and are then overridden by existing rules.
  2. If no file exists in the desired location, create them from the templates (as now).

This is consistent with the way in which house_style is intended to be used โ€“ a centralised "ideal" set of rules, and local overrides that explicitly set out where a project is currently diverging from those.

Treat `specify` and `it` identically when checking RSpec style

Implementing house_style on an internal project, I noticed that the following line triggered a warning in our configured Style/BlockDelimiters cop

specify { should_not render_template(:show) }

Changing to it did not trigger the warning:

it { should_not render_template(:show) }

it is in the cop's IgnoredMethods collection, along with lambda and proc. specify should be treated the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.