Golang errcheck: Difference between revisions

From wikinotes
No edit summary
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
</blockquote><!-- Install -->
</blockquote><!-- Install -->


= Notes =
= Tips/Tricks =
<blockquote>
<blockquote>
[[VimPlugin:: vim-go]] has a pretty nice setup for ErrCheck, it might be nice to take inspiration from that.
== Vim Quickfix ==
 
<blockquote>
https://github.com/fatih/vim-go/blob/master/autoload/go/lint.vim#L296-L375
<syntaxhighlight lang="vim">
</blockquote><!-- Notes -->
:call setqflist([], ' ', {'lines': systemlist('errcheck .')}) | copen  | wincmd w | wincmd J  " show errors in quickfix
</syntaxhighlight>
</blockquote><!-- Vim Quickfix -->
</blockquote><!-- Tips/Tricks -->

Latest revision as of 19:42, 26 June 2022

Checks for ignored errors within your application.

Documentation

github https://github.com/kisielk/errcheck

Install

go install github.com/kisielk/errcheck@latest

Tips/Tricks

Vim Quickfix

:call setqflist([], ' ', {'lines': systemlist('errcheck .')}) | copen  | wincmd w | wincmd J  " show errors in quickfix