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
Limit docs code snippets line length to max 60 chars (#317 / #318) #318
Conversation
And yes Kelvin is written without degree symbol ;)
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.
LGTM.
What you could do (as a bonus) is pull in Java::Geci as a dependency and auto-insert the code snippets from our tests as examples. 😉
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.
Thx for the hard work! But could it be that you mixed tabs and whitespaces for indentation? Example:
Line 17 uses a tab, line 18 whitespaces.
Haven't heard about Java::Geci, sounds cool! But I would suggest to do that in a separate PR. |
Sometimes I don't understand IntellJ. AsciiDoc settings were set to "Use tab character" with "tab size 4" and IntelliJ printed 4 spaces... After dis- and reenabling the setting tabs are used. On the otherside: Shouldn't spotless take care of this or let the build break? Nevermind: Replaced all space with tabs. |
System.out.println(d + " degrees Celsius is cold"); | ||
System.out.println(d + " degrees Fahrenheit is REALY cold"); | ||
System.out.println(d + " degrees Kelvin is too cold to be true"); | ||
System.out.println(d + " °C is cold"); |
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.
Oh, non-ASCII chars in code snippets? 😬
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.
(Extended) ASCII-Code 248 :p http://www.asciitable.com/
I havn't come up with the short limit of 60 chars where about 40 are for intenden and System.out.println(..);
🤷♂️
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.
Every day's a school say. 👍
Not that familiar with Spotless, could it be it doesn't check Asciidoc? I will have a look and create an issue if necessary. |
Maybe. At least there are only Thanks for pointing the missing spaces. Don't know why IntelliJ hasn't shown them to me. Displaying in Github is strange anyway. Some lines are aligned in IntellI, but are not in Github.... |
Format retrying-test.adoc code samples
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
I don't see a way to cut the examples in
TempDir
extension, so I leave this to maybe refactored method names in #277PR checklist
The following checklist shall help the PR's author, the reviewers and maintainers to ensure the quality of this project.
It is based on our contributors guidelines, especially the "writing code" section.
It shall help to check for completion of the listed points.
If a point does not apply to the given PR's changes, the corresponding entry can be simply marked as done.
Documentation (general)
.adoc
file in thedocs
folder, e.g.docs/report-entries.adoc
.adoc
files)Documentation (new extension)
docs/docs-nav.yml
navigation has an entry for the new extensionpackage-info.java
contains information about the new extensionCode
Contributing
README.md
mentions the new contribution (real name optional)I hereby agree to the terms of the JUnit Pioneer Contributor License Agreement.