mirror of
https://github.com/mgechev/revive.git
synced 2025-01-06 03:04:06 +02:00
Remove built-in types that existing only for the Go documentation (#675)
Since these types only exist for documenting Go's standard library there should be no reason to mark them. Closes #673
This commit is contained in:
parent
23828cc39d
commit
b9814276b6
@ -34,32 +34,27 @@ var builtFunctions = map[string]bool{
|
||||
}
|
||||
|
||||
var builtInTypes = map[string]bool{
|
||||
"ComplexType": true,
|
||||
"FloatType": true,
|
||||
"IntegerType": true,
|
||||
"Type": true,
|
||||
"Type1": true,
|
||||
"bool": true,
|
||||
"byte": true,
|
||||
"complex128": true,
|
||||
"complex64": true,
|
||||
"error": true,
|
||||
"float32": true,
|
||||
"float64": true,
|
||||
"int": true,
|
||||
"int16": true,
|
||||
"int32": true,
|
||||
"int64": true,
|
||||
"int8": true,
|
||||
"rune": true,
|
||||
"string": true,
|
||||
"uint": true,
|
||||
"uint16": true,
|
||||
"uint32": true,
|
||||
"uint64": true,
|
||||
"uint8": true,
|
||||
"uintptr": true,
|
||||
"any": true,
|
||||
"bool": true,
|
||||
"byte": true,
|
||||
"complex128": true,
|
||||
"complex64": true,
|
||||
"error": true,
|
||||
"float32": true,
|
||||
"float64": true,
|
||||
"int": true,
|
||||
"int16": true,
|
||||
"int32": true,
|
||||
"int64": true,
|
||||
"int8": true,
|
||||
"rune": true,
|
||||
"string": true,
|
||||
"uint": true,
|
||||
"uint16": true,
|
||||
"uint32": true,
|
||||
"uint64": true,
|
||||
"uint8": true,
|
||||
"uintptr": true,
|
||||
"any": true,
|
||||
}
|
||||
|
||||
// RedefinesBuiltinIDRule warns when a builtin identifier is shadowed.
|
||||
|
2
testdata/redefines-builtin-id.go
vendored
2
testdata/redefines-builtin-id.go
vendored
@ -9,7 +9,7 @@ func append(i, j int) { // MATCH /redefinition of the built-in function append/
|
||||
|
||||
}
|
||||
|
||||
type Type int16 // MATCH /redefinition of the built-in type Type/
|
||||
type string int16 // MATCH /redefinition of the built-in type string/
|
||||
|
||||
func delete(set []int64, i int) (y []int64) { // MATCH /redefinition of the built-in function delete/
|
||||
for j, v := range set {
|
||||
|
Loading…
Reference in New Issue
Block a user