Skip to content

New warnings when checking relative filesystem links #2082

@jcharaoui

Description

@jcharaoui

Using a recent build (post-0.23 release) I noticed these new warnings which now flood the lychee output:

[WARN] Removing trailing slash from file URL: file:///app/public/get-in-touch/bug-or-feedback/. This lets the URL match both files and folders. In future, a file URL ending in / might fail link checking if it points to a file.

The warning is generated from this command:

    lychee public --root-dir public --include-fragments --offline

This seems to occur because relative links in our HTML files all have a trailing slash. The links are crafted this way to avoid a server-side redirection from URLs without slashes.

Would it be possible to somehow toggle off this warning, since we expect trailing slashes to point at directories and not files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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