New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: dupNamespace
as a syntax linter
#11154
Conversation
!bench |
Here are the benchmark results for commit de74382. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainer merge
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
1 similar comment
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
It would be nice to have tests for the behavior under exporting and aliasing also. |
!bench |
9c29121
to
a778c08
Compare
I added checking for |
This comment was marked as resolved.
This comment was marked as resolved.
The bench |
Great! Can you write a test for naming via export and comment it out with some explanation if it doesn't work? bors delegate+ |
✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with |
Matt, thanks! I added support for |
bors r+ |
An implementation of the `dupNamespace` from `Std` as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace: * `Nat.Nat.foo` triggers the linter; * `Nat.foo.Nat` does *not* trigger the linter. *Note.* This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose `declId` is present in the source declaration). [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60dupNamespace.60.20linter) The linter found ```lean private theorem Seminorm.Seminorm.isLUB_sSup ... ``` that is skipped by the environment `dupNamespace` linter.
Pull request successfully merged into master. Build succeeded: |
dupNamespace
as a syntax linterdupNamespace
as a syntax linter
An implementation of the `dupNamespace` from `Std` as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace: * `Nat.Nat.foo` triggers the linter; * `Nat.foo.Nat` does *not* trigger the linter. *Note.* This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose `declId` is present in the source declaration). [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60dupNamespace.60.20linter) The linter found ```lean private theorem Seminorm.Seminorm.isLUB_sSup ... ``` that is skipped by the environment `dupNamespace` linter.
An implementation of the `dupNamespace` from `Std` as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace: * `Nat.Nat.foo` triggers the linter; * `Nat.foo.Nat` does *not* trigger the linter. *Note.* This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose `declId` is present in the source declaration). [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60dupNamespace.60.20linter) The linter found ```lean private theorem Seminorm.Seminorm.isLUB_sSup ... ``` that is skipped by the environment `dupNamespace` linter.
An implementation of the `dupNamespace` from `Std` as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace: * `Nat.Nat.foo` triggers the linter; * `Nat.foo.Nat` does *not* trigger the linter. *Note.* This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose `declId` is present in the source declaration). [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60dupNamespace.60.20linter) The linter found ```lean private theorem Seminorm.Seminorm.isLUB_sSup ... ``` that is skipped by the environment `dupNamespace` linter.
An implementation of the `dupNamespace` from `Std` as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace: * `Nat.Nat.foo` triggers the linter; * `Nat.foo.Nat` does *not* trigger the linter. *Note.* This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose `declId` is present in the source declaration). [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60dupNamespace.60.20linter) The linter found ```lean private theorem Seminorm.Seminorm.isLUB_sSup ... ``` that is skipped by the environment `dupNamespace` linter.
An implementation of the
dupNamespace
fromStd
as a syntax linter. The linter emits a warning for declarations that have a repeated, consecutive namespace:Nat.Nat.foo
triggers the linter;Nat.foo.Nat
does not trigger the linter.Note. This linter will not detect duplication in namespaces of autogenerated declarations (other than the one whose
declId
is present in the source declaration).Zulip discussion
The linter found
that is skipped by the environment
dupNamespace
linter.A note on the extra import: it is only used to get
Array.attach
, which allows to writeand not have to mark it as
partial
.