alecthomas / SublimeLinter-contrib-gometalinter

SublimeLinter plugin for gometalinter
MIT License
47 stars 13 forks source link

Modify location for the temporary files to reduce motion #21

Closed cixtor closed 6 years ago

cixtor commented 6 years ago

When a file is being modified in a directory with multiple Go files, the linter decides to create a temporary directory and symlink at least 50 files before the execution of the "gometalinter" tool. Currently, this directory is being created in the same location as the directory that is being modified. The fast create+delete operation creates unnecessary motion in the sidebar of the code editor.

gometalinter

This merge request fixes this by setting the directory for the temporary files to TMPDIR.

alecthomas commented 6 years ago

This is deliberate. You can see the commit and rationale here: 7b73266be9bf68eacc7c873bd4f237b9fa1e47e2.

Without it, the linters can't access vendored or internal packages and often fail.

alecthomas commented 6 years ago

It's certainly not ideal, I agree, but I don't know of a better solution. I add .gometalinter-* to my ignore patterns in my editor.