github-action-markdown-link-check
github-action-markdown-link-check copied to clipboard
Action checks `node_modules` directories unexpectedly
trafficstars
with the following config:
- name: Check for broken Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
folder-path: 'crates, installers'
file-path: './README.md'
i get errors for broken links in node_modules README files that I cannot control.
In my logs I see this:
+ find crates installers -name '*.md' -not -path './node_modules/*' -exec markdown-link-check '{}' -q -v ';'
+ set +x
+ find . -type f '(' -wholename ./README.md ')' -not -path './node_modules/*' -exec markdown-link-check '{}' -q -v ';'
+ set +x
=========================> MARKDOWN LINK CHECK <=========================
FILE: crates/sputnik/README.md
0 links checked.
FILE: crates/timber/README.md
0 links checked.
FILE: crates/robot-panic/README.md
1 links checked.
FILE: installers/npm/README.md
20 links checked.
FILE: installers/npm/node_modules/yallist/README.md
4 links checked.
FILE: installers/npm/node_modules/wcwidth/Readme.md
5 links checked.
FILE: installers/npm/node_modules/wcwidth/docs/index.md
[✖] http://www.unicode.org/unicode/reports/tr11/ → Status: 404
4 links checked.
ERROR: 1 dead links found!
[✖] http://www.unicode.org/unicode/reports/tr11/ → Status: 404
FILE: installers/npm/node_modules/minimatch/README.md
2 links checked.
FILE: installers/npm/node_modules/wrappy/README.md
0 links checked.
FILE: installers/npm/node_modules/clone/README.md
[✖] http://oranlooney.com/functional-javascript/ → Status: 404
10 links checked.
ERROR: 1 dead links found!
[✖] http://oranlooney.com/functional-javascript/ → Status: 404
FILE: installers/npm/node_modules/brace-expansion/README.md
16 links checked.
FILE: installers/npm/node_modules/prettier/README.md
[✖] CONTRIBUTING.md → Status: 400 [Error: ENOENT: no such file or directory, access '/github/workspace/installers/npm/node_modules/prettier/CONTRIBUTING.md'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/github/workspace/installers/npm/node_modules/prettier/CONTRIBUTING.md'
}
13 links checked.
ERROR: 1 dead links found!
[✖] CONTRIBUTING.md → Status: 400
FILE: installers/npm/node_modules/rimraf/README.md
10 links checked.
FILE: installers/npm/node_modules/rimraf/CHANGELOG.md
0 links checked.
FILE: installers/npm/node_modules/fs.realpath/README.md
0 links checked.
FILE: installers/npm/node_modules/follow-redirects/README.md
20 links checked.
FILE: installers/npm/node_modules/minizlib/README.md
3 links checked.
FILE: installers/npm/node_modules/glob/changelog.md
0 links checked.
FILE: installers/npm/node_modules/glob/README.md
[✖] logo/glob.png → Status: 400 [Error: ENOENT: no such file or directory, access '/github/workspace/installers/npm/node_modules/glob/logo/glob.png'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/github/workspace/installers/npm/node_modules/glob/logo/glob.png'
}
[✖] oh-my-glob.gif → Status: 400 [Error: ENOENT: no such file or directory, access '/github/workspace/installers/npm/node_modules/glob/oh-my-glob.gif'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/github/workspace/installers/npm/node_modules/glob/oh-my-glob.gif'
}
12 links checked.
ERROR: 2 dead links found!
[✖] logo/glob.png → Status: 400
[✖] oh-my-glob.gif → Status: 400
FILE: installers/npm/node_modules/tar/README.md
[✖] ./benchmarks → Status: 400 [Error: ENOENT: no such file or directory, access '/github/workspace/installers/npm/node_modules/tar/benchmarks'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/github/workspace/installers/npm/node_modules/tar/benchmarks'
}
2 links checked.
ERROR: 1 dead links found!
[✖] ./benchmarks → Status: 400
FILE: installers/npm/node_modules/tar/CHANGELOG.md
0 links checked.
FILE: installers/npm/node_modules/inflight/README.md
0 links checked.
FILE: installers/npm/node_modules/axios/lib/helpers/README.md
0 links checked.
FILE: installers/npm/node_modules/axios/lib/core/README.md
0 links checked.
FILE: installers/npm/node_modules/axios/lib/adapters/README.md
0 links checked.
FILE: installers/npm/node_modules/axios/README.md
80 links checked.
FILE: installers/npm/node_modules/axios/UPGRADE_GUIDE.md
5 links checked.
It sure looks like the action is trying to exclude node_modules by default, but it appears that if an npm package is not quite at the root, the ./node_modules only looks for a top level directory, when they could most definitely be nested.
Please let me know if there's a workaround or any other information I can help to provide!