-
Notifications
You must be signed in to change notification settings - Fork 90
Grammar – Consistency & Cleanup 2 #1291
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
Conversation
…5 -> v6 transition, and cleanup references
Again we've got removal of trailing whitespace... @BillWagner is that something we can lint for? It would be good to remove it in a single PR and then make sure it doesn't creep in again. (I'm fine to keep the changes in this PR for simplicity.) |
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.
Again, I'm pretty confident I understand this one...
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.
This also LGTM. Let's at our next meeting.
TL;DR; Instead of doing all the work to automate whitespace removal, I suggest that if we create a PR with a lot of whitespace cleanup, that PR author should recommend reviewers "hide whitespace". Here's why: Markdown lint will flag a single trailing whitespace character. However, 2 whitespace characters creates a line break. I agree with the cited author that it's hard to see, so use a blank line instead. So, removing all whitespace likely changes the rendered output. Instead, let's just keep updating as the tools point out concerns. |
As many of you know I find Markdown one of the most beautiful languages ever developed and now I learn the face of it been scared by this carbuncle?!? (/s, just in case) Across the Standard’s md files there are currently 68 occurences of two or more spaces at the end of lines (the Google flavoured markdown trigger for a hard break). A brief glance at just a few showed they had no effect due to other formatting, but an exhaustive check would be required to see if they all could be clobbered. If a hard break is required a line can be ended with a backslash, which at least is visible. I suggest we make that a Standard requirement and then look at clobbering all current trailing whitespace and flagging it after that (https://github.com/updownpress/markdown-lint/blob/master/rules/009-no-trailing-spaces.md) |
[Continues on from #1290 Grammar – Consistency & Cleanup]
This PR removes type_parameter_constraints_clauses orphaned during the v5 -> v6 transition.
In v5 this rule was present in a number of places, e.g.:
Where ever it occurred it was optional. The rule itself was defined as:
which is one or more type-parameter-constraints-clause specified using left-recursion.
Combining “optional” with “one or more” produces “zero or more” – which the ANTLR notation provides directly using
*
, so in v6 the clauses using type-parameter-constraints-clauses all changed to using type-parameter-constraints-clause zero or more times, e.g.:along with all in-text references to type_parameter_constraints_clauses being changed to type_parameter_constraints_clauses (trailing 's' not in italics).
Job done…
Well not quite type_parameter_constraints_clauses was not deleted but orphaned, and a few of those in-text references were missed and/or the English grammar around them not fixed up.
This PR simply completes the job.
(And there is a little trailing whitespace cleanup done as my check-in “lint” action barfs at them.)