Skip to content

Markdown link check pre-commit hook doesn't allow user-defined configuration #78

@tspearconquest

Description

@tspearconquest

Describe the bug
Unable to provide my own configuration to markdown-link-check via pre-commit

To Reproduce

Expected behavior
I added the markdown-link-check hook to my .pre-commit-config.yaml, and ran pre-commit run -a but found that private links I'm trying to check give a 503. For my case, I am trying to check markdown in a private Gitlab repo. I found I can add a cookie header to the config in order to grant the tool access to check these links if I run markdown-link-check -c config.json README.md but if try to do it by adding -c config.json to the args as below in .pre-commit-config.yaml, then markdown-link-check fails to run properly and throws an error about the configuration:

  - id: markdown-link-check
    args:
    - -c config.json

So I did some checking and I found the script creates its own temp config and provides the -c flag itself to markdown-link-check, which seems to conflict with my -c flag in the args.

Nice to have

  • Terminal output
  • Screenshots

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions