[Merged by Bors] - feat: overlapping instances linter#38126
[Merged by Bors] - feat: overlapping instances linter#38126JovanGerb wants to merge 157 commits into
Conversation
|
This pull request has conflicts, please merge |
|
bors d+ |
|
✌️ JovanGerb can now approve this pull request. To approve and merge a pull request, simply reply with |
This PR creates the `unrestricted` array in the unicode linter, which contains characters that have no restrictions on which selector they are followed by, and are not enforced to be followed by any selector at all. We include `'⚠'` in it to allow `⚠️ `. We don't want to ban the text version (`⚠`), as this is used in lake output (without the text selector) and so may conceivably be mentioned in a comment. We plan to use `⚠️ ` in #38126.
|
This PR/issue depends on: |
9e4d1bc to
f0cfcfc
Compare
|
(By the way, I think it would be better not to use force push, because it is easy to mess something up, and there is no way to check this after the fact, appart from reading the whole +777 line diff again) |
|
The force push only affects the last few commits that I overwrote, right? 👀 So presumably only those would need to be checked? (I guess there is a chance you accidentally delete a commit. 🤔) In this case it was to banish the earlier merge of the #39796 branch, which was giving me a lot of trouble after the new version had been merged into master. (Ah, I guess you can |
|
Anyway, I think this is finally all ready... 😁 |
|
Ah yes I hadn't noticed that the force push only affected the last few commits. I think that soon we'll be able to remove bors r+ |
This PR implements the overlapping instances linter, with better performance than the previous attempt. The overlapping instances linter warns on data-carrying overlaps between instances in the local context of a declaration, as well as on redundant instances of `Prop` classes (i.e. those which can be synthesized from another instance in the context). An annoyance is the need for `withSetBoolOptionIn`. This is a private declaration in the `unusedInstancesInType` linter, with a link to leanprover/lean4#13133, which has been merged. When that commit lands in mathlib, we should move to `withSetOptionIn`. See #35095 and #33677 for previous iterations of this linter. See #14731 for an old attempt at a weaker form of this linter. Co-authored-by: @thorimur Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
|
Pull request successfully merged into master. Build succeeded: |
This PR implements the overlapping instances linter, with better performance than the previous attempt. The overlapping instances linter warns on data-carrying overlaps between instances in the local context of a declaration, as well as on redundant instances of `Prop` classes (i.e. those which can be synthesized from another instance in the context). An annoyance is the need for `withSetBoolOptionIn`. This is a private declaration in the `unusedInstancesInType` linter, with a link to leanprover/lean4#13133, which has been merged. When that commit lands in mathlib, we should move to `withSetOptionIn`. See leanprover-community#35095 and leanprover-community#33677 for previous iterations of this linter. See leanprover-community#14731 for an old attempt at a weaker form of this linter. Co-authored-by: @thorimur Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
…unity#39796) This PR creates the `unrestricted` array in the unicode linter, which contains characters that have no restrictions on which selector they are followed by, and are not enforced to be followed by any selector at all. We include `'⚠'` in it to allow `⚠️ `. We don't want to ban the text version (`⚠`), as this is used in lake output (without the text selector) and so may conceivably be mentioned in a comment. We plan to use `⚠️ ` in leanprover-community#38126.
This PR implements the overlapping instances linter, with better performance than the previous attempt. The overlapping instances linter warns on data-carrying overlaps between instances in the local context of a declaration, as well as on redundant instances of `Prop` classes (i.e. those which can be synthesized from another instance in the context). An annoyance is the need for `withSetBoolOptionIn`. This is a private declaration in the `unusedInstancesInType` linter, with a link to leanprover/lean4#13133, which has been merged. When that commit lands in mathlib, we should move to `withSetOptionIn`. See leanprover-community#35095 and leanprover-community#33677 for previous iterations of this linter. See leanprover-community#14731 for an old attempt at a weaker form of this linter. Co-authored-by: @thorimur Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
…unity#39796) This PR creates the `unrestricted` array in the unicode linter, which contains characters that have no restrictions on which selector they are followed by, and are not enforced to be followed by any selector at all. We include `'⚠'` in it to allow `⚠️ `. We don't want to ban the text version (`⚠`), as this is used in lake output (without the text selector) and so may conceivably be mentioned in a comment. We plan to use `⚠️ ` in leanprover-community#38126.
This PR implements the overlapping instances linter, with better performance than the previous attempt. The overlapping instances linter warns on data-carrying overlaps between instances in the local context of a declaration, as well as on redundant instances of `Prop` classes (i.e. those which can be synthesized from another instance in the context). An annoyance is the need for `withSetBoolOptionIn`. This is a private declaration in the `unusedInstancesInType` linter, with a link to leanprover/lean4#13133, which has been merged. When that commit lands in mathlib, we should move to `withSetOptionIn`. See leanprover-community#35095 and leanprover-community#33677 for previous iterations of this linter. See leanprover-community#14731 for an old attempt at a weaker form of this linter. Co-authored-by: @thorimur Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
This PR implements the overlapping instances linter, with better performance than the previous attempt.
The overlapping instances linter warns on data-carrying overlaps between instances in the local context of a declaration, as well as on redundant instances of
Propclasses (i.e. those which can be synthesized from another instance in the context).An annoyance is the need for
withSetBoolOptionIn. This is a private declaration in theunusedInstancesInTypelinter, with a link to leanprover/lean4#13133, which has been merged. When that commit lands in mathlib, we should move towithSetOptionIn.See #35095 and #33677 for previous iterations of this linter.
See #14731 for an old attempt at a weaker form of this linter.
Co-authored-by: @thorimur
to_additiveuse #38150unrestrictedcharacter set in unicode linter #39796