codequest-eu / SublimeLinter-contrib-reek

SublimeLinter 3 plugin for Ruby, using reek.
MIT License
8 stars 9 forks source link

How to actually set up linter? #6

Open kirylrb opened 6 years ago

kirylrb commented 6 years ago

Please help to setup plugin, documenttion of Sublime Linter is not obvious.

✗ which reek
/Users/codequest_user/.rbenv/shims/reek

Sublime Linter settings:

// SublimeLinter Settings - User
{

"linters": {
        "reek": {
        "@disable": false,
                    "args": ["-c", "~/.rbenv/shims/rbenv"],
                    "ENV": "~/.rbenv/shims/rbenv",
                    "excludes": []
        }

},

    "paths": {
        "osx": [
            "~/.rbenv/shims"
        ]
    }
}

And that's not working. Any help, please?

kirylrb commented 6 years ago

@kruszczynski @guilhermesimoes @mskrajnowski @karwer @thegeorgeous Any help, please?

kruszczynski commented 6 years ago

I haven't used the extension in a while now but it seems like: "args": ["-c", "~/.rbenv/shims/rbenv"], should be more like "args": ["-c", "~/.rbenv/shims/reek"], Let me know if it works!

kirylrb commented 6 years ago

@kruszczynski

SublimeLinter: WARNING: reek output:
Error: We found some problems with your configuration file: [/] 'set -e [ -n "$RBENV_DEBUG" ] && set -x\nprogram="${0##*/}" if [ "$program" = "ruby" ]; then for arg; do case "$arg" in -e* | -- ) break ;; */* ) if [ -f "$arg" ]; then export RBENV_DIR="${arg%/*}" break fi ;; esac done fi\nexport RBENV_ROOT="/Users/kiryl/.rbenv" exec "/usr/local/Cellar/rbenv/1.1.1/libexec/rbenv" exec "$program" "$@"': not a mapping.

Now I got an error with such configuration:

// SublimeLinter Settings - User
{

"linters": {
        "reek": {
        "@disable": false,
                    "args": ["-c", "~/.rbenv/shims/reek"],
                    "ENV": "~/.rbenv/shims",
                    "excludes": []
        }

},

    "paths": {
        "osx": [
            "~/.rbenv/shims"
        ]
    }
}
kirylrb commented 6 years ago

@kruszczynski Could you comment this settings? Something wrong unfortunately

kruszczynski commented 6 years ago

@kirylpl I don't know, sorry, looks to me like an issue with your Ruby installation