dive

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 4 Imported by: 0

README

dive

pkg.go.dev

dive finds low readability if-blocks such as below.

  • Too long if blocks
  • Too many returns in a block
  • A loop is in if-block
  • Deeply nest

Install

You can get dive by go install command (Go 1.16 and higher).

$ go install github.com/gostaticanalysis/dive/cmd/dive@latest

How to use

dive run with go vet as below when Go is 1.12 and higher.

$ go vet -vettool=$(which dive) ./...

Analyze with golang.org/x/tools/go/analysis

You can use dive.Analyzer with unitchecker.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "dive",
	Doc:  doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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