📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

Your build has 40 analyser warnings and the team ignores them. Should you turn on TreatWarningsAsErrors tomorrow?

Junior Theory Beginner

🎯 Key points

  • Agree with the team which rules matter first
  • Fix or suppress existing hits with a written justification
  • Promote those specific rules to error so new code can't add them
  • Turn on TreatWarningsAsErrors from day one for new projects, and for old ones once they reach zero
  • Ignored warnings are hidden technical debt: real bugs (null, disposal) sit among the noise
  • Avoid blanket NoWarn; a short warning list keeps everyone accountable for new warnings

⏱ 30-second answer

Not across the board. First agree which rules matter, fix or suppress the existing hits, then make those rules errors (in .editorconfig or with WarningsAsErrors) so new code can't add them. Turning everything into errors at once blocks delivery and pushes people to blanket NoWarn. Once the count is zero, TreatWarningsAsErrors in CI keeps it there.

🔍 What the interviewer is checking

Checks judgement about rolling out enforcement without stopping the team

↩ Usually asked after

More in Static Analysis

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me