Skip to content

Commit

Permalink
[rubocop#3246] add list of all cops with documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sihu committed Oct 17, 2016
1 parent 8758836 commit bcb1522
Show file tree
Hide file tree
Showing 16 changed files with 8,018 additions and 39 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change log

## master (unreleased)
* [#3246](https://github.com/bbatsov/rubocop/issues/3246): Add list of all cops to Documentation. ([@sihu][])


### New features

Expand Down Expand Up @@ -2441,3 +2443,4 @@
[@legendetm]: https://github.com/legendetm
[@bronson]: https://github.com/bronson
[@albus522]: https://github.com/albus522
[@sihu]: https://github.com/sihu
3 changes: 1 addition & 2 deletions lib/rubocop/cop/lint/shadowed_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module Lint
# less specific exception being rescued before a more specific
# exception is rescued.
#
# @example
#
# @example
# # bad
# begin
# something
Expand Down
16 changes: 10 additions & 6 deletions lib/rubocop/cop/style/empty_else.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Style
#
# @example
# # good for all styles
#
# if condition
# statement
# else
Expand All @@ -21,8 +22,9 @@ module Style
# statement
# end
#
# empty - warn only on empty else
# @example
# @example
# # empty - warn only on empty else
#
# # bad
# if condition
# statement
Expand All @@ -36,8 +38,9 @@ module Style
# nil
# end
#
# nil - warn on else with nil in it
# @example
# @example
# # nil - warn on else with nil in it
#
# # bad
# if condition
# statement
Expand All @@ -51,8 +54,9 @@ module Style
# else
# end
#
# both - warn on empty else and else with nil in it
# @example
# @example
# # both - warn on empty else and else with nil in it
#
# # bad
# if condition
# statement
Expand Down
9 changes: 5 additions & 4 deletions lib/rubocop/cop/style/space_inside_array_percent_literal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ module Style
# Checks for unnecessary additional spaces inside array percent literals
# (i.e. %i/%w).
#
# @good
# %i(foo bar baz)
# @example
# @good
# %i(foo bar baz)
#
# @bad
# %w(foo bar baz)
# @bad
# %w(foo bar baz)
class SpaceInsideArrayPercentLiteral < Cop
include MatchRange
include PercentLiteral
Expand Down
13 changes: 7 additions & 6 deletions lib/rubocop/cop/style/space_inside_percent_literal_delimiters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ module Style
# Checks for unnecessary additional spaces inside the delimiters of
# %i/%w/%x literals.
#
# @good
# %i(foo bar baz)
# @example
# @good
# %i(foo bar baz)
#
# @bad
# %w( foo bar baz )
# @bad
# %w( foo bar baz )
#
# @bad
# %x( ls -l )
# @bad
# %x( ls -l )
class SpaceInsidePercentLiteralDelimiters < Cop
include MatchRange
include PercentLiteral
Expand Down
317 changes: 317 additions & 0 deletions manual/cops.md

Large diffs are not rendered by default.

Loading

0 comments on commit bcb1522

Please sign in to comment.