-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- General bundle update. - Update the docs too.
- Loading branch information
1 parent
b4bce16
commit 4b10722
Showing
6 changed files
with
120 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
Ensures magic comments are written consistently throughout your code base. | ||
Looks for discrepancies in separators (`-` vs `_`) and capitalization for | ||
both magic comment directives and values. | ||
|
||
Required capitalization can be set with the `DirectiveCapitalization` and | ||
`ValueCapitalization` configuration keys. | ||
|
||
NOTE: If one of these configuration is set to nil, any capitalization is allowed. | ||
|
||
### Example: EnforcedStyle: snake_case (default) | ||
# The `snake_case` style will enforce that the frozen string literal | ||
# comment is written in snake case. (Words separated by underscores) | ||
# bad | ||
# frozen-string-literal: true | ||
|
||
module Bar | ||
# ... | ||
end | ||
|
||
# good | ||
# frozen_string_literal: false | ||
|
||
module Bar | ||
# ... | ||
end | ||
|
||
### Example: EnforcedStyle: kebab_case | ||
# The `kebab_case` style will enforce that the frozen string literal | ||
# comment is written in kebab case. (Words separated by hyphens) | ||
# bad | ||
# frozen_string_literal: true | ||
|
||
module Baz | ||
# ... | ||
end | ||
|
||
# good | ||
# frozen-string-literal: true | ||
|
||
module Baz | ||
# ... | ||
end | ||
|
||
### Example: DirectiveCapitalization: lowercase (default) | ||
# bad | ||
# FROZEN-STRING-LITERAL: true | ||
|
||
# good | ||
# frozen-string-literal: true | ||
|
||
### Example: DirectiveCapitalization: uppercase | ||
# bad | ||
# frozen-string-literal: true | ||
|
||
# good | ||
# FROZEN-STRING-LITERAL: true | ||
|
||
### Example: DirectiveCapitalization: nil | ||
# any capitalization is accepted | ||
|
||
# good | ||
# frozen-string-literal: true | ||
|
||
# good | ||
# FROZEN-STRING-LITERAL: true | ||
|
||
### Example: ValueCapitalization: nil (default) | ||
# any capitalization is accepted | ||
|
||
# good | ||
# frozen-string-literal: true | ||
|
||
# good | ||
# frozen-string-literal: TRUE | ||
|
||
### Example: ValueCapitalization: lowercase | ||
# when a value is not given, any capitalization is accepted | ||
|
||
# bad | ||
# frozen-string-literal: TRUE | ||
|
||
# good | ||
# frozen-string-literal: TRUE | ||
|
||
### Example: ValueCapitalization: uppercase | ||
# bad | ||
# frozen-string-literal: true | ||
|
||
# good | ||
# frozen-string-literal: TRUE |