valorcheck

command module
v0.0.0-...-86455b2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 2 Imported by: 0

README

valorcheck

Linter to check that access to an optional value is guarded against the case where the value is not present.

VS Code

Installation

go install github.com/phelmkamp/valor/valorcheck@latest

Usage

valorcheck [-flag] [package]

Flags:
  -V    print version and exit
  -c int
        display offending line with this many lines of context (default -1)
  -cpuprofile string
        write CPU profile to this file
  -debug string
        debug flags, any subset of "fpstv"
  -fix
        apply all suggested fixes
  -flags
        print analyzer flags in JSON
  -json
        emit JSON output
  -memprofile string
        write memory profile to this file
  -trace string
        write trace log to this file

Output

/home/phelmkamp/documents/valor/valorcheck/testdata/main.go:15:2: call to MustOk not guarded by IsOk might panic
/home/phelmkamp/documents/valor/valorcheck/testdata/main.go:16:7: call to MustOk not guarded by IsOk might panic
/home/phelmkamp/documents/valor/valorcheck/testdata/main.go:17:2: result of Ok is not checked

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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