splinter

command module
v0.0.0-...-b8baac5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

ZipRecruiter linters for Go

This module is meant to hold analyzer packages that we build at ZipRecruiter. When possible we'd prefer to contribute to other open source analyzers.

pairs

The github.com/ZipRecruiter/splinter/pairs linter will detect broken key/value pairs. A key is defined as a string and a value can be anything.

A missing value is an error:

logger.Log("name", "frew", "job", "engineer", "age" /* missing! */)

A non-string is also an error:

logger.Log("message", "successful!", /* missing key? */ 3)

See pairs documentation for more info.

Example Run
$ splinter -pair-func ".Log=0" \                                            # anonymous interface
           -pair-func go.zr.org/common/go/errors/details.Pairs.AddPairs=0 \ # method
           -pair-func go.zr.org/common/go/errors.Wrap=2 \                   # func
           -assume-pair go.zr.org/common/go/errors/details.Pairs \          # type assumed safe
           ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
package pairs allows detecting broken key/value pairs.
package pairs allows detecting broken key/value pairs.

Jump to

Keyboard shortcuts

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