Skip to content
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

3.0.4: tables cleanup & markdownlint #4040

Merged
merged 18 commits into from
Aug 29, 2024

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Aug 19, 2024

  • Github Workflow: markdownlint after mdv on 3.0.4.md only (because the older files won't pass)
    • this ensures new pushes comply with our linter rules in the main branch
  • add npm script format-markdown to conveniently reformat markdown after changes
  • add .markdownlint.yaml because the npm script needs it
  • "compact" format for tables
  • extract formatting into bash script to avoid portability issues - tested on Windows and MacOS

Part of

@ralfhandl ralfhandl added Housekeeping script Pull requests that update Bash or JavaScript code labels Aug 19, 2024
@ralfhandl ralfhandl added this to the v3.0.4 milestone Aug 19, 2024
@ralfhandl ralfhandl linked an issue Aug 19, 2024 that may be closed by this pull request
mikekistler
mikekistler previously approved these changes Aug 19, 2024
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

Left a comment to remove some unnecessary leading white space.

versions/.markdownlint.yaml Outdated Show resolved Hide resolved
mikekistler
mikekistler previously approved these changes Aug 20, 2024
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@ralfhandl ralfhandl marked this pull request as draft August 20, 2024 13:33
@ralfhandl
Copy link
Contributor Author

Update after #4027 is merged, check out .markdownlint.yaml from main and use it for validation.

mikekistler
mikekistler previously approved these changes Aug 22, 2024
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@ralfhandl ralfhandl marked this pull request as ready for review August 22, 2024 12:53
@lornajane
Copy link
Contributor

I expected to see the action running in this pull request, should it?

@ralfhandl
Copy link
Contributor Author

Probably the merge conflict prevents the script from running.

@ralfhandl
Copy link
Contributor Author

@handrews Added sed to make tables more compact:

  • at most one space after/before a pipe character
  • at most four hyphens in a row

mikekistler
mikekistler previously approved these changes Aug 26, 2024
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

package.json Outdated Show resolved Hide resolved
@handrews
Copy link
Member

handrews commented Aug 26, 2024

I can't say I'm at all happy with Prettier's markdown behavior, but this is better than what it was doing to tables before. This double-change of every single table line is going to be such a pain for searching change history :-( Although if we do a lot of rearranging for 3.2 I guess it won't matter anyway. Plus searching change history is already incredibly hard in this repo.

@ralfhandl ralfhandl requested a review from miqui August 27, 2024 07:50
@ralfhandl
Copy link
Contributor Author

I can't say I'm at all happy with Prettier's markdown behavior

Me neither, but it does format the code blocks correctly.

this is better than what it was doing to tables before

Thanks.

mikekistler
mikekistler previously approved these changes Aug 27, 2024
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

I was concerned that the prettier extension in VSCode (my preferred editing environment) might reflow the tables if I made any change to the file, but I tested this and found that not to be the case.

@ralfhandl
Copy link
Contributor Author

I was concerned that the prettier extension in VSCode (my preferred editing environment) might reflow the tables if I made any change to the file

My VS Code does if I explicitly format the file with the prettier extension enabled, or if I have "format on save" turned on and save the file.

Which is why I have both the extension disabled for this workspace and "format on save" turned off in the workspace settings 😎

@ralfhandl ralfhandl marked this pull request as draft August 27, 2024 11:49
@ralfhandl ralfhandl marked this pull request as ready for review August 27, 2024 14:08
@handrews
Copy link
Member

This is why I use vi 😛

(ok technically vim, but that's my only concession to modernity!)

@ralfhandl
Copy link
Contributor Author

vi was my preferred tool for editing the makefile for Emacs 😎

@ralfhandl ralfhandl changed the title markdownlint for 3.0.4.md 3.0.4: tables cleanup & markdownlint Aug 29, 2024
@ralfhandl ralfhandl merged commit 4f1c33d into OAI:v3.0.4-dev Aug 29, 2024
1 check passed
@ralfhandl ralfhandl deleted the v3.0.4-dev-markdownlint branch August 29, 2024 15:39
@ralfhandl
Copy link
Contributor Author

Merging as @mikekistler has already approved half a dozen times 😎

ralfhandl added a commit to ralfhandl/OpenAPI-Specification that referenced this pull request Aug 29, 2024
@ralfhandl ralfhandl mentioned this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Housekeeping script Pull requests that update Bash or JavaScript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add whitespace/formatting automation to the build process
5 participants