opentelemetry.io icon indicating copy to clipboard operation
opentelemetry.io copied to clipboard

CI: consider adding markdown checks of formatting and common gotchas

Open chalin opened this issue 4 years ago • 6 comments

Now that we starting to have more and more contributors, the project would benefit from standardizing Markdown formatting, and a prettifier and linter could help in this respect.

  • I've (@chalin) started experimenting with Prettier, e.g., see:
    • #1290
    • https://github.com/open-telemetry/opentelemetry.io/pulls?q=is%3Apr+prettier+is%3Aclosed
  • Note that there's module for formatting Go templates. Read more

chalin avatar Jan 20 '22 15:01 chalin

@svrnm - I've noticed that lately you've been running a markdown linter/prettifier and submitting PRs. Thanks for those.

It would be good if we could agree on the same tool. I'd like to suggest Prettier. I'm open to discussing this at the next Comms meeting if you have a strong preference for another tool.

You can run Prettier as follows:

$ npx prettier --write path/to/the/markdown/file.md

/cc @cartermp @austinlparker

chalin avatar Jun 28 '22 19:06 chalin

I'm fine with Prettier

austinlparker avatar Jun 28 '22 20:06 austinlparker

@svrnm - I've noticed that lately you've been running a markdown linter/prettifier and submitting PRs. Thanks for those.

It would be good if we could agree on the same tool. I'd like to suggest Prettier. I'm open to discussing this at the next Comms meeting if you have a strong preference for another tool.

I'm fine with prettier, I just had setup markdownlint to check MD files automatically for me when I open them up, but I can work with prettier as well!

svrnm avatar Jun 29 '22 06:06 svrnm

@chalin -- if we add a .prettierrc.json to the project vscode and other editors should be able to pick it up and use prettier (instead of markdownlint in my case). Sounds like a non-invasive first step, wdyt?

svrnm avatar Jul 05 '22 15:07 svrnm

All sounds good to me.

cartermp avatar Jul 05 '22 16:07 cartermp

if we add a .prettierrc.json to the project vscode and other editors should be able to pick it up and use prettier (instead of markdownlint in my case). Sounds like a non-invasive first step, wdyt?

Sounds good. FYI, there is prettier config already in https://github.com/open-telemetry/opentelemetry.io/blob/25f41e27fc07e62c7e692a7f107e137b49e5eac4/package.json#L52-L54

Is that good enough -- i.e., do tools pick that up? If not, I can factor it out.

Btw, we'll have to be careful with the use of Prettier. It doesn't do a great job with Hugo template syntax. So I'd like to continue experimenting with it before we consider adding it to CI checks. My 2 cents.

chalin avatar Aug 19 '22 11:08 chalin

I'll keep this open until we'll included all or most of the docs.

chalin avatar Feb 19 '23 16:02 chalin

Closed by #2414

chalin avatar Feb 28 '23 12:02 chalin