mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
Meta: Fix Markdown linting
The new help://man links were linted incorrectly, and they're now skipped by the markdown linter, such as in the pre-commit hook
This commit is contained in:
parent
9592ba3548
commit
9ec2b379a4
Notes:
sideshowbarker
2024-07-17 21:07:04 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 9ec2b379a4
Pull-request: https://github.com/SerenityOS/serenity/pull/11829
1 changed files with 6 additions and 12 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include <AK/HashTable.h>
|
#include <AK/HashTable.h>
|
||||||
#include <AK/LexicalPath.h>
|
#include <AK/LexicalPath.h>
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
|
#include <AK/RecursionDecision.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
|
@ -25,18 +26,6 @@
|
||||||
static bool is_missing_file_acceptable(String const& filename)
|
static bool is_missing_file_acceptable(String const& filename)
|
||||||
{
|
{
|
||||||
const StringView acceptable_missing_files[] = {
|
const StringView acceptable_missing_files[] = {
|
||||||
// FIXME: Please write these manpages!
|
|
||||||
"/usr/share/man/man2/accept.md",
|
|
||||||
"/usr/share/man/man2/exec.md",
|
|
||||||
"/usr/share/man/man2/fcntl.md",
|
|
||||||
"/usr/share/man/man2/fork.md",
|
|
||||||
"/usr/share/man/man2/ioctl.md",
|
|
||||||
"/usr/share/man/man2/listen.md",
|
|
||||||
"/usr/share/man/man2/mmap.md",
|
|
||||||
"/usr/share/man/man2/mprotect.md",
|
|
||||||
"/usr/share/man/man2/open.md",
|
|
||||||
"/usr/share/man/man2/ptrace.md",
|
|
||||||
"/usr/share/man/man5/perfcore.md",
|
|
||||||
// These ones are okay:
|
// These ones are okay:
|
||||||
"/home/anon/js-tests/test-common.js",
|
"/home/anon/js-tests/test-common.js",
|
||||||
"/man1/index.html",
|
"/man1/index.html",
|
||||||
|
@ -167,6 +156,11 @@ RecursionDecision MarkdownLinkage::visit(Markdown::Text::LinkNode const& link_no
|
||||||
outln("Not checking external link {}", href);
|
outln("Not checking external link {}", href);
|
||||||
return RecursionDecision::Recurse;
|
return RecursionDecision::Recurse;
|
||||||
}
|
}
|
||||||
|
if (href.starts_with("help://")) {
|
||||||
|
// TODO: Check that the man page actually exists. (That check would also fail because we are currently referring to some nonexistent man pages.)
|
||||||
|
outln("Not checking man page link {}", href);
|
||||||
|
return RecursionDecision::Recurse;
|
||||||
|
}
|
||||||
if (href.starts_with("file://")) {
|
if (href.starts_with("file://")) {
|
||||||
// TODO: Resolve relative to $SERENITY_SOURCE_DIR/Base/
|
// TODO: Resolve relative to $SERENITY_SOURCE_DIR/Base/
|
||||||
// Currently, this affects only one link, so it's not worth the effort.
|
// Currently, this affects only one link, so it's not worth the effort.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue