[GH-ISSUE #373] markdownlint argument -c/--config ignores any input #2162

Closed
opened 2026-03-07 20:05:09 +03:00 by kerem · 4 comments
Owner

Originally created by @subwaystation on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/373

Hi @DavidAnson :)

I am trying to use your awesome linter for this https://github.com/nf-core/pangenome/pull/44 pipeline.
Here, we are providing a config file to tell markdownlint how we want the linting done. However, using -c/--config to provide this config file, it is completely ignored.
See the following tiny example:

markdownlint --config markdownlint.yml ./
CHANGELOG.md:8:81 MD013/line-length Line length [Expected: 80; Actual: 93]
CHANGELOG.md:18:81 MD013/line-length Line length [Expected: 80; Actual: 277]

markdownlint.yml:

# Markdownlint configuration file
default: true
line-length: false
no-duplicate-header:
    siblings_only: true
no-inline-html:
    allowed_elements:
        - img
        - p
        - kbd
        - details
        - summary

The line-length errors should not appear!
Changing the name of the config file to .markdownlint.yml, keeping it locally and not setting -c/--config resolves the issue.
But I thought this argument would allow to provide such a config file from anywhere?

I am running your 0.27.0 release on node v15.10.0.

Example files:
Markdown.zip

Thanks for any feedback!

Originally created by @subwaystation on GitHub (Mar 2, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/373 Hi @DavidAnson :) I am trying to use your awesome linter for this https://github.com/nf-core/pangenome/pull/44 pipeline. Here, we are providing a config file to tell markdownlint how we want the linting done. However, using `-c/--config` to provide this config file, it is completely ignored. See the following tiny example: ``` markdownlint --config markdownlint.yml ./ CHANGELOG.md:8:81 MD013/line-length Line length [Expected: 80; Actual: 93] CHANGELOG.md:18:81 MD013/line-length Line length [Expected: 80; Actual: 277] ``` `markdownlint.yml`: ``` # Markdownlint configuration file default: true line-length: false no-duplicate-header: siblings_only: true no-inline-html: allowed_elements: - img - p - kbd - details - summary ``` The line-length errors should not appear! Changing the name of the config file to `.markdownlint.yml`, keeping it locally and not setting `-c/--config` resolves the issue. But I thought this argument would allow to provide such a config file from anywhere? I am running your 0.27.0 release on node v15.10.0. Example files: [Markdown.zip](https://github.com/DavidAnson/markdownlint/files/6068805/Markdown.zip) Thanks for any feedback!
kerem closed this issue 2026-03-07 20:05:09 +03:00
Author
Owner

@DavidAnson commented on GitHub (Mar 2, 2021):

From my phone:

<!-- gh-comment-id:789035718 --> @DavidAnson commented on GitHub (Mar 2, 2021): From my phone: - This is an issue for: https://github.com/igorshubovych/markdownlint-cli - Could you try `--config ./markdownlint.yml`?
Author
Owner

@lra commented on GitHub (Mar 2, 2021):

Could you try --config ./markdownlint.yml?

I did, same issue. Moving the config file to .markdownlint.yaml in the current folder fixes the issue.

<!-- gh-comment-id:789105505 --> @lra commented on GitHub (Mar 2, 2021): > Could you try --config ./markdownlint.yml? I did, same issue. Moving the config file to `.markdownlint.yaml` in the current folder fixes the issue.
Author
Owner

@DavidAnson commented on GitHub (Mar 2, 2021):

Please try `v0.27.1', thanks, and sorry for the trouble!

<!-- gh-comment-id:789137728 --> @DavidAnson commented on GitHub (Mar 2, 2021): Please try `v0.27.1', thanks, and sorry for the trouble!
Author
Owner

@subwaystation commented on GitHub (Mar 2, 2021):

Sorry for reporting in the wrong repository. Thanks for the quick fix @DavidAnson !!!
It works :)

<!-- gh-comment-id:789148182 --> @subwaystation commented on GitHub (Mar 2, 2021): Sorry for reporting in the wrong repository. Thanks for the quick fix @DavidAnson !!! It works :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2162
No description provided.