-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parts of the repository contains Ruby code. Let's add RuboCop to it to ensure we follow a common code style. I let RuboCop fix most of the issues, but things like line length had to be fixed manually. I modernized the Ruby gem's RuboCop config (as it's locked on an older version of RuboCop) and made it consistent with the RuboCop config in the diagnose tests repo. appsignal/diagnose_tests#6
- Loading branch information
Showing
17 changed files
with
184 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,4 @@ build/ | |
packages/nodejs-ext/ext/*.tar.gz | ||
|
||
packages/*/test/spec/examples.txt | ||
tmp |
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,72 @@ | ||
AllCops: | ||
DisplayCopNames: true | ||
UseCache: true | ||
CacheRootDirectory: ./tmp | ||
NewCops: enable | ||
Exclude: | ||
- "node_modules/**/*" | ||
- "test/integration/diagnose/**/*" | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StringLiteralsInInterpolation: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
|
||
Layout/HashAlignment: | ||
EnforcedLastArgumentHashStyle: ignore_implicit | ||
|
||
Layout/ArgumentAlignment: | ||
EnforcedStyle: with_fixed_indentation | ||
|
||
Layout/ParameterAlignment: | ||
EnforcedStyle: with_fixed_indentation | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
|
||
Layout/MultilineOperationIndentation: | ||
EnforcedStyle: indented | ||
|
||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/LineEndStringConcatenationIndentation: | ||
EnforcedStyle: indented | ||
|
||
Layout/EmptyLineBetweenDefs: | ||
AllowAdjacentOneLineDefs: true | ||
|
||
Layout/LineLength: | ||
Max: 100 | ||
|
||
Style/Lambda: | ||
EnforcedStyle: lambda | ||
|
||
Style/WordArray: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: true | ||
|
||
Style/SymbolArray: | ||
EnforcedStyle: brackets | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- Rakefile | ||
- "**/spec/*.rb" | ||
|
||
Metrics/MethodLength: | ||
Max: 25 | ||
Exclude: | ||
- Rakefile |
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,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop" |
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 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.2) | ||
parallel (1.20.1) | ||
parser (3.0.2.0) | ||
ast (~> 2.4.1) | ||
rainbow (3.0.0) | ||
regexp_parser (2.1.1) | ||
rexml (3.2.5) | ||
rubocop (1.18.4) | ||
parallel (~> 1.10) | ||
parser (>= 3.0.0.0) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.8, < 3.0) | ||
rexml | ||
rubocop-ast (>= 1.8.0, < 2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 3.0) | ||
rubocop-ast (1.9.1) | ||
parser (>= 3.0.1.1) | ||
ruby-progressbar (1.11.0) | ||
unicode-display_width (2.0.0) | ||
|
||
PLATFORMS | ||
x86_64-darwin-20 | ||
|
||
DEPENDENCIES | ||
rubocop | ||
|
||
BUNDLED WITH | ||
2.2.17 |
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rspec" |
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rspec" |
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rspec" |
Oops, something went wrong.