Skip to content

test: improve test coverage from 65% to 99%#5

Merged
GeiserX merged 1 commit into
mainfrom
test/improve-coverage
Apr 24, 2026
Merged

test: improve test coverage from 65% to 99%#5
GeiserX merged 1 commit into
mainfrom
test/improve-coverage

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented Apr 24, 2026

Summary

  • Add 19 targeted tests covering all previously untested code paths in lint.py
  • Coverage improvement: 65% -> 99% (only the if __name__ guard line remains uncovered)
  • No production code changes

Tests added

  • Lint disable/enable block handling and ToC entry collection
  • ToC vs section mismatch detection
  • Subsection (###) alphabetical order reset
  • Unparseable entry error reporting
  • Description validation: missing description, starts with project name
  • Custom tag badge requirement (missing, clickable present, plain present)
  • main() function: file not found, clean exit, error output, all env var overrides (INPUT_ALLOWED_HOSTS, INPUT_REQUIRE_BADGES, INPUT_BADGE_TYPES, INPUT_REQUIRE_CUSTOM_TAGS, INPUT_CHECK_ALPHABETICAL), line-0 error formatting

Test plan

  • All 48 tests pass (python3 -m pytest --cov=lint --cov-report=term-missing)
  • Coverage: 99% (152 stmts, 1 miss — line 253 if __name__)
  • No production code modified

Add 19 targeted tests covering all previously untested paths:
- lint disable/enable block handling
- ToC entry collection and mismatch detection
- subsection alphabetical order reset
- unparseable entry error reporting
- description validation (missing, starts with project name)
- custom tag badge requirement checking
- main() function: env var overrides, error output, exit codes
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@GeiserX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 43 minutes and 18 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 43 minutes and 18 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2bee5a74-0556-4328-846e-78cca01ee0b4

📥 Commits

Reviewing files that changed from the base of the PR and between 51aec1e and 2bfea26.

📒 Files selected for processing (1)
  • tests/test_lint.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/improve-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@GeiserX GeiserX merged commit 8b79793 into main Apr 24, 2026
5 checks passed
@GeiserX GeiserX deleted the test/improve-coverage branch April 24, 2026 15:30
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