Skip to content

Instantly share code, notes, and snippets.

@albrow
Last active December 14, 2017 00:12
Show Gist options
  • Select an option

  • Save albrow/3ece4fd923c69c30be05 to your computer and use it in GitHub Desktop.

Select an option

Save albrow/3ece4fd923c69c30be05 to your computer and use it in GitHub Desktop.

Revisions

  1. albrow revised this gist May 6, 2015. 1 changed file with 19 additions and 12 deletions.
    31 changes: 19 additions & 12 deletions GoSublime.sublime-settings
    Original file line number Diff line number Diff line change
    @@ -4,21 +4,28 @@

    // list of commands to run
    "comp_lint_commands": [
    // run errcheck on the package
    {"cmd": ["errcheck"]},
    // run errcheck to catch ignored error return values
    {
    "cmd": ["errcheck"]
    },

    // run go vet on the package
    {"cmd": ["go", "vet"]},
    // run go vet to catch common mistakes which are syntactically correct
    {
    "cmd": ["go", "vet"]
    },

    // run `go install` on the package. GOBIN is set,
    // so `main` packages shouldn't result in the installation of a binary
    {"cmd": ["go", "install"]}
    // run gotype to report compilation errors without actually compiling
    {
    "cmd": ["gotype", "-a", "."]
    }
    ],

    "on_save": [
    // run comp-lint when you save,
    // naturally, you can also bind this command `gs_comp_lint`
    // to a key binding if you want
    {"cmd": "gs_comp_lint"}
    // run comp-lint when you save,
    // naturally, you can also bind this command `gs_comp_lint`
    // to a key binding if you want
    {
    "cmd": "gs_comp_lint"
    }
    ],
    }
    }
  2. albrow created this gist May 5, 2015.
    24 changes: 24 additions & 0 deletions GoSublime.sublime-settings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    {
    // enable comp-lint, this will effectively disable the live linter
    "comp_lint_enabled": true,

    // list of commands to run
    "comp_lint_commands": [
    // run errcheck on the package
    {"cmd": ["errcheck"]},

    // run go vet on the package
    {"cmd": ["go", "vet"]},

    // run `go install` on the package. GOBIN is set,
    // so `main` packages shouldn't result in the installation of a binary
    {"cmd": ["go", "install"]}
    ],

    "on_save": [
    // run comp-lint when you save,
    // naturally, you can also bind this command `gs_comp_lint`
    // to a key binding if you want
    {"cmd": "gs_comp_lint"}
    ],
    }