【问题标题】:Flycheck-Google-Cpplint is not Configured CorrectlyFlycheck-Google-Cpplint 配置不正确
【发布时间】:2014-03-24 00:08:55
【问题描述】:

我正在尝试在我的 emacs 中安装 flycheck-google-cpplint。但我得到这个错误:

(flycheck-mode 1)
(eval-after-load 'flycheck
  '(progn
     (require 'flycheck-google-cpplint)
     (flycheck-add-next-checker 'c/c++-cppcheck
                              'c/c++-googlelint 'append)))
(custom-set-variables
   '(flycheck-googlelint-verbose "3")
   '(flycheck-googlelint-filter "-whitespace,+whitespace/braces"))

但这不起作用。我收到以下错误:

Error: (user-error "Configured syntax checker c/c++-googlelint cannot be used") 

我不知道为什么。我安装了 cpplint,如果我从命令行使用它,它工作正常。有什么建议吗?

【问题讨论】:

    标签: emacs flycheck cpplint


    【解决方案1】:

    flycheck-google-lint 使用 cpplint。您必须告诉 emacs 在哪里可以找到 cpplint.py 可执行文件才能运行语法检查。

    你可以找到cpplint文件here

    然后,您需要将其添加到您的 init emacs 文件中:

    (custom-set-variables
     '(flycheck-c/c++-googlelint-executable "/path/to/cpplint.py"))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-12
      • 2017-10-07
      • 1970-01-01
      • 2022-06-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多