-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Implement shared RuboCop configuration (#1587)
Mostly all gems and folders contains the same `.rubocop.yml` config file. It requires mostly to touch and verify 36 files for changes. Extract common cops and settings of rubocop to `contrib/rubocop.yml` and update all other to use it. Most common Cops put in the file and remove duplications. In an effort to streamline maintenance, a common configuration file, `contrib/rubocop.yml`, has been introduced. The majority of gems and folders previously relied on individual `.rubocop.yml` files, leading to redundancy. This change involves consolidating common Cops and settings in `contrib/rubocop.yml`, thereby reducing the need for modifications across 36 files. This modification enhances consistency and eliminates duplications in the RuboCop configurations. Signed-off-by: Michael Nikitochkin <michael.nikitochkin@gmx.net> Co-authored-by: Matthew Wear <matthew.wear@gmail.com>
- Loading branch information
Showing
34 changed files
with
85 additions
and
339 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,7 @@ | ||
AllCops: | ||
TargetRubyVersion: "3.0" | ||
inherit_from: ../contrib/rubocop.yml | ||
|
||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Max: 20 | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
Naming/FileName: | ||
Exclude: | ||
- "lib/opentelemetry-api.rb" | ||
Lint/MissingSuper: | ||
Enabled: false | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- "test/**/*" | ||
Style/StringConcatenation: | ||
Exclude: | ||
- "test/**/*" | ||
Style/ModuleFunction: | ||
Enabled: false | ||
Style/ExplicitBlockArgument: | ||
Enabled: 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
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,32 @@ | ||
AllCops: | ||
NewCops: disable | ||
SuggestExtensions: false | ||
TargetRubyVersion: "3.0" | ||
Exclude: | ||
- "vendor/**/*" | ||
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- "test/**/*" | ||
Lint/MissingSuper: | ||
Enabled: false | ||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Max: 21 | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
|
||
Style/ModuleFunction: | ||
Enabled: false | ||
Style/NumericPredicate: | ||
Enabled: false | ||
Style/StringConcatenation: | ||
Exclude: | ||
- "test/**/*" |
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 |
---|---|---|
@@ -1,25 +1,17 @@ | ||
inherit_from: ../../contrib/rubocop.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: "3.0" | ||
Exclude: | ||
- "lib/opentelemetry/proto/**/*" | ||
- "vendor/**/*" | ||
|
||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
|
||
Naming/FileName: | ||
Exclude: | ||
- "lib/opentelemetry-exporter-otlp-common.rb" | ||
Style/ModuleFunction: | ||
Enabled: 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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
inherit_from: ../.rubocop.yml | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: 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 |
---|---|---|
@@ -1,18 +1,5 @@ | ||
AllCops: | ||
TargetRubyVersion: "3.0" | ||
inherit_from: ../../contrib/rubocop.yml | ||
|
||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Max: 21 | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
Naming/FileName: | ||
Exclude: | ||
- "lib/opentelemetry-exporter-otlp-grpc.rb" | ||
Style/ModuleFunction: | ||
Enabled: 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
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 |
---|---|---|
@@ -1,25 +1,14 @@ | ||
inherit_from: ../../contrib/rubocop.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: "3.0" | ||
Exclude: | ||
- "lib/opentelemetry/proto/**/*" | ||
- "vendor/**/*" | ||
|
||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Max: 21 | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
Naming/FileName: | ||
Exclude: | ||
- "lib/opentelemetry-exporter-otlp-http.rb" | ||
Style/ModuleFunction: | ||
Enabled: 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
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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
inherit_from: ../.rubocop.yml | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: 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 |
---|---|---|
@@ -1,24 +1,12 @@ | ||
# inherit_from: .rubocop_todo.yml | ||
inherit_from: ../contrib/rubocop.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: '3.0' | ||
|
||
Lint/UnusedMethodArgument: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Max: 50 | ||
Metrics/PerceivedComplexity: | ||
Max: 30 | ||
Metrics/CyclomaticComplexity: | ||
Max: 20 | ||
Metrics/ParameterLists: | ||
Enabled: false | ||
|
||
Naming/FileName: | ||
Exclude: | ||
- "lib/opentelemetry-logs-api.rb" | ||
Style/ModuleFunction: | ||
Enabled: 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
inherit_from: ../.rubocop.yml | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Enabled: false |
Oops, something went wrong.