Skip to content

Do not mark built-in types that are only there for documentation #673

@zimmski

Description

@zimmski

The "redefines-builtin-id" rule flags some identifiers that are strictly speaking just built-in for the documentation of the standard library. Hence, there should be no reason not to allow them.

grep -i document go/src/builtin/builtin.go
...
// Type is here for the purposes of documentation only. It is a stand-in
// Type1 is here for the purposes of documentation only. It is a stand-in
// IntegerType is here for the purposes of documentation only. It is a stand-in
// FloatType is here for the purposes of documentation only. It is a stand-in
// ComplexType is here for the purposes of documentation only. It is a

For example marking "Type" as a name that should not be used is really annoying since that is such a common name.

I would suggest just removing them. There is no harm in using them as if you would overwrite e.g. "int".

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions