scivision / linkchecker-markdown

Python asyncio + aiohttp Markdown *.md URL link checker: 10,000 files/second
MIT License
32 stars 18 forks source link

Local file check broken #21

Open Flamefire opened 3 years ago

Flamefire commented 3 years ago

The local file check doesn't really work well for us. Please check the following suggestions below:

First the following line is superflous and actually has the expanduser at the wrong place breaking the passing of ~/... paths: https://github.com/scivision/linkchecker-markdown/blob/bfbe3ade840eed5b33f03433f2147f6bbf36dc35/src/linkcheckmd/base.py#L51

Then our markdownfiles have relative links like [Request](req_resources.md) which are completely ignored (reported as "not found") by the linkchecker.

The check at https://github.com/scivision/linkchecker-markdown/blob/bfbe3ade840eed5b33f03433f2147f6bbf36dc35/src/linkcheckmd/base.py#L63-L64 and https://github.com/scivision/linkchecker-markdown/blob/bfbe3ade840eed5b33f03433f2147f6bbf36dc35/src/linkcheckmd/base.py#L68-L69 is needlessly duplicated. However I don't understand its purpose: Why disallow links with slashes and dots, e.g. the one above?

Why doesn't https://github.com/scivision/linkchecker-markdown/blob/bfbe3ade840eed5b33f03433f2147f6bbf36dc35/src/linkcheckmd/base.py#L71-L75 check for (path / stem).is_file()?

And finally: The list is only printed, but does not affect the return code. See https://github.com/scivision/linkchecker-markdown/blob/bfbe3ade840eed5b33f03433f2147f6bbf36dc35/src/linkcheckmd/base.py#L32

lhanson commented 2 years ago

Relative links being ignored is a dealbreaker for me.