alexmurray / flycheck-clang-analyzer

Integrate Clang Static Analyzer with flycheck for on-the-fly static analysis in Emacs
35 stars 5 forks source link

-fcolor-diagnostics not supported #1

Closed Sarcasm closed 7 years ago

Sarcasm commented 7 years ago

Parsing the compile options does not work when -fcolor-diagnostics is present in the compilation databases.

This code try to fix this:

  :command ("clang"
        "-fno-color-diagnostics" ; don't include color in output
        "-fno-caret-diagnostics" ; don't indicate location in output
        "-fno-diagnostics-show-option" ; don't show warning group
        "--analyze"
        (eval (flycheck-clang-analyzer--get-compile-options))
            source-inplace)

However, this code adds the -fno-color-diagnostics option BEFORE the compilation database options, it should add it AFTER so that the compilation database is overriden.

alexmurray commented 7 years ago

Thanks for the tip - have confirmed the existing failure is now fixed with ee2b45fe9ff355284871adcbe013c3bc041c2cea

Sarcasm commented 7 years ago

Thanks!