UmbrellaDocs / linkspector

Uncover broken links in your content.
Apache License 2.0
61 stars 9 forks source link

Check succeeds if no configuration file is present #24

Closed marcindulak closed 4 months ago

marcindulak commented 7 months ago

The example below uses docker https://github.com/UmbrellaDocs/linkspector/pull/23

  1. build the image of the latest linkspector from source
    git clone https://github.com/UmbrellaDocs/linkspector
    cd linkspector
    docker build --build-arg LINKSPECTOR_PACKAGE= -t umbrelladocs/linkspector .
  2. run linkspector check on an empty directory
    mkdir empty
    echo '[linkspector](https://github.com/UmbrellaDocs/linkspector-missing)' > empty/test.md
    docker run --rm -it -v $PWD/empty:/app --name linkspector umbrelladocs/linkspector bash -c 'linkspector check'

Output

⠋ Configuration file not found. Using default configuration.
ENOENT: no such file or directory, open '.gitignore'
✨ Success: All hyperlinks in the specified files are valid.

A failure would rather be expected

⠋ Configuration file not found. Using default configuration.
🚫 test.md, https://github.com/UmbrellaDocs/linkspector-missing, 404, 1, null
❌ Error: Some links in the specified files are not valid.