Closed yaakov-h closed 3 years ago
% cat /Users/yaakov/.nuget/packages/microsoft.net.test.sdk/16.8.0/build/netcoreapp2.1/Microsoft.NET.Test.Sdk.Program.cs
// <auto-generated> This file has been auto generated. </auto-generated>
using System;
[Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode]
class AutoGeneratedProgram {static void Main(string[] args){}}
This code already has the auto-generated header, so perhaps we're not detecting it correctly?
It seems to be assuming that there will only be whitespace between the tag and end-of-line. https://github.com/WiseTechGlobal/WTG.Analyzers/blob/master/WTG.Analyzers.Utils/SyntaxTreeExtensions.cs#L62
Could probably just remove the trailing \s*$
from the regex.
We're only really concerned about code that is part of this project, not code imported by a package.
I'm not sure yet how we can detect the difference, though.