Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

(actions) Add markdown lint job#32

Closed
anik120 wants to merge 4 commits intooperator-framework:mainfrom
anik120:markdown-lint-action
Closed

(actions) Add markdown lint job#32
anik120 wants to merge 4 commits intooperator-framework:mainfrom
anik120:markdown-lint-action

Conversation

@anik120
Copy link
Copy Markdown
Member

@anik120 anik120 commented Apr 11, 2023

No description provided.

anik120 added 4 commits April 11, 2023 15:21
Tidy was being instructed to `go mod tidy` the hack/tools folder,
which was being done when the tools were being downloaded using
go modules (the main branch has the setup to download the tools
using go installer instead)
Also update the README to incorporate changes to the project
since bootstrapping.
@anik120
Copy link
Copy Markdown
Member Author

anik120 commented Apr 11, 2023

Hold reviews for #29 to go in first.

uses: actions/checkout@v3

- name: Lint markdown files
uses: github/super-linter/slim@v4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(repeating question from original PR and adding another:

  1. Is this something that could easily be run locally (ala our other build tools that we pull/run under make targets)? If so, I'd prefer we follow that pattern to make our CI environment reproducible locally. (based on this, I don't see us being cool with npm and node as a local build tool dependency)
  2. What are we trying to catch with this? It's hard to tell from the markdownlint readme what value it brings. Reason I ask is because SDK's markdown linting is flaky (due to link checking) and is sometimes helpful but sometimes actively in the way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this something that could easily be run locally (ala our other build tools that we pull/run under make targets)? If so, I'd prefer we follow that pattern to make our CI environment reproducible locally. (based on this, I don't see us being cool with npm and node as a local build tool dependency)

+1 on not adding npm+node as a dependency. If we felt we needed this we could instead use the docker image like:

$(CONTAINER_TOOL) run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "*.md"

where CONTAINER_TOOL is another Makefile variable. This should be fine since we are already requiring Docker usage in the Makefile at the moment. As an aside, it might be nice, as another follow up, to allow the use of Podman+Docker in our Makefile (not pressing but just something to think about).

What are we trying to catch with this? It's hard to tell from the markdownlint readme what value it brings. Reason I ask is because SDK's markdown linting is flaky (due to link checking) and is sometimes helpful but sometimes actively in the way.

From what I can tell rukpak enabled it to ensure the documentation is more uniform by running the linter against it. I personally think that might be a bit overkill for us right now especially because we have no catalogd documentation at the moment. I think if we notice that consistent docs formatting is causing us major headache down the road then it might be worth adding this, but until then I would vote for leaving this out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it feels right to have at least some guard rails around documents we add though. In OLM we had a different experience without any guard rails being preset. It's very easy for the docs to get out of date, and at the minimum if a PR author is made aware that the changes being introduced in the PR has broken a link mentioned in a doc, it forces the PR author to also update the doc with the PR.

The other fixes I had to do for this PR for example was all related to healthy doc writing habits (space between sections etc) that make docs look readable so I'm +1 for them.

(Holding off on any changes to this PR until we're in agreement about adding/not adding this check. +1 on making sure the binary is downloadable and runnable using a make target so that PR authors can run it locally, I can look into that if we decide to move ahead with this).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Using a docker image is definitely preferable to local npm+node. But it also does feel a little dirty, tbh. @anik120 Do you know if there are any alternative markdown linters written in Go that we could use/follow the same pattern as our other tools? That would be ideal.

Re: what does this get us, I think I saw:

  1. link checking
  2. some sort of "best practice" opinions on markdown formatting.

Not necessarily opposed, but it would be nice to enumerate what we're hoping to get out of this so that we aren't constantly chasing some linter rules over time that we don't actually care about.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2023
@openshift-merge-robot
Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@anik120 anik120 closed this Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants