On Sunday, 26 November 2017 at 10:15:05 UTC, Manuel Maier wrote:
On Monday, 30 October 2017 at 22:22:42 UTC, Bastiaan Veelo
wrote:
[...] Unlike linters that are based on DScanner, it actually
invokes dmd on the file that is being edited, as you edit.
[...]
I just tried the plugin and it seems to work very well! Thanks
for the good work.
Thanks.
Have you considered invoking dub instead of dmd if there's a
dub.json/.sdl file? I imagine when people use
"preBuildCommands" to generate code, for example, the linter
might report false positives. Same goes for custom D versions
(e.g. `version(Have_foo) { ... }`).
No I haven't considered using dub. Does dub allow the processing
of a single file from the project without generating code? Note
that you don't want to build the whole project upon every
activation of the linter, because of speed but also because of
errors that do not apply to the file in the current view.
There's also the --single feature of dub:
https://code.dlang.org/advanced_usage Such files may not work
correctly with this linter at this time I presume.
I don't see why not?
All in all they way this plugin works is a great idea! The more
it knows about the full commandline of the resulting dmd
invocation, the more accurate it is.
If you have a case where it isn't sufficient, I am interested to
see how it can be improved. You can experiment with it as
explained here:
https://forum.dlang.org/post/zugbovfvfviapcjqd...@forum.dlang.org