Skip to content

Commit

Permalink
[rubocop#3246] Enhance cops documentation with navigation and better …
Browse files Browse the repository at this point in the history
…layout
  • Loading branch information
sihu committed Oct 17, 2016
1 parent d516771 commit 0a0035c
Show file tree
Hide file tree
Showing 11 changed files with 912 additions and 892 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The more detailed you are, the better.**

Before submitting the PR make sure the following are checked:

* [ ] Documentation updated with `rake generate_cops_documentation`
* [ ] Wrote [good commit messages][1].
* [ ] Commit message starts with `[Fix #issue-number]` (if the related issue exists).
* [ ] Used the same coding conventions as the rest of the project.
Expand Down
600 changes: 302 additions & 298 deletions manual/cops.md

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions manual/cops_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ if/while/until.

### Important attributes

Attribute | Value |
--- | --- |
AllowSafeAssignment | true| |
Attribute | Value
--- | ---
AllowSafeAssignment | true


## Lint/BlockAlignment
Expand Down Expand Up @@ -103,10 +103,10 @@ end

### Important attributes

Attribute | Value |
--- | --- |
AlignWith | either| |
SupportedStyles | either, start_of_block, start_of_line| |
Attribute | Value
--- | ---
AlignWith | either
SupportedStyles | either, start_of_block, start_of_line


## Lint/CircularArgumentReference
Expand Down Expand Up @@ -199,11 +199,11 @@ end

### Important attributes

Attribute | Value |
--- | --- |
AlignWith | start_of_line| |
SupportedStyles | start_of_line, def| |
AutoCorrect | false| |
Attribute | Value
--- | ---
AlignWith | start_of_line
SupportedStyles | start_of_line, def
AutoCorrect | false


## Lint/DeprecatedClassMethods
Expand Down Expand Up @@ -351,11 +351,11 @@ end)

### Important attributes

Attribute | Value |
--- | --- |
AlignWith | keyword| |
SupportedStyles | keyword, variable, start_of_line| |
AutoCorrect | false| |
Attribute | Value
--- | ---
AlignWith | keyword
SupportedStyles | keyword, variable, start_of_line
AutoCorrect | false


## Lint/EndInMethod
Expand Down Expand Up @@ -528,10 +528,10 @@ class C < StandardError; end

### Important attributes

Attribute | Value |
--- | --- |
EnforcedStyle | runtime_error| |
SupportedStyles | runtime_error, standard_error| |
Attribute | Value
--- | ---
EnforcedStyle | runtime_error
SupportedStyles | runtime_error, standard_error


## Lint/InvalidCharacterLiteral
Expand Down Expand Up @@ -984,10 +984,10 @@ end

### Important attributes

Attribute | Value |
--- | --- |
IgnoreEmptyBlocks | true| |
AllowUnusedKeywordArguments | false| |
Attribute | Value
--- | ---
IgnoreEmptyBlocks | true
AllowUnusedKeywordArguments | false


## Lint/UnusedMethodArgument
Expand All @@ -1008,10 +1008,10 @@ end

### Important attributes

Attribute | Value |
--- | --- |
AllowUnusedKeywordArguments | false| |
IgnoreEmptyMethods | true| |
Attribute | Value
--- | ---
AllowUnusedKeywordArguments | false
IgnoreEmptyMethods | true


## Lint/UselessAccessModifier
Expand Down Expand Up @@ -1099,9 +1099,9 @@ end

### Important attributes

Attribute | Value |
--- | --- |
ContextCreatingMethods | | |
Attribute | Value
--- | ---
ContextCreatingMethods |


## Lint/UselessAssignment
Expand Down
82 changes: 41 additions & 41 deletions manual/cops_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ configured maximum. The ABC size is based on assignments, branches

### Important attributes

Attribute | Value |
--- | --- |
Reference | http://c2.com/cgi/wiki?AbcMetric| |
Max | 19| |
Attribute | Value
--- | ---
Reference | http://c2.com/cgi/wiki?AbcMetric
Max | 19


## Metrics/BlockLength
Expand All @@ -30,11 +30,11 @@ The maximum allowed length is configurable.

### Important attributes

Attribute | Value |
--- | --- |
CountComments | false| |
Max | 25| |
Exclude | /Rakefile, /**/*.rake, /spec/**/*.rb| |
Attribute | Value
--- | ---
CountComments | false
Max | 25
Exclude | Rakefile, \*\*/\*.rake, spec/\*\*/\*.rb


## Metrics/BlockNesting
Expand All @@ -51,9 +51,9 @@ The maximum level of nesting allowed is configurable.

### Important attributes

Attribute | Value |
--- | --- |
Max | 3| |
Attribute | Value
--- | ---
Max | 3


## Metrics/ClassLength
Expand All @@ -68,10 +68,10 @@ The maximum allowed length is configurable.

### Important attributes

Attribute | Value |
--- | --- |
CountComments | false| |
Max | 168| |
Attribute | Value
--- | ---
CountComments | false
Max | 168


## Metrics/CyclomaticComplexity
Expand All @@ -93,9 +93,9 @@ Loops can be said to have an exit condition, so they add one.

### Important attributes

Attribute | Value |
--- | --- |
Max | 7| |
Attribute | Value
--- | ---
Max | 7


## Metrics/LineLength
Expand All @@ -109,13 +109,13 @@ The maximum length is configurable.

### Important attributes

Attribute | Value |
--- | --- |
Max | 80| |
AllowHeredoc | true| |
AllowURI | true| |
URISchemes | http, https| |
IgnoreCopDirectives | false| |
Attribute | Value
--- | ---
Max | 80
AllowHeredoc | true
AllowURI | true
URISchemes | http, https
IgnoreCopDirectives | false


## Metrics/MethodLength
Expand All @@ -130,10 +130,10 @@ The maximum allowed length is configurable.

### Important attributes

Attribute | Value |
--- | --- |
CountComments | false| |
Max | 14| |
Attribute | Value
--- | ---
CountComments | false
Max | 14


## Metrics/ModuleLength
Expand All @@ -148,10 +148,10 @@ The maximum allowed length is configurable.

### Important attributes

Attribute | Value |
--- | --- |
CountComments | false| |
Max | 156| |
Attribute | Value
--- | ---
CountComments | false
Max | 156


## Metrics/ParameterLists
Expand All @@ -167,10 +167,10 @@ be excluded from the total count.

### Important attributes

Attribute | Value |
--- | --- |
Max | 5| |
CountKeywordArgs | true| |
Attribute | Value
--- | ---
Max | 5
CountKeywordArgs | true


## Metrics/PerceivedComplexity
Expand Down Expand Up @@ -207,7 +207,7 @@ end # 7 complexity points

### Important attributes

Attribute | Value |
--- | --- |
Max | 7| |
Attribute | Value
--- | ---
Max | 7

Loading

0 comments on commit 0a0035c

Please sign in to comment.