HIVE-28696: Enforce uniform codestyle in Markdown files in hive-site#31
HIVE-28696: Enforce uniform codestyle in Markdown files in hive-site#31zabetak wants to merge 1 commit intoapache:mainfrom
Conversation
|
@zabetak, this is amazing. I didn't knew, spotless can work for other language as well. Using this will help greatly. Let me know if I can help with review. I have 1 request though to review #30 and get this merged first. Otherwise because of merge conflicts i would need to rework (manually) and again run this spotless plugin on top of that as it is helping with the padding of columns in markdown. |
|
|
||
| title: "Apache Hive : AboutThisWiki" | ||
| date: 2024-12-12 | ||
| --- |
There was a problem hiding this comment.
Small Observation: A horizontal line is appearing at the top of the page as the number of dash - is changed. from 3 to the width of the text. Nothing major though.
There was a problem hiding this comment.
As far as I understand Hugo's version of markdown, the original markdown is perfectly fine. It represents some YAML metadata (see goldmark-meta). The official Hugo website uses the same syntax. It would be nice if we could avoid changing these lines.
There was a problem hiding this comment.
A related PR has been merged into spotless recently: diffplug/spotless#2713. We would need to configure spotless to use flexmark with the YamlFrontMatter extension.
There was a problem hiding this comment.
I'm sure there is a solution for this. The overall question is if enforcing a certain style is desired or it's just gonna be annoying in the long term :)
There was a problem hiding this comment.
I think forcing a certain style would be good, as long as it's easy to enforce.
I had a try at implementing the YamlFrontMatter, and it works, see #98. I thought about changing some options of the formatter, to gradually introduce the changes, e.g., FORMAT_TABLE_ADJUST_COLUMN_WIDTH could be set to false. The extra blank lines could be ignored in the first batch as well (MAX_BLANK_LINES?).
However, I could not find a way to set this flexmark option in the pom.xml file. Maybe we better wait until spotless allows changing the config options for flexmark.
There was a problem hiding this comment.
It's fine for me to wait, don't think its urgent to get this in.
|
@Aggarwal-Raghav Apart from uniform style do you see other benefits for getting this PR in? Does it solve any of the issues that you identified previously? I am trying to gather pros/cons to see if its worth pursuing this further. |
|
@zabetak , no I don't see any other benefits but this much only is worth having IMO. It will help in developer readability and markdown file navigation. |
Enforce style using maven the spotless plugin.
Just testing for the moment. Didn't review all changes.
Enforce style during maven build:
Formatting can be applied to all files using: