Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator] Fix MSBuild warning/error format for Visual Studio (#765)
In b858dc5 we updated `generator` warnings/errors to give line & column information in more places. However, the existing method for formatting the line & column information was wrong: // Correct C:\code\Metadata.xml(2, 6): warning BG8A04: <attr path="/api/package[@name='androidx.appcompat.widget']/class[@name='RoundRectDrawableWithShadow']"/> matched no nodes. // Incorrect C:\code\Metadata.xml(2, 6) warning BG8A04: <attr path="/api/package[@name='androidx.appcompat.widget']/class[@name='RoundRectDrawableWithShadow']"/> matched no nodes. By omitting the colon after the line & column information, Visual Studio parses the colon within `C:\` instead, resulting in: ![image](https://user-images.githubusercontent.com/179295/102400384-7500b100-3fa7-11eb-8f35-aae2a04f3a58.png) * Filename: `C` * Line number: 1 This is actually worse than what we previously had, as double-clicking it does nothing, as `C` is not a valid file on disk. Rewrite the `Report.Format()` method to be a little clearer to read and add the required colon.
- Loading branch information