Skip to content

gostaticanalysis/called

Repository files navigation

called

pkg.go.dev

called finds calls specified by the called.funcs flag.

package main

import "log"

func main() {
	log.Fatal("hoge")
}
$ go vet -vettool=`which called` -called.funcs="log.Fatal" main.go
./main.go:6:11: log.Fatal must not be called

Ignore Checks

Analyzers ignore nodes annotated with staticcheck's style comments as below. An ignore comment includes the analyzer names and a reason for disabling the check. If you specify called as an analyzer name, all analyzers ignore the corresponding code.

package main

import "log"

func main() {
	//lint:ignore called reason
	log.Fatal("hoge")
}

Release

This repository uses tagpr to automatically create release pull requests when changes are merged to the main branch. The current version is stored in the VERSION file and TagPR reads settings from .tagpr.

About

Analyzer: called is a analyzer which can find function calling

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages