I am writing a custom linter binding for a Ruby-based linter which can be run using either of the following methods:
- Directly: This requires that the user installs the correct version of the tool in their global environment.
- Indirectly: The tool can alternatively be invoked using [[http://bundler.io/v1.3/man/bundle-exec.1.html | bundle exec]] which injects magic values into the environment such that the correct version of the tool (as specified in our Gemfile.lock) is invoked, regardless of whichever version may be installed globally.
We are currently using the direct method for invoking the external linter, but this causes issues whenever we update the linter because we have to ask our users to update their global version. Instead, I'd like to switch to the indirect method of invocation. I thought that I would be able to do this by returning 'bundle exec' from the getDefaultInterpreterMethod, but this doesn't quite work because checkBinaryConfiguration calls Filesystem::binaryExists($interpreter). To allow dependency managers such as Bundler to be used for managing external linters, this diff adds a new configuration property (interpreter.arguments).