Skip to content

Detect dead code from stub #165

Open

Description

@SleeplessByte

The following four placeholders are present in the stubs. They should be detected and a "must-fix" message should be added to remove the line which is now dead-code.

throw new Error('Please implement the (...) function')
throw new Error('Remove this line and implement the function')
throw new Error('Implement the (...) function')
throw new Error('Remove this statement and implement this function');

Activity

  1. IsaacG commented on Jun 24, 2025

    @IsaacG
  2. SleeplessByte commented on Jun 24, 2025

    @SleeplessByte
    Author
  3. jagdish-15 commented on Jun 25, 2025

    @jagdish-15
  4. SleeplessByte commented on Jul 4, 2025

    @SleeplessByte
    Author
  5. Cool-Katt commented on Jul 4, 2025

    @Cool-Katt
  6. SleeplessByte commented on Jul 4, 2025

    @SleeplessByte
    Author
  7. jagdish-15 commented on Jul 4, 2025

    @jagdish-15
  8. jagdish-15 commented on Jul 5, 2025

    @jagdish-15
  9. naderakhgari commented on May 6, 2026

    @naderakhgari

    Hi @SleeplessByte, I can fix this issue in PR but I think I don't have access to raise a PR. Is this still a valid issue to fix?

  10. SleeplessByte commented on May 6, 2026

    @SleeplessByte
    MemberAuthor

    Yes, ping me in the pr and i can reopen it

  11. IsaacG commented on May 6, 2026

    @IsaacG
    Member

    You can open a PR. The bot will auto-close it. If it's been previously approved, we can reopen it.

  12. bpradhan-dev commented on Sep 5, 2026

    @bpradhan-dev

    Hi @SleeplessByte!

    I was investigating this issue and noticed that isStubThrowStatement in src/analyzers/utils/extract_main_method.ts already checks for all 4 placeholder strings mentioned in the issue:

    **- 'Please implement'

    • 'Remove this line and implement'
    • 'Implement the'
    • 'Remove this statement and implement'**

    The function triggers the REMOVE_STUB_THROW essential comment when these are detected. It looks like this functionality might already be implemented. Should this issue be closed?

    Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    x:action/improveImprove existing functionality/contentx:module/analyzerWork on Analyzersx:module/concept-exerciseWork on Concept Exercisesx:module/practice-exerciseWork on Practice Exercisesx:type/codingWrite code that is not student-facing content (e.g. test-runners, generators, but not exercises)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions