From f8dfd8c8982cf1ed16c111a71f5dfda5c00aa031 Mon Sep 17 00:00:00 2001 From: Martin Jesper Low Madsen Date: Fri, 16 Oct 2015 19:44:46 +0200 Subject: [PATCH 1/2] Add support for the extensions flag in cpplint.py --- flycheck-google-cpplint.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/flycheck-google-cpplint.el b/flycheck-google-cpplint.el index 7f766f7..0854db7 100644 --- a/flycheck-google-cpplint.el +++ b/flycheck-google-cpplint.el @@ -116,6 +116,19 @@ linelength=digits :safe #'stringp :package-version '(flycheck . "0.18")) +(flycheck-def-option-var flycheck-googlelint-extensions nil c/c++-googlelint + "The valid file extensions passed to the Google C++ lint. + +extensions=x,y,z + This is a comma separated list with allowed file extensions. The default value is + `cc, h, cpp, cu, cuh'. + + Examples: + --extensions=cc,h,cpp,cu,cuh" + :type '(string :tag "Extensions") + :safe #'stringp + :package-version '(flycheck . "0.23")) + (flycheck-define-checker c/c++-googlelint "A C/C++ style checker using google cpplint. @@ -127,6 +140,7 @@ See URL flycheck-option-comma-separated-list) (option "--root=" flycheck-googlelint-root concat) (option "--linelength=" flycheck-googlelint-linelength concat) + (option "--extensions=" flycheck-googlelint-extensions concat) source-original) :error-patterns ((warning line-start (file-name) ":" line ": " (message) line-end)) From 8defff69ba05d2d9f57c6c85afbe2cfb6bfb6391 Mon Sep 17 00:00:00 2001 From: Martin Jesper Low Madsen Date: Fri, 16 Oct 2015 19:48:49 +0200 Subject: [PATCH 2/2] Fix for minor spelling mistakes --- flycheck-google-cpplint.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flycheck-google-cpplint.el b/flycheck-google-cpplint.el index 0854db7..909bfa2 100644 --- a/flycheck-google-cpplint.el +++ b/flycheck-google-cpplint.el @@ -93,7 +93,7 @@ root=subdir ignored. Examples: - Assuing that src/.git exists, the header guard CPP variables for + Assuming that src/.git exists, the header guard CPP variables for src/chrome/browser/ui/browser.h are: No flag => CHROME_BROWSER_UI_BROWSER_H_ @@ -120,7 +120,7 @@ linelength=digits "The valid file extensions passed to the Google C++ lint. extensions=x,y,z - This is a comma separated list with allowed file extensions. The default value is + This is a comma-separated list with allowed file extensions. The default value is `cc, h, cpp, cu, cuh'. Examples: