scripts/check_broken_links.py has no tests (0% coverage)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read scripts/check_broken_links.py and compare its structure with the other script tests. Create tests/test_check_broken_links.py using temporary directory trees to cover link resolution, ignored links, and the reported exit code and message format. Done means tests catch broken-link regressions and provide at least 85% line coverage for the script.
Written by the indexing model from the issue text.
Description
Where: scripts/check_broken_links.py, a new tests/test_check_broken_links.py.
Current gap: running the fast suite with --cov=scripts reports 0% for scripts/check_broken_links.py (106 statements): no test file imports it, although it runs in make lint, the lint workflow and the pre-commit hook, and has already needed fixes (a misspelled folder and a ../ bug in the explainer link resolver). A regression in it could silently stop catching broken links.
Repro: python3 -m pytest tests -q -m "not slow" --cov=scripts --cov-report=term | grep check_broken_links
Suggested approach: write tests against a temporary directory tree: a relative link that resolves, one that does not, a link with an anchor, a link to a directory, an external URL (ignored), a link inside a fenced code block (ignored if that is the intent), and the exit code and message format. Load the script with importlib.import_module("scripts.check_broken_links"), as the other script tests do.
Done when: the module has at least 85% line coverage from tests that fail if the script stops reporting a broken link.
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 78
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/Fair-Code
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
11 explainer page titles are longer than 65 characters (up to 99) and get cut in search resultsOpenenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
khuisman/mcp-gee-sweet#1165 ·
Maintainers usually reply within 1 day
-
area: frontend bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
snapotter-hq/SnapOtter#3770 ·
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw#181212 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug raised-by:verifier
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
medici-finance/assay#4177 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
autowarefoundation/autoware_carla_scenario#500 ·
Maintainers usually reply within 1 day