-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
C/C++ Linting Meta Issue #3276
Comments
I pushed a commit to disable |
Although mentioned in the README - for others who may have missed it - if you're having issues try looking at
This command will show which executable's are invoked by ALE, their output, and what arguments were given. |
@dcousens do you mind taking a look at my
My [
{
"directory": "C:/path/to/workspace/",
"file": "C:/path/to/entrypoint.cc",
"arguments": [
"x86_64-w64-mingw32-gcc",
"-IC:/path/to/workspace/src",
"-IC:/msys64/mingw64/include",
"-O0", "-DDEBUG", "-ggdb", "-Wall", "-fno-omit-frame-pointer", "-mms-bitfields",
"-IC:/path/to/gstreamer-1.20.2/1.0/mingw_x86_64/include/gstreamer-1.0",
... I also put in my user config CompileFlags: # Tweak the parse settings
Add:
- "-IC:/path/to/gstreamer-1.20.2/1.0/mingw_x86_64/include/gstreamer-1.0"
Yet, no includes are not found in
Here is my clangd output (`:CocCommand workspace.showOutput`)
FWIW my |
In the former case, my
In the latter case it shows:
Note that in the former, the path to the Again, |
There are always issues reported because detecting the correct flags to use for linting C and C++ files is nearly impossible to do well for all projects. The
g:ale_c_parse_compile_commands
option has now been enabled by default, so ALE can detect flags from the output ofcompile_commands.json
files by default. I have updated the FAQ, and you should try usingcompile_commands.json
files in your projects.People also have issues now and then with parsing weird C or C++ errors, and it's hard to fix one thing without breaking another.
This issue will collect generally any issue relating to C/C++ linting, in an attemp to make C/C++ linting better as a whole, by default.
Known Issues
.h
/.hpp
files don't usecompile_commands.json
files. Open PR here: Allow headers to participate in the project. #2919clangtidy
treats.h
as C headers. Open PR here: clangtidy treat .h files as C++ when g:cpp_clangtidy_h_is_hpp #2742-fstack-usage
for gcc can generate weird errors. Issue raised here: can't open /dev/null.su for writing: Permission denied #3200compile_commands.json
parsing filters out@file
flags, such as those generated by bear. Open PR here: Fixes #3092 - Implement loading@file
c arguments #3178-std
in the default options replaces the-std
fromcompile_commands.json
, which causes problems with using the wrong C++ standard. Open PR here: [WIP] Avoid overriding parsed C/C++ -std=* flag #3056compile_commands.json
paths aren't resolved relative to thedirectory
for each entry. ale does not use compile_commands.json file in C++ #3307-include
isn't parsed. ALE misses -include flags in compile_commands.json #3317make -n
doesn't always give output. Use--always-make
when runningmake -n
, where possible #3247 Adds -B flag to make when parsing a makefile. #2038compile_flags.txt
if we can't parsecompile_commands.json
. Support compile_flags.txt with clang-based tools #2831Ideas for Ease of Use
cc
linter to replacegcc
andclang
Merge clang and gcc linters tocc
#3299The text was updated successfully, but these errors were encountered: