Linting: markdownlint-cli2
Continuing the effort started in !32 (merged) and !33 (merged) by adding a pipeline job for mdl
(task listed in #11).
This MR is based on the decisions that have been made in !32 (merged) (rules, separate job for mdl
, using alpine
as image, etc...).
It'll also have to be rebased against !32 (merged) and !33 (merged) once they're merged.
mdl
isn't packaged for Alpine (yet?), so it is installed via rubygem
within the pipeline for now.
Here's a run of the mdl
job.
I'd happily help to fix/treat the "issues" raised by mdl
once this MR is merged!
I remain available if any changes are needed
Merge request reports
Activity
7 15 - make 8 16 script: make check 17 18 .lint-workflow: 9 19 rules: 10 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' 20 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push")' 21 changes: 22 paths: 23 - $FILE_GLOB 24 compare_to: 'master' 11 25 - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"' 12 26 when: never 13 - if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push"' 27 28 mdl: Similar feedback to !33 (comment 114144), you need a FILE_GLOB here in this job with the way the
.lint-workflow
currently works.Similar answer to !33 (comment 114161), I suggest dropping it
Markdown files aren't currently contained in a specific directory and could be spread over multiple ones in the future.Edited by Robin Candauchanged this line in version 2 of the diff
18 .lint-workflow: 9 19 rules: 10 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' 20 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push")' 21 changes: 22 paths: 23 - $FILE_GLOB 24 compare_to: 'master' 11 25 - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"' 12 26 when: never 13 - if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push"' 27 28 mdl: 29 image: alpine 30 before_script: 31 - apk add ruby && gem install mdl - Comment on lines +29 to +31
In the description you say
adding a pipeline job for
mdl
(task listed in #11).I don't personally have that strong an opinion of which linter is used for MD files, but the linter actually listed in the issue is
markdownlint-cli2
, which has the advantage of having its own ready-made, officially maintained Docker image (see #11 (comment 113428)). See similar feedback at !33 (comment 114146)Any reason for using
mdl
instead? The Markdown docs have been formatted, and
markdownlint-cli2
has been configured.Edit: Will add
markdownlint-cli2
to the repos ASAP.mdformat
was added today.Edited by Daniel M. Capellachanged this line in version 2 of the diff
In similar feedback as !33 (comment 114147), I would recommend applying any available linting feedback fixes in the same MR that introduces the CI job, to make future contributions free of noise not related to their changes.
As said in !33 (comment 114160) I agree!
Had not noticed that myself. I'm actually interested in investigating mdformat as well.
Edit: This was in response to !34 (comment 114152). Apparently responding by email doesn't place the reply in the thread.
Edited by Daniel M. Capellashfmt
is another one that could be included in a larger conversation about formatters
mentioned in merge request !33 (merged)
added 8 commits
- 001df16b - Fix CHANGES.md links
- d905c5f9 - markdownlint_cli2 --fix
- 5b273a95 - mdformat pass
- eb362afd - Touch up
- 4fced3f3 - Linting: Vint
- 76b3599f - CHANGES.md: Fix headings and bump unreleased link
- 7cd80a9b - Configure markdownlint-cli2
- 1c937558 - Rebase against master + switch image to markdownlint-cli2
Toggle commit listadded 19 commits
-
1c937558...becc72a1 - 18 commits from branch
pacman:master
- cba5ef20 - Add markdownlint-cli2 pipeline job
-
1c937558...becc72a1 - 18 commits from branch
added 2 commits
mentioned in commit 1535313e