提交 7d883b82 编写于 作者: S Sean Griffin

Add codeclimate and rubocop config files

We're going to be experimenting with a new bot for them. This will not
cause anything to start affecting new PRs yet, but it will have data
sent to them so they can do "dry run" stuff on their end.

The rubocop file is based on our documented style guide. I've only
included rules which are either already consistently applied throughout
the entire codebase, or where added lines should be following the
guideline regardless of the surrounding code (such as hash syntax)
上级 01fc08f6
engines:
rubocop:
enabled: true
ratings:
paths:
- "**.rb"
exclude_paths:
- actioncable/lib/rails/generators/
- actioncable/test/
- actionmailer/lib/rails/generators/
- actionmailer/test/
- actionpack/test/
- actionview/test/
- activejob/lib/rails/generators/
- activejob/test/
- activemodel/test/
- activerecord/lib/rails/generators/
- activerecord/test/
- activesupport/test/
- railties/lib/rails/generators/
- railties/test/
- ci/
- guides/
- tasks/
- tools/
AllCops:
TargetRubyVersion: 2.3
DisabledByDefault: true
# Two spaces, no tabs (for indentation).
Style/IndentationWidth:
enabled: true
# No trailing whitespace.
Style/TrailingWhitespace:
enabled: true
# Blank lines should not have any spaces.
Style/TrailingBlankLines:
enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
enabled: true
# Prefer &&/|| over and/or.
Style/AndOr:
enabled: true
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
enabled: true
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册