This project is read-only.

Error in Linq Queries?

Jan 9, 2011 at 5:54 PM

Hey there,

I have a rather long linq query like this:

var polygons = (from polygonObject in polygonsArray
                            let polygonDeserializerSettings = new JsonSerializerSettings
                                    Error = delegate(object sender, ErrorEventArgs args)
                                            args.ErrorContext.Handled = true;
                                    Converters = { new PolygonConverter() }
                                    polygonObject.ToString(), polygonDeserializerSettings)).ToList();

Now in this case, StyleCop complains with: SA1513: Statements or elements wrapped in curly brackets must be followed by a blank line.

Fine by me. If i add a line between the closing bracket and the select, I now get another warning: SA1102: The query clause must begin on the line after the previous clause, with no blank lines in between.
.. so which one is it? Either way I get a SA Warning. Is this wanted/expected or a StyleCop bug?

Jan 10, 2011 at 9:35 AM
Edited Jan 10, 2011 at 9:35 AM

Hey there,

Best regards,
Oleg Shuruev

Jan 10, 2011 at 10:04 AM

Hi Oleg,

ahh ok - voted on those two issues.