-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add default formatting #119
Conversation
Now that we're going with automatic formatting on saving, we don't really need `EditorConfig` anymore, so I'm removing references to that here.
These extensions provide a richer Markdown experience in VSCode, with better alignment with GitHub Markdown behavior.
This sets the RedHat formatter to be the default Java formatter, and the MarkdownLint as the default Markdown formatter.
This uses the MarkdownLint extension for VSCode to rationalize the formatting on all the Markdown files.
Now that we're formatting on save, we don't really need Checkstyle anymore.
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.
I have a concern that I don't have the time/brain cells to check about. Will there be files that are currently not following this formatting that will look like they've been changed (even if just in whitespace) if someone goes there and saves them? Is there any easy way to see if there are files that would currently be "fixed" upon saving, or is this similar enough to the checkstyle stuff that we are in the clear?
If you switch to this branch and then do some "weird" things in VSCode, you can see it automatically "fix" them when you save. As an example, there were concerns (#101) that Checkstyle wasn't being consistent about spacing around curly braces. So I tried things like: String[] strings = { "Hello", "world" }; If I remove the spaces between, for example, the open curly brace and "Hello" and save, the space will magically re-appear. The RedHat Java formatter that I'm using here is less aggressive than the Prettier formatter. Prettier changed the formatting in several other places in the Java code. In particular it reformatted the big strings in the tests so that each component was on its own line. We'll see that in action when I add Prettier to the iteration template. Does that help? |
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 looks good. I won't muck up this PR with this, but I noticed we say things in KK_and_Nic.md
lines 11 and 18 that put our name preferences in the past tense. Not sure why we did that, but might be worth fixing. Also, do people say "preferred" pronouns these days, or just "My pronouns are..."? I feel like that has shifted over time and might be good to update.
Good point on the tense and phrasing. I'll make a new issue for that and see if I can get this guy merged in. |
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.
Looks good!
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
This turns on
editor.formatOnSave
in VS Code, so that when files are saved they will be automatically reformatted to a shared standard formatting so we have consistent formatting across everyone's work on this lab.I'm using the RedHat Java formatter and MarkdownLint for Markdown files.
It turned out that several of the Markdown files had some issues, so I fixed those and am committing them as well while I'm here.
Fixes #112
Closes #101