github.com/be-b10g/golangci-lint@v1.17.2/test/testdata/staticcheck.go (about)

     1  //args: -Estaticcheck
     2  package testdata
     3  
     4  func Staticcheck() {
     5  	var x int
     6  	x = x // ERROR "self-assignment of x to x"
     7  }
     8  
     9  func StaticcheckNolintStaticcheck() {
    10  	var x int
    11  	x = x //nolint:staticcheck
    12  }
    13  
    14  func StaticcheckNolintMegacheck() {
    15  	var x int
    16  	x = x //nolint:megacheck
    17  }