Skip to content

Commit f4fa3c4

Browse files
committed
🚨 Linting
- caveat, linting will fail on autocorrect - See: skryukov/rubocop-gradual#24 (comment)
1 parent 73e6e3c commit f4fa3c4

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.rubocop_gradual.lock

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"bin/bundle:4028066867": [
3-
[64, 5, 20, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2485198147]
2+
"bin/bundle:3870166066": [
3+
[33, 24, 58, "Performance/ConstantRegexp: Extract this regexp into a constant, memoize it, or append an `/o` option to its options.", 2287896868],
4+
[59, 40, 62, "Performance/ConstantRegexp: Extract this regexp into a constant, memoize it, or append an `/o` option to its options.", 2593609308],
5+
[64, 5, 20, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2485198147],
6+
[86, 7, 34, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 991972134],
7+
[93, 5, 194, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1374511802],
8+
[94, 5, 7, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 285434243]
49
]
510
}

bin/bundle

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ m = Module.new do
3030
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
3131
bundler_version = a
3232
end
33-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
33+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
3434
bundler_version = $1
3535
update_index = i
3636
end
@@ -56,7 +56,7 @@ m = Module.new do
5656
def lockfile_version
5757
return unless File.file?(lockfile)
5858
lockfile_contents = File.read(lockfile)
59-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
59+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
6060
Regexp.last_match(1)
6161
end
6262

@@ -83,15 +83,15 @@ m = Module.new do
8383

8484
def activate_bundler
8585
gem_error = activation_error_handling do
86-
gem("bundler", bundler_requirement)
86+
gem "bundler", bundler_requirement
8787
end
8888
return if gem_error.nil?
8989
require_error = activation_error_handling do
9090
require "bundler/version"
9191
end
9292
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93-
warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`")
94-
exit(42)
93+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94+
exit 42
9595
end
9696

9797
def activation_error_handling

bin/setup

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
set -vx
5+
6+
bundle install
7+
8+
# Do any other automated setup that you need to do here

0 commit comments

Comments
 (0)