You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An analyzer would be helpful for these situations, to catch them at design-time, in-context. Not worth it if they're super-temporary, though, usually, of course.
Otherwise, whenever there's a simple heuristic to follow for something, writing an analyzer is pretty darn simple. It's essentially the language syntax-aware, code-aware, compilation-aware, and various other context-aware bigger cousin of Edit -> Find with fancy output capabilities and optional fix proposals.
Also cool is that a unit test and an analyzer for the same purpose tend to share a lot of the same code or at least the same logic, so they're also easy to add post-hoc.
And if you configure the diagnostic from the analyzer to be an error, the problem never even gets as far as the unit tests, and doesn't need new tests to be written for code written after the test is written (unless you cheat and suppress it or turn it off in your environment, anyway).
Not that that means tests shouldn't still be written for stuff subjected to analyzers, of course - just a CodeQuality++ thing with lasting effects. 😄
And if you want code generation for something you have an analyzer for, the analyzer is already half of the generator.
I think there may still be cases where built-in Views are using
Viewport.Size
for things where they should be usingContentSize
.This Issue should be closed once an audit is completed any issues are fixed.
Example: The
Pulse
function inProgressBar
It should be possible to write an "All views" unit test that tests for these issues.
The text was updated successfully, but these errors were encountered: