Skip to content

Bug: Unreachable code branch in geo_suite.R #218

@dshkol

Description

@dshkol

Description

In R/geo_suite.R around lines 54-66, there is a duplicate condition in an if-else chain that makes the second branch unreachable:

if (census_year=="2021") {
    # ...code for 2021...
} else if (census_year=="2021") {  # BUG: Same condition!
    # This branch can NEVER execute
}

Expected Behavior

The else-if branch should have a different condition (likely for a different census year).

Suggested Fix

Review the intended logic and determine what year the else-if branch was supposed to handle. Likely this was intended for future expansion to support additional census years.

Impact

Low - the dead code doesn't cause errors but represents incomplete logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions