1
0
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:
Markus Zimmermann 2022-04-08 15:18:18 +02:00 committed by GitHub
parent 23828cc39d
commit b9814276b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 27 deletions

View File

@ -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.

View File

@ -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 {