Remora / Remora.Results

A simple, versatile algebraic data type for C#.
GNU Lesser General Public License v3.0
15 stars 5 forks source link

Add new analyzer for unused results #13

Open pobiega opened 1 year ago

pobiega commented 1 year ago

fixes #6

As demonstrated by the unittests, it should raise diagnostics warnings for unused results returned from called methods. Tried following the remora code style, but feel free to adjust anything you find out of line.

Also feel free to reach out on the C# discord if there is anything you wish to discuss about this.

Foxtrek64 commented 1 year ago

Looks good! One small nit though is that if we wrap function/constructor calls we have historically emulated allman-style indentation. I'm not sure off the top of my head if that includes if statements but I imagine it would if just for consistency.

Rutherther commented 1 year ago

What about adding the warnings to not used IResult as well?

Nihlus commented 1 year ago

I agree with both @Foxtrek64 and @Rutherther here, otherwise things look good. Happy to merge if you fix/add those two things.