{"canonical_url":"https://engineer.company/portfolio/enabled-every-linter-rule-as-an-error/","content_markdown":"# Enabled every linter rule as an error\n\nSelected every rule the Python linter has as an error, working through 1,815 findings to reach zero, with each of the few exemptions carrying a written reason and two of them backed by a checker instead of a comment.\n\nSeptember 2026\n\n**Situation.** Most projects pick a comfortable subset of their linter's rules, and the subset is chosen by whichever rules were quiet on the day it was configured. That makes the configuration a record of the code's existing habits rather than a standard the code is held to, and every rule left off is a class of defect nobody will ever be told about.\n\n**Task.** The default had to be inverted — every rule the tool implements enabled as an error — and the resulting backlog worked to zero rather than negotiated down by turning rules back off.\n\n**Action.** Selecting the complete rule set produced 1,815 findings on first run. They were worked through by category rather than by file, because the categories tell you something: unused arguments and shadowed builtins are noise, but the security category, the mutable‑default category and the exception‑handling category each pointed at real behaviour. Genuine incompatibilities exist — a formatter and a linter can disagree about the same line, and a few rules contradict the project's own deliberate choices — and each of the small number of exemptions carries a written reason at the point of exemption saying what the rule wanted and why this code does otherwise. Two of them go further and are backed by a check rather than a comment, so the exemption cannot quietly widen: the rule is off, and a test asserts the specific property the rule would have enforced. Type checking runs in strict mode alongside it, which is a separate and harder standard, and it is the one that caught defects the linter could not see because they are about what a value is rather than how it is written.\n\n**Result.** The linter runs at full strength with zero findings, and every deviation is documented at the line where it is taken. The cost is real and worth naming: the strictest setting produces findings that are genuinely not worth acting on, and someone has to make that judgement 1,815 times rather than once.\n\n---\n\n- Role: Python Engineer\n- Categories: [DevOps](https://software.engineer.company/categories/devops/), [Automation \u0026 CI/CD](https://software.engineer.company/categories/automation/), [Testing \u0026 QA](https://software.engineer.company/categories/testing/), [Python](https://software.engineer.company/categories/python/), [Documentation](https://software.engineer.company/categories/documentation/)\n- Services: [Backend \u0026 API Development](https://software.engineer.company/services/backend-development/), [DevOps \u0026 CI/CD Automation](https://software.engineer.company/services/devops-cicd/), [Technical Leadership \u0026 Consulting](https://software.engineer.company/services/technical-leadership/)\n\n\u003chttps://engineer.company/portfolio/enabled-every-linter-rule-as-an-error/\u003e\n","date_modified":"2026-10-20T21:59:50Z","description":"The linter runs at full strength with zero findings, and every deviation is documented at the line where it is taken.","formats":{"gemtext":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/index.gmi","gopher":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/gophermap","html":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/","json":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/index.json","markdown":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/index.md","pdf":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/index.pdf"},"kind":"page","language":"en","title":"Enabled every linter rule as an error","url":"https://software.engineer.company/portfolio/enabled-every-linter-rule-as-an-error/","version":1}