Open vittorioromeo opened 7 years ago
Moreover, the files using these headers are marked as being affected as well in the explorer sidebar, and so on and so forth. This can easily spread over a significant part of the workspace, which is quite irritating.
After working for a while, lots of files are marked and I never know if these are "real" warnings or just pragma once virus spreading.
Looks like this has been sitting quite a while. Is there a way to at least disable this in the IDE?
You can disable the warning by setting "clang.cxxflags": ["-Wno-pragma-once-outside-header"]
Even when
#pragma once
is used in an header file, the plugin incorrectly reports a diagnostic mentioning that it's being used in a main file. This issue has appeared (and has been fixed) in other editor plugins making use of clang. See:https://github.com/w0rp/ale/issues/356
https://github.com/AtomLinter/linter-clang/pull/120
A workaround would simply be to check the extension of the current fail and get rid of the diagnostic if it's an header.