Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Bundler is not taken into account for linters #188

@lloeki

Description

@lloeki

Your environment

  • vscode-ruby version: 0.13.0
  • Ruby version: 2.3
  • VS Code version: 1.14.2
  • Operating System: macOS 10.13
  • Hardware (optional): rMBP

Expected behavior

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 raised
end
EOF
cat > bar/bar.rb <<'EOF'
if 42 == answer
  # there should be a Style/YodaCondition linter warning above
end
EOF
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestAdds currently unsupported functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions