You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Existing Gemfiles should be taken into account when running linters (and maybe something else?).
Actual behavior
Existing Gemfiles are ignored when running linters. This does not just makes for distracting warnings when a project lags behind the latest bundler installed but altogether disables them since some newer versions can outright bail out when they don't know anymore about some deprecated config file structure. Being able to handle multiple Gemfile (possibly in nested directories) is important for monorepos and vendoring.
Steps to reproduce the problem
mkdir -p repro/{foo,bar}
cd repro
cat > foo/foo.rb <<'EOF'if 42 == answer # there should not be a linter warning above # but a Style/YodaCondition is raisedendEOF
cat > bar/bar.rb <<'EOF'if 42 == answer # there should be a Style/YodaCondition linter warning aboveendEOF
cat > foo/Gemfile <<'EOF'source 'https://rubygems.org'gem 'rubocop', '~> 0.46.0'EOF
cat > bar/Gemfile <<'EOF'source 'https://rubygems.org'gem 'rubocop', '~> 0.49.0'EOF
(cd foo; bundle install)
(cd bar; bundle install)
code .# now look at foo.rb and bar.rb# nested variants include foo being inside bar as well as bar being inside foo