summaryrefslogtreecommitdiff
path: root/ale_linters/cpp
AgeCommit message (Collapse)Author
2021-02-06Fix #3579 - Escape cppcheck arguments for Windowsv3.1.0w0rp
2021-01-22Fix clang-tidy ignoring compile_commands.jsonfenuks
2020-08-28Close #3325 - Apply new formatting where possiblew0rp
2020-08-20#3299 Merge gcc and clang into a cc linterw0rp
Users can easily be confused when they set some options for a C or C++ compiler, and another compiler is run with different options, which still reports errors. To remedy this, the existing `gcc` and `clang` linters have been replaced with a `cc` linter that will run either compiler. This is a breaking change for ALE v3.0.0.
2020-08-19Merge pull request #3056 from ts826848/remove-ale-std-if-already-in-GetCFlagsw0rp
[WIP] Avoid overriding parsed C/C++ -std=* flag
2020-08-10Fix #1608 - Treat .h as C++ files for C++ clang-tidyw0rp
2020-08-06fix cppcheck for 1.89+, and add column support (#3030)tsjordan-eng
* fix cppcheck for 1.89+, and add column support In cppcheck 1.89 the output changed to be more like GCC. This commit forces any version of cppcheck to output in that same format. This also allows for ALE to pick up the linter's column information * Add parameters to tests. Vader passes. * Fix c cppcheck for v1.89
2020-04-18ccls: Detect build dir and set compilationDatabaseDirectoryTomas Janousek
Fixes #2621
2020-03-17Avoid overriding parsed C/C++ -std=* flagAlex Wang
ALE appends flags from {c,cpp}_{clang,gcc}_options after those found by parsing compile_commands.json or Makefile output. If -std=* flags are present in both the ALE flags and parsed flags, the last one present (i.e., ALE's -std=* flag) will determine the mode the compiler works in. This can result in errors showing up in vim but not in the actual build or vice-versa. For example, say you have foo.cpp: #include <type_traits> int main() { return std::is_same_v<float, int>; } If cpp_clang_options contains -std=c++17 and -std=c++14 is parsed from compile_commands.json, then ALE would end up running something like: clang++ -S -x c++ -fsyntax-only -std=c++14 -std=c++17 - < foo.cpp This would result in no errors showing up in Vim, but the actual build would fail with: <stdin>:3:14: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'? return std::is_same_v<float, int>; ~~~~~^~~~~~~~~ is_same /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:872:61: note: 'is_same' declared here template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {}; ^ <stdin>:3:35: error: expected '(' for function-style cast or type construction return std::is_same_v<float, int>; ~~~~~~~~~~~~~~~~~~~~~~~~~~^ 2 errors generated. as the actual build would not have the -std=c++17 flag added by ALE. If cpp_clang_options contains -std=c++14 and -std=c++17 is parsed from compile_commands.json, then the opposite problem would occur. ALE would end up running something like: clang++ -S -x c++ -fsyntax-only -std=c++17 -std=c++14 - < foo.cpp and would show an error on line 3 of foo.cpp: [clang] No template named 'is_same_v' in namespace 'std'; did you mean 'is_same'? (fix available) The actual build, on the other hand, would succeed without any complaints. Removing -std=* from ALE's flags if it is already present in the parsed flags ensures that the wrong -std=* flag is not used. An alternative would have been to switch the order in which parsed flags and ALE flags were concatenated when producing the command to execute, but that could prevent a user from intentionally using ALE's flags to override some other flags, e.g. -W* flags to enable/disable warnings in a project whose flags are not under the developer's control. -std=* flags are also present in cuda/nvcc.vim, objc/clang.vim, objcpp/clang.vim, and vhdl/ghdl.vim, but none of those linters appear to parse compile_commands.json or `make` output.
2019-10-28Merge pull request #2700 from elebow/clangcheck-no-color-diagnosticsw0rp
clangcheck: Add -fno-color-diagnostics (closes #2188)
2019-10-17Merge remote-tracking branch 'murfalo/clangd-compile-commands'w0rp
2019-10-09Added tests for clangd compile commands dectectionMurfalo
2019-10-06Add tests for clangtidy with MakefileGreg Anders
2019-10-06Use Makefile output with clang-tidy when usefulGreg Anders
In the case where neither a build directory nor a compile_commands.json file is found, use the output of `make -n` to provide options to clang-tidy.
2019-10-03Added automatic compile-commands-dir arg to ale_cpp_clangd linterMurfalo
2019-09-26clangcheck: Add -fno-color-diagnosticsEddie Lebow
Also change to the modern --extra-arg syntax.
2019-06-08Add additional option setting for clangtidy linterJonathan Vander Mey
The existing option setting handles setting additional compile flags to pass to clang-tidy. The new option setting added here allows setting additional clang-tidy specific flags to be passed as well. Fixes #2324
2019-06-03Fix #1279 - Run cppcheck differently when modifiedChristoph Koehler
cppcheck is now run without the --project option and from the buffer's directory instead when the buffer has been modified. Saving the buffer will get results by linting the project instead.
2019-05-20Close #2359 - Find compile_commands.json in build dirs for cppcheckw0rp
2019-05-20Fix #2421 - Use compile_commands.json in build dirs to find rootsw0rp
2019-05-20Fix #2512 - Use -o /dev/null for gcc lintingw0rp
2019-04-07#2132 - Replace command_chain and chain_with with ale#command#Runw0rp
2019-02-22#2132 - Replace all uses of foo_callback with foow0rp
2019-02-06Update syntax checkingw0rp
* Line continuation characters should be on the same lines. * .vim file line indentation should be a multiple of 4.
2018-10-30Do not enable all clang-tidy checks by defaultAndreas Hollmann
2018-09-28Move ccls functions to autoload/ale/handlerYe Jingchen
Tests are kept as-is.
2018-09-26Add ccls testsYe Jingchen
2018-09-26Add ccls support for C/C++/ObjCYe Jingchen
2018-09-04Improve ALE project style checkingw0rp
* The project style linter now runs while you type. * Now the scripts for checking the project require blank lines. * Many style issues have been found and fixed.
2018-08-24Add clazy as cpp linterfenuks
2018-08-23Enabling clangd for cpp, objc and objcppBruno R. Barreyra
2018-08-09Add blank lines to conform the coding standardskodemeister
2018-08-07Use .cquery file to detect the project rootkodemeister
2018-08-02Simplify the code for most linters and tests with closuresw0rp
2018-07-30Indicate that a C compiler failed due to problems in a header filew0rp
2018-07-29Add support for parsing compile_commands.json files for C compilersw0rp
2018-07-04Make the language option for LSP linters optionalw0rp
2018-06-07#1635 - Use the project base rather than its parent for cqueryBen Falconer
2018-06-06Add the cquery LSP #1475 #1594Ben Falconer
2018-04-10Fix #1490 - Rename the g++ linter to gcc, and add an alias for the old namew0rp
2018-03-28Flawfinder for C++:christian-gibbons
Fix missing variable causing flawfinder to fail for c++
2018-03-27#1167 Use the make -n parsing for C++ compilers, and document the new optionw0rp
2018-03-10Handle flawfinder severity level (#1400)Christian-Gibbons
* Handle flawfinder severity level * Reverted code allowing Flawfinder to piggyback off of gcc's format handler * Gave Flawfinder its own format handler and made requested changes.
2018-02-25New linter: Flawfinder (#1361)Christian-Gibbons
* Flawfinder support added for C and C++ A minor modification to gcc handler was made to support flawfinder's single-line output format that does not have a space following the colon denoting the warning level. gcc handler still passes its Vader tests after this modification. * Documentation fixes * Revert documentation regression * Added Flawfinder to table of contents * Removed trailing whitespace * Follow ALE conventions better Added additional documentation and Vader tests
2018-01-02Fix #1255: Move extra clang-check args to before user optionsJonatan Olofsson
2017-07-20#782 - Do not set the build directory for clang-tidy for header files, which ↵w0rp
does not work
2017-07-17#703 Add arguments to avoid generating plist files if no build directory is ↵w0rp
detected for clang-check
2017-07-17Fix another executable callback typow0rp
2017-07-17#711 - Make the cpplint executable configurablew0rp
2017-07-17#711 - Make the clangtidy executable configurablew0rp