Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ source 'https://rubygems.org'

gem "activesupport", require: false
gem "mry", "~> 0.52.0", require: false
gem "parser", "~> 2.4.0"
gem "parser"
gem "pry", require: false
gem "rubocop", "~> 0.52.1", require: false
gem "rubocop", "~> 0.68.1", require: false
gem "rubocop-migrations", require: false
gem "rubocop-rspec", require: false
gem "safe_yaml"
Expand Down
28 changes: 14 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
ast (2.3.0)
ast (2.4.0)
coderay (1.1.2)
concurrent-ruby (1.0.5)
diff-lcs (1.3)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.2)
method_source (0.9.0)
minitest (5.10.3)
mry (0.52.0.0)
rubocop (>= 0.41.0)
parallel (1.12.1)
parser (2.4.0.2)
ast (~> 2.3)
powerpack (0.1.1)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
Expand All @@ -38,38 +38,38 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.52.1)
rubocop (0.68.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
parser (>= 2.5, != 2.5.1.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
unicode-display_width (>= 1.4.0, < 1.6)
rubocop-migrations (0.1.2)
rubocop (~> 0.41)
rubocop-rspec (1.21.0)
rubocop (>= 0.52.0)
ruby-progressbar (1.9.0)
ruby-progressbar (1.10.0)
safe_yaml (1.0.4)
thread_safe (0.3.6)
tzinfo (1.2.4)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
unicode-display_width (1.5.0)

PLATFORMS
ruby

DEPENDENCIES
activesupport
mry (~> 0.52.0)
parser (~> 2.4.0)
parser
pry
rake
rspec
rubocop (~> 0.52.1)
rubocop (~> 0.68.1)
rubocop-migrations
rubocop-rspec
safe_yaml

BUNDLED WITH
1.16.1
1.16.6
11 changes: 11 additions & 0 deletions config/contents/bundler/gem_comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Add a comment describing each gem in your Gemfile.

### Example:
# bad

gem 'foo'

# good

# Helpers for the foo things.
gem 'foo'
2 changes: 1 addition & 1 deletion config/contents/bundler/insecure_protocol_source.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The symbol argument `:gemcutter`, `:rubygems` and `:rubyforge`
The symbol argument `:gemcutter`, `:rubygems`, and `:rubyforge`
are deprecated. So please change your source to URL string that
'https://rubygems.org' if possible, or 'http://rubygems.org' if not.

Expand Down
2 changes: 1 addition & 1 deletion config/contents/gemspec/duplicated_assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ in a gemspec.

Assigning to an attribute with the same name using `spec.foo =` will be
an unintended usage. On the other hand, duplication of methods such
as `spec.requirements`, `spec.add_runtime_dependency` and others are
as `spec.requirements`, `spec.add_runtime_dependency`, and others are
permitted because it is the intended use of appending values.

### Example:
Expand Down
5 changes: 3 additions & 2 deletions config/contents/layout/access_modifier_indentation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Modifiers should be indented as deep as method definitions, or as deep
as the class/module keyword, depending on configuration.
Bare access modifiers (those not applying to specific methods) should be
indented as deep as method definitions, or as deep as the class/module
keyword, depending on configuration.

### Example: EnforcedStyle: indent (default)
# bad
Expand Down
34 changes: 34 additions & 0 deletions config/contents/layout/align_arguments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Here we check if the arguments on a multi-line method
definition are aligned.

### Example: EnforcedStyle: with_first_argument (default)
# good

foo :bar,
:baz

foo(
:bar,
:baz
)

# bad

foo :bar,
:baz

foo(
:bar,
:baz
)

### Example: EnforcedStyle: with_fixed_indentation
# good

foo :bar,
:baz

# bad

foo :bar,
:baz
153 changes: 114 additions & 39 deletions config/contents/layout/align_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Check that the keys, separators, and values of a multi-line hash
literal are aligned according to configuration. The configuration
options are:

- key (left align keys)
- key (left align keys, one space before hash rockets and values)
- separator (align hash rockets and colons, right align keys)
- table (left align keys, hash rockets, and values)

Expand All @@ -14,81 +14,156 @@ can also be configured. The options are:
- ignore_implicit (without curly braces)
- ignore_explicit (with curly braces)

### Example:

# EnforcedHashRocketStyle: key (default)
# EnforcedColonStyle: key (default)

# good
### Example: EnforcedHashRocketStyle: key (default)
# bad
{
foo: bar,
ba: baz
:foo => bar,
:ba => baz
}
{
:foo => bar,
:ba => baz
}

# good
{
:foo => bar,
:ba => baz
}

### Example: EnforcedHashRocketStyle: separator
# bad
{
foo: bar,
ba: baz
:foo => bar,
:ba => baz
}
{
:foo => bar,
:ba => baz
:ba => baz
}

### Example:

# EnforcedHashRocketStyle: separator
# EnforcedColonStyle: separator

#good
{
foo: bar,
ba: baz
}
# good
{
:foo => bar,
:ba => baz
}

#bad
{
foo: bar,
ba: baz
}
### Example: EnforcedHashRocketStyle: table
# bad
{
:foo => bar,
:ba => baz
:ba => baz
}

# good
{
:foo => bar,
:ba => baz
}

### Example:
### Example: EnforcedColonStyle: key (default)
# bad
{
foo: bar,
ba: baz
}
{
foo: bar,
ba: baz
}

# EnforcedHashRocketStyle: table
# EnforcedColonStyle: table
# good
{
foo: bar,
ba: baz
}

#good
### Example: EnforcedColonStyle: separator
# bad
{
foo: bar,
ba: baz
ba: baz
}

# good
{
:foo => bar,
:ba => baz
foo: bar,
ba: baz
}

#bad
### Example: EnforcedColonStyle: table
# bad
{
foo: bar,
ba: baz
}

# good
{
:foo => bar,
:ba => baz
}
foo: bar,
ba: baz
}

### Example: EnforcedLastArgumentHashStyle: always_inspect (default)
# Inspect both implicit and explicit hashes.

# bad
do_something(foo: 1,
bar: 2)

# bad
do_something({foo: 1,
bar: 2})

# good
do_something(foo: 1,
bar: 2)

# good
do_something(
foo: 1,
bar: 2
)

# good
do_something({foo: 1,
bar: 2})

# good
do_something({
foo: 1,
bar: 2
})

### Example: EnforcedLastArgumentHashStyle: always_ignore
# Ignore both implicit and explicit hashes.

# good
do_something(foo: 1,
bar: 2)

# good
do_something({foo: 1,
bar: 2})

### Example: EnforcedLastArgumentHashStyle: ignore_implicit
# Ignore only implicit hashes.

# bad
do_something({foo: 1,
bar: 2})

# good
do_something(foo: 1,
bar: 2)

### Example: EnforcedLastArgumentHashStyle: ignore_explicit
# Ignore only explicit hashes.

# bad
do_something(foo: 1,
bar: 2)

# good
do_something({foo: 1,
bar: 2})
Loading