Skip to content

Commit c6131af

Browse files
committed
Adds a rubocop config to be used in all ruby projects
Why: * We want a way to make sure we are all following the same style guides This change addresses the need by: * Having a public place where it is easy to get the configs we all agree on, whenever we are starting a project, instead of always be copying and pasting from previous projects, which will ultimately lead to diferences. * Enforces trailing comma since it makes it easier to move keys around and add new ones. It's also more consistent.
1 parent 4a51069 commit c6131af

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Guides for getting things done, programming well, and programming in style.
1414
* [Sass](/style/sass)
1515
* [JavaScript](/style/js)
1616
* [Templating](/style/templating)
17+
* [Linters](/linters)
1718
* [Trello](/trello)
1819
* [Github](/github)
1920

linters/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Linters
2+
=======
3+
4+
Files to configure the linters we use for each language and technology
5+
6+
* Ruby
7+
* [Rubocop](/linters/ruby/.rubocop.yml)

linters/ruby/.rubocop.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
AllCops:
2+
Include:
3+
- "**/Rakefile"
4+
- "**/config.ru"
5+
Exclude:
6+
- "db/**/*"
7+
- "config/**/*"
8+
- "script/**/*"
9+
- "bin/**/*"
10+
- "vendor/**/*"
11+
- "node_modules/**/*"
12+
- "spec/factories.rb"
13+
14+
Metrics/LineLength:
15+
Enabled: false
16+
17+
Style/AlignParameters:
18+
EnforcedStyle: with_fixed_indentation
19+
20+
Style/ClassAndModuleChildren:
21+
Enabled: false
22+
23+
Style/Documentation:
24+
Enabled: false
25+
26+
Style/DotPosition:
27+
EnforcedStyle: trailing
28+
29+
Style/IfUnlessModifier:
30+
Enabled: false
31+
32+
Style/PredicateName:
33+
NamePrefixBlacklist:
34+
- is_
35+
- have_
36+
37+
Style/StringLiterals:
38+
EnforcedStyle: double_quotes
39+
40+
Style/NumericLiterals:
41+
Enabled: false
42+
43+
Style/SingleLineBlockParams:
44+
Enabled: false
45+
46+
Style/MultilineOperationIndentation:
47+
EnforcedStyle: indented
48+
49+
Style/TrailingComma:
50+
EnforcedStyleForMultiline: comma

0 commit comments

Comments
 (0)