jackfirth / jackfirth/resyntax

Cover the CLI's run and output paths

Open
#818 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

testing
Dominant language
Racket
Stars
70
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Follow-up to #724: the argument parsers are tested now, but cli.rkt is still at 68.6% coverage (114 missed lines) because none of the run functions are. Untested: the resyntax-run command dispatch, all of resyntax-analyze-run including the plain-text display and --output-to-file, and the fix output printers (--output-as-commit-message, --output-as-json, and most of the plain-text summary).

The existing "resyntax fix modifies files" test shows the pattern to follow: parameterize current-command-line-arguments and current-output-port, run against a temp file, and assert on the captured output. An analyze equivalent would also transitively cover the untested code snippet accessors in refactoring-result.rkt (#815) and several untested limiting branches in main.rkt.

Part of #680.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cli.rkt and find the existing “resyntax fix modifies files” test to follow its command-line, output-port, and temporary-file setup. Add coverage for the listed run, analyze, and fix output paths, including the related branches in refactoring-result.rkt and main.rkt, then run the CLI test suite and confirm the missed paths are exercised.

Written by the indexing model from the issue text.

Assessment

Domain
cli, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.