Last active
September 12, 2017 20:43
-
-
Save emwalker/d77c733d98853b5496328c6778e6de68 to your computer and use it in GitHub Desktop.
Rubocop rules for block braces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Space between `method_name` and `{` | |
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutspacebeforeblockbraces | |
Layout/SpaceBeforeBlockBraces: | |
EnforcedStyle: space | |
Exclude: | |
- 'app/queries/*' | |
# Space after block `{` and space before `}` | |
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutspacebeforeblockbraces | |
Layout/SpaceInsideBlockBraces: | |
EnforcedStyle: space | |
Exclude: | |
- 'app/queries/*' |
Some of them use a DSL called squeel
, which looks like this:
where{(circle_id.eq my{id}) | (global.eq true)}
This is how squeel
is normally used, and I don't want to go back and change a bunch of code to something that looks unusual for the DSL.
In order not to have conflicts with squeel
it's better to exclude queries
folder from those metrics.
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
why did you exclude queries objects from this rule?