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

ci: Use dprint to format documentation + TOML files #3426

Merged
merged 6 commits into from Jan 20, 2022

Conversation

chipbuster
Copy link
Contributor

@chipbuster chipbuster commented Jan 13, 2022

Description

Adds Rust-based standardized markdown formatting and a CI step to catch unformatted files.

Motivation and Context

Occasionally, a contributor will have a different markdown formatter than the typical one, resulting in lots of changes throughout a document. This has been exacerbated by the fact that many markdown formatters don't support partial formatting, meaning you have to format the entire document to format changes.

Don't know if this link will remain valid in the future, but here is an example of where one such accidental change happened in a PR.

I have gone with a rust-based formatting tool (even though it's less popular than well-established tools like prettier and vscode-markdown) because it's editor agnostic and doesn't require installing a new language runtime, since you already need cargo to develop. (Thanks matchai for the suggestion!)

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

.dprint.json Outdated Show resolved Hide resolved
.dprint.json Outdated Show resolved Hide resolved
.dprint.json Show resolved Hide resolved
.dprint.json Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@chipbuster chipbuster changed the title ci: Use dprint to format documentation files ci: Use dprint to format documentation + TOML files Jan 14, 2022
docs/ar-SA/README.md Outdated Show resolved Hide resolved
.dprint.json Outdated Show resolved Hide resolved
.dprint.json Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
@chipbuster
Copy link
Contributor Author

Okay, I think I've caught all the major whoopsies from the rebase onto latest master.

Copy link
Member

@matchai matchai left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@matchai matchai merged commit 0965667 into starship:master Jan 20, 2022
@chipbuster chipbuster deleted the dprint branch January 20, 2022 15:52
Perniciosius pushed a commit to Perniciosius/starship that referenced this pull request Feb 21, 2022
Adds Rust-based standardized markdown formatting and a CI step to catch unformatted files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants