[英]flymake-google-cpplint-filter or linelength does not seem to take hold on my emacs file
我在emacs中安裝了以下軟件包。24 flymake-google-cpplint是已安裝的軟件包。
Status: Installed in `/home/myname/.emacs.d/elpa/flymake-google-cpplint-20140205.525/'.
Version: 20140205.525
在我的emacs中,我有以下內容,
; start flymake-google-cpplint-load
; let's define a function for flymake initialization
(defun my:flymake-google-init ()
(require 'flymake-google-cpplint)
(custom-set-variables
'(flymake-google-cpplint-command "/usr/local/bin/cpplint")
'(flymake-google-cpplint-verbose "3")
'(flymake-google-cpplint-linelength "120")
'(flymake-googlelint-filter "-whitespace/line_length"))
(flymake-google-cpplint-load)
)
(add-hook 'c-mode-hook 'my:flymake-google-init)
(add-hook 'c++-mode-hook 'my:flymake-google-init)
google-cpplint運行正常,但不是過濾掉空格/ line_length,而是在長行上以及超過80個字符的行上發送cpplint仍然消息; 盡管我將其設置為警告120個字符。
我已經重啟emacs很多次了。 並且還嘗試了MX load-file RET
並加載了~/.emacs
我在這里錯過了一步嗎? 我是否需要更改cpplint.py或flymake-google-cpplint.el中的某些內容才能使更改生效? 謝謝
您不應該替換:
9: '(flymake-googlelint-filter "-whitespace/line_length"))
通過
9: '(flymake-google-cpplint-filter "-whitespace/line_length"))
?
參考: https : //github.com/senda-akiha/flymake-google-cpplint/blob/master/flymake-google-cpplint.el
我有同樣的問題。 我的解決方法是只編輯二進制文件以使用正確的標志調用cpplint。 我添加了一個可執行文件:
#!/usr/bin/env bash
/usr/local/bin/cpplint --linelength=120 "$@"
作為〜/ .emacs.d / cpplint並從我的〜/ .emacs中引用
(defun my:google-cpp-lint-init ()
(require 'flymake-google-cpplint)
(custom-set-variables
'(flymake-google-cpplint-command "~/.emacs.d/cpplint")
)
(flymake-google-cpplint-load)
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.