Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

AtomLinter/linter-golinter

Repository files navigation

linter-golinter

Build Status

This plugin for Linter provides an interface to the golint tool. It will be used with files that have the Go syntax.

Prerequisites

  1. Install Go for your system.

  2. Install golint per the instructions at its repo.

Installation

$ apm install linter-golinter

Settings

You can configure linter-golinter inside the Atom settings menu or by editing your ~/.atom/config.cson file (choose Open Your Config in Atom menu):

"linter-golinter":
  "executablePath": "golint" # Path to golint executable.

Tip:

Add your GOPATH binaries directory to your PATH. If you installed Go to the default location, you can use this shell command to add it to your .bashrc file:

printf "\nexport PATH=\$PATH:\$HOME/go/bin\n" >> $HOME/.bashrc

This should prevent needing to set the golint executable path.

If the default path resolution of just golint is not working for you, you can try using the command which golint on UNIX / macOS or where.exe golint on Windows in a terminal / command prompt to print the path to your golint installation. In most cases it should be $GOPATH/bin/golint.