-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support for compilation database #930
Comments
D-Scanner doesn't currently properly expose the import path setting, although it is used for some checks. However it fails even including phobos on its own and also explicitly hides the warnings that show that your import paths are not configured properly, to not break compatibility with people's projects that would suddenly start giving linter warnings just after upgrading the tool and not having the newly exposed old feature configured. So it would first be a good idea to properly expose the import paths / dsymbol index through the D-Scanner API (for serve-d to manipulate) and then also include code to automatically include the default import paths for the current / user specified compiler that also works in the standalone version. A lot of this work, including compilation database support and extended linter things, are already implemented in serve-d, however it's not possible to run the improved linting standalone for CI output. |
Some build systems (bazel, meson, ..) can generate compilation database, that contain information about import directories.
For D code, such file looks like that :
Would it be possible to add an option
--compile-database
that could automatically resolve imports from compilation database ?I might do a PR if you're ok with the concept.
The text was updated successfully, but these errors were encountered: