Skip to content

Conversation

@samirhssn
Copy link

Summary

Detects placeholder implementations in the two-fer exercise that throw
new Error("Please implement …") and blocks them.

Details

  • Adds a reusable hasStubThrow utility to detect stub throw patterns
  • Introduces an actionable comment to tell students to remove dead stub code
  • Integrates the check into the two-fer analyzer flow
  • All existing tests pass

Motivation

Stub throw implementations are not valid solutions but were previously allowed.
This change ensures they are caught early and feedback is clear.

@github-actions
Copy link

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Jan 12, 2026
@SleeplessByte
Copy link
Member

I'm happy to take a look at this. Could you follow the bot's instructions? I'm keen to reopen this.

@samirhssn
Copy link
Author

I’ve opened a discussion on the Exercism Community Forum as requested:

https://forum.exercism.org/t/proposal-block-stub-throw-implementations-in-two-fer-analyzer/20383

Please let me know if this proposal is approved and the PR can be reopened.

@Cool-Katt Cool-Katt reopened this Jan 12, 2026
@IsaacG
Copy link
Member

IsaacG commented Jan 12, 2026

Per the forum thread, checking for a single-line throw-function isn't helpful as the tests would fail and the analyzer would never run.

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.

4 participants