was arguments[0] used by ALE in compile_commands.json? #4197
Replies: 6 comments
-
You probably need to use the |
Beta Was this translation helpful? Give feedback.
-
Do you mean g:ale_c_cc_executable here? yes I had it for the cross-compiler and ALEInfo showed it but it did not help, still the native gcc or clang were used to check compiler flags. I could not find other extra_options to change after reading ALE doc either. Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
I think I kind of know the root cause now: ale will use clang(or clang++) as long as they're installed and ignoring everything else for the compiler, it might be better to let ale to respect local settings(e.g. let g:ale_c_cc_executable="gcc-12") first, then use the default clang/clang++ only when there is no local settings? otherwise, local setting is only used after clang/clang++ are uninstalled. |
Beta Was this translation helpful? Give feedback.
-
still not right, I removed all clang/clang++ and ale continues to report clang related warnings...this is really strange, it never respects my ale_c_cc_executable settings, not my ale_fixers {'c':["g++"]} settings, not my Makefile/compile_commands.json's Argument[0], it just keeps using clang no matter what?! |
Beta Was this translation helpful? Give feedback.
-
even after I set g:ale_linter={"c":[]} I still got something like "drv_unknown_argument_with_suggestion: Unknown argument -fanalyzer", which is a g++ flag but clang is used here anyways. it calms down when I set g:ale_enabled=0. I checked all parent folders and nothing special there. |
Beta Was this translation helpful? Give feedback.
-
Update: I disabled coc.nvim's diagnostic display and now that clang warning is gone, it seems caused by coc, strangely disabling ALE totally also affect that, anyway I will just disable coc's diagnostic info for good(using coc for intellisense only). |
Beta Was this translation helpful? Give feedback.
-
I have a cross compiler at arguments[0] with its special flags, it seems ALE totally ignores that compiler and uses the x86 clang(or clang++) directly, thus I got lots of warnings(wrong compiler flags).
does ALE respect arguments[0], i.e. the cross-compiler used in my Makefile(that leads to compile_commands.json via compiledb -n make), my test shows it does not, it will just use clang or clang++ from the build machine on its own
Beta Was this translation helpful? Give feedback.
All reactions