Skip to content

ALL-ERRO0001 · evidence

This page continues ALL-ERRO0001 directly from its source docstring. Read its implementation.

Each finding names the declaration, the guard, and the handler that answers with nothing. The value is the number of failures the declaration throws away.

A handler that logs, returns a fallback, retries, or raises anything at all has answered the failure and is left alone. A comment is not an answer, because the run still carries on as if nothing had gone wrong, so a handler holding only a comment is reported. A binding to the throwaway name counts only when it throws away the result of a call, since _ = 3 discards no failure, and only where the language returns failures as values, because _ = risky() in Python or TypeScript drops a value while the exception carries on regardless. A pattern that binds other names beside the throwaway, such as let Some((_, rest)) = split(path), is destructuring rather than a discard and keeps the part it kept. The inert words, the throwaway name, and the languages that return failures are all settings, since a project may spell its own no-op and a language MCMR has not met yet may spell either differently. Only a callable is judged, because a guard belongs to code that runs and a type reaches every guard it owns through the callable holding it, which would otherwise report the same one twice. handlers names the words a language opens a handler clause with and failures_as_values names the languages that return failures rather than throwing them, which is what decides whether a discard binding is read at all.

  • Generalizes Ruff S110 try-except-pass. Open reference
  • Generalizes Ruff S112 try-except-continue. Open reference
  • Cites “Common Weakness Enumeration”, CWE-390, detection of error condition without action. Open reference
  • Generalizes Clippy let_underscore_must_use. Open reference
  • Cites “Effective Java”, item 77, do not ignore exceptions