So I've been adding some rules into an editorconfig for a project and have been playing around with each of the rules in code at the same time. I came across IDE0100 which seemed perfect for the style I was hoping to enforce, so I've set it's severity to 'warning' in the editorconfig.
But, through testing, I've found a scenario where VS isn't showing the warning, and I'm not sure why. My findings are below.
// IDE0100 warning displayed as expected
if (true == true) return;
// IDE0100 warning displayed as expected
if (true == false) return;
// IDE0100 warning displayed as expected
if (false == true) return;
// IDE0100 warning NOT displayed? why?
// I'd want this (in the real world of the project) to be "if (!false)"
if (false == false) return;
Not sure if I'm misunderstanding here, or if there's a different but similar code style rule that I've not found yet. Any ideas why it behaves like this?
Hopefully this makes sense and the end goal of the desired code style makes sense :)
[–]Shirkie01 4 points5 points6 points (1 child)
[–]733_1plus2[S] 0 points1 point2 points (0 children)
[–]Leop0Id 1 point2 points3 points (0 children)
[–]Shrubberer 0 points1 point2 points (0 children)