diff --git a/internal/cbm/doclink_md.c b/internal/cbm/doclink_md.c index 105c58c54..0468f7275 100644 --- a/internal/cbm/doclink_md.c +++ b/internal/cbm/doclink_md.c @@ -144,24 +144,20 @@ static bool md_in_list(const char *s, size_t n, const char *const *list, bool ci /* File extensions that make a dotted token a FILE NAME. Strict: none of them * is a common member name (`.log`, `.get` and `.map` are not here). */ static const char *const MD_FILE_EXT[] = { - "py", "pyi", "js", "jsx", "mjs", "cjs", "ts", - "tsx", "mts", "cts", "go", "rs", "c", "h", - "cc", "cpp", "cxx", "hpp", "hh", "java", "kt", - "kts", "scala", "groovy", "cs", "php", "rb", "sh", - "bash", "zsh", "ps1", "md", "mdx", "rst", "adoc", - "txt", "json", "jsonc", "yaml", "yml", "toml", "ini", - "cfg", "xml", "html", "htm", "css", "scss", "sass", - "less", "vue", "svelte", "proto", "sql", "lock", "gradle", - "csproj", "sln", "fsproj", "props", "targets", "cmake", "mk", - "tf", "tfvars", "hcl", "png", "jpg", "jpeg", "gif", - "svg", "pdf", "ipynb", "dockerfile", "swift", "dart", "lua", - "pl", "pm", "ex", "exs", "erl", "clj", "hs", - "ml", "zig", "sol", "graphql", "gql", "bzl", "nix", - "plist", "env", "conf", "properties", "editorconfig", "gitignore", "npmrc", - "nvmrc", "j2", "jinja", "tmpl", "tpl", "erb", "hbs", - "mustache", "patch", "diff", "whl", "jar", "zip", "gz", - "tgz", "so", "dll", "dylib", "wasm", "service", "socket", - "timer", "mod", "sum", NULL}; + "py", "pyi", "js", "jsx", "mjs", "cjs", "ts", "tsx", "mts", "cts", "go", "rs", "c", "h", "cc", + "cpp", "cxx", "hpp", "hh", "java", "kt", "kts", "scala", "groovy", "cs", "php", "rb", "sh", + "bash", "zsh", "ps1", "md", "mdx", "rst", "adoc", "txt", "json", "jsonc", "yaml", "yml", "toml", + "ini", "cfg", "xml", "html", "htm", "css", "scss", "sass", "less", "vue", "svelte", "proto", + "sql", "lock", "gradle", "csproj", "sln", "fsproj", "props", "targets", "cmake", "mk", "tf", + "tfvars", "hcl", "png", "jpg", "jpeg", "gif", "svg", "pdf", "ipynb", "dockerfile", "swift", + "dart", "lua", "pl", "pm", "ex", "exs", "erl", "clj", "hs", "ml", "zig", "sol", "graphql", + "gql", "bzl", "nix", "plist", "env", "conf", "properties", "editorconfig", "gitignore", "npmrc", + "nvmrc", "j2", "jinja", "tmpl", "tpl", "erb", "hbs", "mustache", "patch", "diff", "whl", "jar", + "zip", "gz", "tgz", "so", "dll", "dylib", "wasm", "service", "socket", "timer", "mod", "sum", + /* built and shipped files, never a member's name (`OliveTin.exe` took the + * module stem of OliveTin.exe.manifest in a held-out audit) */ + "exe", "msi", "deb", "rpm", "dmg", "tar", "xz", "bz2", "7z", "apk", "ipa", "manifest", "csv", + "tsv", NULL}; /* File names that are files without an extension. */ static const char *const MD_SPECIAL_FILES[] = { diff --git a/tests/test_doc_links_md.c b/tests/test_doc_links_md.c index f53111a13..09212a6f1 100644 --- a/tests/test_doc_links_md.c +++ b/tests/test_doc_links_md.c @@ -216,6 +216,10 @@ TEST(doc_links_md_classify_span) { {"main.go:7-8", CBM_DOCLINK_MD_FILENAME, "main.go", NULL, 7, 8, false, false}, {"README.md", CBM_DOCLINK_MD_FILENAME, "README.md", NULL, 0, 0, false, false}, {"Makefile", CBM_DOCLINK_MD_FILENAME, "Makefile", NULL, 0, 0, false, false}, + /* a built or shipped file is a file name, never a member (`OliveTin.exe` + * took the module stem of OliveTin.exe.manifest in a held-out audit) */ + {"OliveTin.exe", CBM_DOCLINK_MD_FILENAME, "OliveTin.exe", NULL, 0, 0, false, false}, + {"app.manifest", CBM_DOCLINK_MD_FILENAME, "app.manifest", NULL, 0, 0, false, false}, {"main.rs::run", CBM_DOCLINK_MD_FILENAME, "main.rs", "run", 0, 0, false, false}, {"fastapi.routing.APIRouter", CBM_DOCLINK_MD_QUALIFIED, "fastapi.routing.APIRouter", NULL, 0, 0, false, false},