Skip to content

Add docs_pages lint test - #4475

Open
erikrikarddaniel wants to merge 3 commits into
nf-core:devfrom
erikrikarddaniel:lint-docs-pages
Open

erikrikarddaniel wants to merge 3 commits into
nf-core:devfrom
erikrikarddaniel:lint-docs-pages

Conversation

@erikrikarddaniel

@erikrikarddaniel erikrikarddaniel commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description

Closes #4474.

The website renders a page in docs/ only for usage.md, output.md, or files under docs/usage/ and docs/output/. A page anywhere else renders on GitHub, where docs get reviewed, and 404s on the website, with nothing warning the author. nf-core/metatdenovo shipped docs/large_datasets.md that way and it was unreachable for its entire life (nf-core/metatdenovo#493).

This adds a docs_pages lint test that names the move that would fix it:

Documentation page will not be rendered on the website: `docs/large_datasets.md`.
Move it to `docs/usage/large_datasets.md` to publish it as a sub-page of the usage section.

A warning, not a failure: about twenty of the 144 active pipelines keep internal working documents in docs/. Those are silenced per file in .nf-core.yml:

lint:
    docs_pages:
        - docs/implementation_design.md

docs/README.md, docs/CONTRIBUTING.md and docs/images/ are skipped without configuration, and existing docs/usage/ and docs/output/ pages pass unchanged.

The check keys on the rule as documented rather than the website's substring match on the path, so docs/my_usage_notes.md is flagged even though the site publishes it today by coincidence. Seven new tests, including that case.

Companion PR: nf-core/website#4409 corrects the specification, which currently promises these pages are rendered. nf-core/website#4408 has the survey behind the numbers above.

🤖 Generated with Claude Code

erikrikarddaniel and others added 2 commits September 19, 2026 08:25
The nf-core website generates a page for a markdown file in docs/ only if it
is docs/usage.md or docs/output.md, or lives under docs/usage/ or
docs/output/. A page placed anywhere else renders correctly on GitHub, where
it is written and reviewed, and 404s on the website, with nothing to say so.

Warns rather than fails, since a pipeline may keep a working document in
docs/ on purpose; those can be listed under docs_pages in .nf-core.yml.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LydWahEnWZexTULEub5bfX
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LydWahEnWZexTULEub5bfX
@codecov

codecov Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.25%. Comparing base (d91668e) to head (23c6a29).

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The suffix filter was untested in both directions, so it could have been
wrong either way without a test noticing.

Dropping the docs/ existence guard: glob on a missing directory already
returns nothing, so the early return never did anything.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LydWahEnWZexTULEub5bfX

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant