dependabot / dependabot/dependabot-core

Ability to skip parsing a statement, particularly an eval_gemfile

Open
#2,098 16 comments 2 reactions 0 assignees View on GitHub
F: language-support L: ruby:bundler T: feature-request
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
149

Description

We have this our Gemfile in order to let devs add debugging gems (for very complicated reasons we cannot just agree to set a debugging gems and include the globally into a group):

```
# If you want to load debugging tools into the bundle exec sandbox,
# add these additional dependencies into Gemfile.local
eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local")
```

I got rid of the old string interpolation that was present there, but dependabot still complains now that it can't find Gemfile.local.

What I'd like to be able to do is just tell dependabot to completely ignore that line:

```
# If you want to load debugging tools into the bundle exec sandbox,
# add these additional dependencies into Gemfile.local
eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local") # dependabot:ignore
```

We have some other context dependent lines in our Gemfiles that might need to be skipped as well (and it might be useful to be able to skip entire blocks of code with something like `# dependabot:ignore:start` and `# dependabot:ignore:end` or something like that.

Contributor guide

Open the contributing guide

Research direction

Start by locating Dependabot's Ruby Gemfile parsing entry point and the tests covering eval_gemfile or missing Gemfile.local handling. The issue describes line-level and block-level ignore directives; done means context-dependent statements can be skipped without Dependabot reporting the optional file as missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.