-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unnecessary error for buffers containing a main function #4
Comments
I think it is not good idea to use original Instead of that, it is better to enclose import std.stdio;
version(unittest) {}
else
void main()
{
writeln("Hello!");
}
unittest
{
assert(1+2 == 3);
} |
I close this issue because using version(!unittest) is enough to avoid this issue. |
I would still like to have logic that only adds |
You can directly modify the arguments by using
"Defining new syntax checkers" section in Flycheck website will help you to modify the arguments. |
Flags sent to dmd should not contain
-main
flag if the current buffer contains a Dmain
function.This will inhibit the unneccessary error message:
This is preferrably solved by searching for a regexp matching a D main function definition such as
int the current buffer.
Here's a somewhat relaxed Emacs-Lisp regexp that works for me
The text was updated successfully, but these errors were encountered: