golintui

command module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

README

golintui

golintui is a TUI tool that helps you run various kinds of linters with ease and organize its results, with the power of golangci-lint.

Screenshot

Cool features

  • Simple UI
  • Selectable linters on the UI.
  • Sorting out the issues for each linter
  • Able to open files by specifying the issue line

Installation

Binary Releases

For Mac OS or Linux, you can download a binary release here.

With Homebrew

brew install nakabonne/golintui/golintui

With Go

go get github.com/nakabonne/golintui

With Docker

docker run --rm -i -t -v $(pwd):/app -w /app nakabonne/golintui:latest golintui

Usage

Requires: golangci-lint executable.

Be sure to change the CTYPE as shown below if your locale isn't en_US. The UI does not display well without it.

export LC_CTYPE=en_US.UTF-8
Quick Start
golintui

Just press r, then results from the linters should be shown.

Keybinds

Global

  r: run selected linters against the selected directories
  q: quit
  l: next panel
  h: previous panel
  j: move down
  k: move up

Linters Panel

  space: toggle enabled

Note that for users who specify disable-all in the config file for golangci-lint, it is impossible to disable linters that are enabled in it.

Source File Panel

  space: toggle selected
  o: expand directory

Commits Panel

  space: toggle selected

It shows only new issues created after the commit you selected. Internally it just gives it on to --new-from-rev.

Results Panel

  o: open a file with the reported line

Settings

Editor

golintui refers to $EDITOR by default to open the problematic file. You can change the editor to your taste and habits by setting $GOLINTUI_OPEN_COMMAND.

For instance, for users of VSCode:

export GOLINTUI_OPEN_COMMAND="code -r"

Editors that can open by specifying a line

  • vim(vi)
  • emacs
  • VSCode

Please let me know how to open a file at a specific line if the editor you're used to is missing.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
git
gui
str
Package str is a string library to build more Go awesomeness.
Package str is a string library to build more Go awesomeness.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL