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.

Setting a custom path for "ruby.format": "rubocop" #413

@ndbroadbent

Description

@ndbroadbent

It looks like the rubocop for formatOnSave doesn't use the path from:

  "ruby.lint": {
    "rubocop": {
      "path": "/usr/local/bin"
    }
  },

(But the lint step does use /usr/local/bin/rubocop.)

How can I configure the path for "ruby.format": "rubocop"?

I've been working on this PR for rubocop-daemon, and have been trying to get my wrapper script to work with VS Code. The script starts a RuboCop server process as a daemon, and then sends commands via netcat. It's about 20x faster than running the plain rubocop command (150ms vs 4s), so I would really love to get this working!

My workaround for now is to just override the rubocop binary with a symlink to my wrapper script:

ln -fs /usr/local/bin/rubocop-daemon-wrapper /Users/ndbroadbent/.rvm/gems/ruby-2.5.3/bin/rubocop

But this is very brittle, and will probably break a lot in the future.

Also it would be great if I could rename the binary. Something like: "ruby.rubocop.binary": " /usr/local/bin/rubocop-daemon-wrapper"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions