Skip to content

Commit 22796cb

Browse files
Consolidate rubocop in root of repo (#84)
* consolidate the cops * bump to 1.3.0 * remove test rubocop files * update rubocop * rubocop . -a * update tests * commit more fixes * more cop appeasing * don't care about ordered gems * try to ignore vendor bundle * hail mary * doh * fix namespacing * remove redundant begins * ignore * remove templates from instrumentation generator * Revert "remove templates from instrumentation generator" This reverts commit 9ba82e0. * update rubocop.yml template; don't add rubocop file to test/ * prefer inline rubocop:disable to root .rubocop.yml file * ignore ascii comment violation Co-authored-by: Ariel Valentin <[email protected]>
1 parent e27d6b2 commit 22796cb

File tree

191 files changed

+308
-720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+308
-720
lines changed

.instrumentation_generator/instrumentation_generator.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def lib_files
3535
end
3636

3737
def test_files
38-
template('templates/test/.rubocop.yml', "#{instrumentation_path}/test/.rubocop.yml")
3938
template('templates/test/test_helper.rb', "#{instrumentation_path}/test/test_helper.rb")
4039
template('templates/test/instrumentation.rb', "#{instrumentation_path}/test/opentelemetry/#{instrumentation_path}/instrumentation_test.rb")
4140
end

.instrumentation_generator/templates/gemspec.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
3434
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
3535
spec.add_development_dependency 'opentelemetry-test-helpers'
3636
spec.add_development_dependency 'rake', '~> 12.3.3'
37-
spec.add_development_dependency 'rubocop', '~> 0.73.0'
37+
spec.add_development_dependency 'rubocop', '~> 1.3.0'
3838
spec.add_development_dependency 'simplecov', '~> 0.17.1'
3939
spec.add_development_dependency 'webmock', '~> 3.7.6'
4040
spec.add_development_dependency 'yard', '~> 0.9'
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
inherit_from: ../.rubocop-examples.yml
2-
3-
Naming/FileName:
4-
Exclude:
5-
- "lib/opentelemetry-instrumentation-<%= instrumentation_name %>.rb"
1+
inherit_from: ../../.rubocop.yml

.instrumentation_generator/templates/test/.rubocop.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.rubocop.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
AllCops:
2+
TargetRubyVersion: '2.7.6'
3+
Exclude:
4+
- Rakefile
5+
- "rakelib/**/*"
6+
- "**/example/*"
7+
- "bin/instrumentation_generator"
8+
- "**/**/vendor/bundle/**/*"
9+
Bundler/OrderedGems:
10+
Enabled: false
11+
Gemspec/RequiredRubyVersion:
12+
Enabled: false
13+
Metrics/AbcSize:
14+
Enabled: false
15+
Metrics/BlockLength:
16+
Enabled: false
17+
Metrics/MethodLength:
18+
Max: 20
19+
Lint/ConstantDefinitionInBlock:
20+
Exclude:
21+
- "**/*test.rb"
22+
Lint/UnusedMethodArgument:
23+
Enabled: false
24+
Naming/FileName:
25+
Exclude:
26+
- '**/opentelemetry-*'
27+
Metrics/LineLength:
28+
Enabled: false
29+
Metrics/ParameterLists:
30+
Enabled: false
31+
Style/Documentation:
32+
Exclude:
33+
- "**/test/**/*"
34+
- "**/*test*"
35+
Style/FrozenStringLiteralComment:
36+
Exclude:
37+
- "**/gemfiles/*"
38+
Style/ModuleFunction:
39+
Enabled: false
40+
Style/MultilineIfModifier:
41+
Exclude:
42+
- "**/test/**/*"
43+
Style/RedundantRegexpEscape:
44+
Enabled: false
45+
Style/StringLiterals:
46+
Exclude:
47+
- "**/gemfiles/*"
48+
Style/SlicingWithRange:
49+
Enabled: false
50+
Style/CaseLikeIf:
51+
Enabled: false
52+
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
inherit_from: ../.rubocop-examples.yml
2-
3-
Naming/FileName:
4-
Exclude:
5-
- "lib/opentelemetry-instrumentation-action_pack.rb"
1+
inherit_from: ../../.rubocop.yml

instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
3636
spec.add_development_dependency 'opentelemetry-test-helpers'
3737
spec.add_development_dependency 'rails'
3838
spec.add_development_dependency 'rake', '~> 12.3.3'
39-
spec.add_development_dependency 'rubocop', '~> 0.73.0'
39+
spec.add_development_dependency 'rubocop', '~> 1.3.0'
4040
spec.add_development_dependency 'simplecov', '~> 0.17.1'
4141
spec.add_development_dependency 'webmock', '~> 3.7.6'
4242
spec.add_development_dependency 'yard', '~> 0.9'

instrumentation/action_pack/test/.rubocop.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

instrumentation/action_pack/test/test_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
require 'minitest/autorun'
1414
require 'rack/test'
1515

16-
require 'test_helpers/app_config.rb'
16+
require 'test_helpers/app_config'
1717
require_relative '../lib/opentelemetry/instrumentation'
1818

1919
# Global opentelemetry-sdk setup
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
inherit_from: ../.rubocop-examples.yml
2-
3-
Naming/FileName:
4-
Exclude:
5-
- "lib/opentelemetry-instrumentation-action_view.rb"
1+
inherit_from: ../../.rubocop.yml

0 commit comments

Comments
 (0)