This repository was archived by the owner on Mar 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
(actions) Add markdown lint job #32
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: sanity | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-go@v4 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| - name: Run verification checks | ||
| run: make verify | ||
| markdown: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Lint markdown files | ||
| uses: github/super-linter/slim@v4 | ||
| env: | ||
| VALIDATE_ALL_CODEBASE: true | ||
| DEFAULT_BRANCH: main | ||
| # only runs the markdown linter | ||
| VALIDATE_MARKDOWN: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on not adding npm+node as a dependency. If we felt we needed this we could instead use the docker image like:
where
CONTAINER_TOOLis 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).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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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:
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.