-
Notifications
You must be signed in to change notification settings - Fork 134
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
[Enhanced Switch][Record Pattern] Simplify exhaustiveness checking for switch statements with record patterns #3172
[Enhanced Switch][Record Pattern] Simplify exhaustiveness checking for switch statements with record patterns #3172
Conversation
srikanth-sankaran
commented
Oct 27, 2024
•
edited
Loading
edited
- Fixes [Enhanced Switch][Record Patterns] Simplify exhaustiveness checking for switch statements with record patterns #3458
@srikanth-sankaran we all keep getting mail notifications about github activities like this. I would really appreciate if each issue and each PR has a headline that lets me see if the notification is of interest for me. "WIP" is not such a headline. Another anti pattern is: "fix issue 4711" etc. because in my mail client there is no hover that expands what that referenced issue is about. And while I'm at it: if you don't add details into the issue template, why not just remove it and replace it with at least one line of a description? |
Hi @stephan-herrmann (and all others), First of all, my apologies. I can certainly provide a more descriptive heading and some body comments but perhaps you have more pertinent suggestion for how I may structure my work flow given this detail below: I often raise a PR well before the work is complete as a way of continuous/early testing. Typically I have some part of the fix in place and once that locally passes some smoke tests, I want to launch full test runs without burdening my laptop locally and so generate a PR. Question: Is there a way I can suppress these notifications - perhaps a draft PR would trigger tests without spamming everyone ??? Question: I also end up incrementally pushing several additional commits - do these generate notifications too (I sure hope not!!!)
I am under the impression I am following the recommended practice! Can you point me to an instance of a PR by me that shows the problematic anti pattern and an example that shows how it ought to have been done ??
My intent is fill them at a later date - hence they are left in place, but I can certainly provide some write up in the initial stage itself and evolve it to the final form when merging the PR. |
c212b31
to
bfc9220
Compare
switch statements with record patterns * Fixes eclipse-jdt#3458
Here is a documentation of the reasoning behind the step by step simplification:
and c. Simplify
since the only class that extends
|
This reduces about 100 LOC - I must say I still haven't understood this code 😆 but the above documentation is proof that new simplified code does the same thing as old code without additional 100 lines of boiler plate |
bfc9220
to
72a9425
Compare