forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
rubocop
binstub, simplify configuration (mastodon#30407)
- Loading branch information
1 parent
45abddb
commit 3a191b3
Showing
13 changed files
with
210 additions
and
227 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
require: | ||
- ../lib/linter/rubocop_middle_dot | ||
|
||
Style/MiddleDot: | ||
Enabled: true |
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,6 @@ | ||
--- | ||
Layout/FirstHashElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/LineLength: | ||
Max: 300 # Default of 120 causes a duplicate entry in generated todo file |
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,23 @@ | ||
--- | ||
Metrics/AbcSize: | ||
Exclude: | ||
- lib/mastodon/cli/*.rb | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Metrics/ClassLength: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Exclude: | ||
- lib/mastodon/cli/*.rb | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/ModuleLength: | ||
Enabled: false | ||
|
||
Metrics/ParameterLists: | ||
CountKeywordArgs: false |
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,3 @@ | ||
--- | ||
Naming/BlockForwarding: | ||
EnforcedStyle: explicit |
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,27 @@ | ||
--- | ||
Rails/FilePath: | ||
EnforcedStyle: arguments | ||
|
||
Rails/HttpStatus: | ||
EnforcedStyle: numeric | ||
|
||
Rails/LexicallyScopedActionFilter: | ||
Exclude: | ||
- app/controllers/auth/* # Conflicts with `Lint/UselessMethodDefinition` for inherited controller actions | ||
|
||
Rails/NegateInclude: | ||
Enabled: false | ||
|
||
Rails/RakeEnvironment: | ||
Exclude: # Tasks are doing local work which do not need full env loaded | ||
- lib/tasks/auto_annotate_models.rake | ||
- lib/tasks/emojis.rake | ||
- lib/tasks/mastodon.rake | ||
- lib/tasks/repo.rake | ||
- lib/tasks/statistics.rake | ||
|
||
Rails/SkipsModelValidations: | ||
Enabled: false | ||
|
||
Rails/UnusedIgnoredColumns: | ||
Enabled: false # Preserve ability to migrate from arbitrary old versions |
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,17 @@ | ||
--- | ||
RSpec/ExampleLength: | ||
CountAsOne: ['array', 'heredoc', 'method_call'] | ||
|
||
RSpec/NamedSubject: | ||
EnforcedStyle: named_only | ||
|
||
RSpec/NotToNot: | ||
EnforcedStyle: to_not | ||
|
||
RSpec/SpecFilePathFormat: | ||
CustomTransform: | ||
ActivityPub: activitypub | ||
DeepL: deepl | ||
FetchOEmbedService: fetch_oembed_service | ||
OEmbedController: oembed_controller | ||
OStatus: ostatus |
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,3 @@ | ||
--- | ||
RSpecRails/HttpStatus: | ||
EnforcedStyle: numeric |
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,19 @@ | ||
Lint/Debugger: # Remove any `binding.pry` | ||
Enabled: true | ||
Exclude: [] | ||
|
||
RSpec/Focus: # Require full spec run on CI | ||
Enabled: true | ||
Exclude: [] | ||
|
||
Rails/Output: # Remove any `puts` debugging | ||
Enabled: true | ||
Exclude: [] | ||
|
||
Rails/FindEach: # Using `each` could impact performance, use `find_each` | ||
Enabled: true | ||
Exclude: [] | ||
|
||
Rails/UniqBeforePluck: # Require `uniq.pluck` and not `pluck.uniq` | ||
Enabled: true | ||
Exclude: [] |
Oops, something went wrong.