-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS1587 Comment at start of file is not placed on a valid language element #663
Comments
The comment conversion works by using anchor points. e.g. The comment comes after the start of the file, and before the identifier "MySplashScreen". Input code''' This file is copyright notice must be preserved at the top of all files
Public Class MyForm
Inherits isr.Automata.Finite.Forms.BimanualToggleForm
End Class Current output// This copyright notice must be preserved at the top of all files
namespace isr.Finite.Automata.Engines
{
public class MyForm : isr.Automata.Finite.Forms.BimanualToggleForm
{
}
} Output if I flip the heuristicnamespace isr.Finite.Automata.Engines
{
// This copyright notice must be preserved at the top of all files
public class MyForm : isr.Automata.Finite.Forms.BimanualToggleForm
{
}
} Two resolutions that come to mind to solve at least these two cases:
I'll probably try the second one and see how many tests it breaks, then retreat and have a rethink. You could imagine going arbitrarily far adding heuristics for which line is relevant. e.g. When people have used |
Regular comments (i.e., starting with a " ' ") are not expected to raise a warning. It is code comments starting with in other words converting this: to this:
is correct. Converting this: to this:
will raise the warning. |
👍 Ah yes sorry that's what I meant by "doc comments" - I've now amended it to say "XML doc comments" |
Input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: