2022-07-15 15:32:10 +02:00
|
|
|
//golangcitest:args -Egoconst
|
2022-08-15 18:23:07 +02:00
|
|
|
//golangcitest:config_path testdata/configs/goconst_ignore.yml
|
2022-08-20 18:53:45 +02:00
|
|
|
//golangcitest:expected_exitcode 0
|
2021-06-09 16:20:13 -04:00
|
|
|
package testdata
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGoConstA(t *testing.T) {
|
|
|
|
a := "needconst"
|
|
|
|
fmt.Print(a)
|
|
|
|
b := "needconst"
|
|
|
|
fmt.Print(b)
|
|
|
|
c := "needconst"
|
|
|
|
fmt.Print(c)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestGoConstB(t *testing.T) {
|
|
|
|
a := "needconst"
|
|
|
|
fmt.Print(a)
|
|
|
|
b := "needconst"
|
|
|
|
fmt.Print(b)
|
|
|
|
}
|
|
|
|
|
|
|
|
const AlreadyHasConst = "alreadyhasconst"
|
|
|
|
|
|
|
|
func TestGoConstC(t *testing.T) {
|
|
|
|
a := "alreadyhasconst"
|
|
|
|
fmt.Print(a)
|
|
|
|
b := "alreadyhasconst"
|
|
|
|
fmt.Print(b)
|
|
|
|
c := "alreadyhasconst"
|
|
|
|
fmt.Print(c)
|
|
|
|
fmt.Print("alreadyhasconst")
|
|
|
|
}
|