• ddh@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    As your future colleague wondering what the hell that variable is for, thanks Go.

    • Willem@kutsuya.dev
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      I prefer for it to be just a warning so I can debug without trouble, the build system will just prevent me from completing the pull request with it (and any other warning).

    • ennemi [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      If only there was some way the compiler could detect unused variable declarations, and may be emit some sort of “warning”, which would be sort of like an “error”, but wouldn’t cause the build to fail, and could be treated as an error in CI pipelines