summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2018-01-03 16:06:01 +0100
committerJoel Klinghed <the_jk@opera.com>2018-01-03 16:06:01 +0100
commitfa3bb015b179c40bf9d11576fbd85d584881dd7a (patch)
treebd5810e463034cff8581b3b364e1767e996bb0c6
parenta652ae19f21b17ecbc27917d1adda2abc36a40d3 (diff)
Improve flycheck rules for both ofa and mini
-rw-r--r--emacs-stark46
1 files changed, 29 insertions, 17 deletions
diff --git a/emacs-stark b/emacs-stark
index 301ff25..4f88ab0 100644
--- a/emacs-stark
+++ b/emacs-stark
@@ -262,7 +262,6 @@
(add-hook 'c++-mode-hook
(lambda()
- (make-local-variable 'flycheck-clang-language-standard)
(setq flycheck-clang-language-standard "c++11")
(c-set-style "default c++")
;; Chromium hook
@@ -286,32 +285,45 @@
flycheck-clang-warnings (list "no-unused-parameter")
flycheck-clang-include-path (list base (concat base "/../../chromium/src")
(concat base "/../../chromium/src/third_party/re2/src")
+ (concat base "/../../chromium/src/google/re2/src")
+ (concat base "../../chromium/src/third_party/googlemock/src/googlemock/include")
+ (concat base "../../chromium/src/third_party/googletest/src/googletest/include")
(concat base "/../../chromium/src/out_gradle/BetaArm7Debug/gen")
(concat base "/../../chromium/src/out_gradle/BetaArm7Release/gen"))))
(require 'google-c-style)
(c-add-style "Google" google-c-style t))))
+(make-variable-buffer-local 'flycheck-android-java-checkstyle-jar)
+
;; Opera Java hook
(add-hook 'java-mode-hook
(lambda()
+ (require 'google-c-style)
+ (google-set-c-style)
+ (setq c-file-style "Google")
+ (c-set-offset 'arglist-intro '++)
+ (c-set-offset 'arglist-cont nil)
+ (c-set-offset 'arglist-cont-nonempty '++)
+ (setq indent-tabs-mode nil)
+ (setq c-basic-offset 4)
+ (setq flycheck-android-java-checkstyle-path
+ "tools/checkstyle"
+ flycheck-android-java-checkstyle-config
+ "checkstyle-config-android.xml"
+ flycheck-android-java-checkstyle-properties
+ "checkstyle.properties")
+
+ ;; ofa hook
+ (when (and buffer-file-name
+ (string-match "/mobile/mobile/" buffer-file-name))
+ (require 'flycheck-android-experimental)
+ (setq flycheck-android-java-checkstyle-jar
+ "../../chromium/src/third_party/checkstyle/checkstyle-8.0-all.jar"))
+ ;; mini hook
(when (and buffer-file-name
- (string-match "/opera/head" buffer-file-name))
+ (string-match "/mobile/android/" buffer-file-name))
(require 'flycheck-android-experimental)
(setq flycheck-android-java-checkstyle-jar
- "../../chromium/src/third_party/checkstyle/checkstyle-7.6.1-all.jar"
- flycheck-android-java-checkstyle-path
- "tools/checkstyle"
- flycheck-android-java-checkstyle-config
- "checkstyle-config-android.xml"
- flycheck-android-java-checkstyle-properties
- "checkstyle.properties")
- (require 'google-c-style)
- (google-set-c-style)
- (setq c-file-style "Google")
- (c-set-offset 'arglist-intro '++)
- (c-set-offset 'arglist-cont nil)
- (c-set-offset 'arglist-cont-nonempty '++)
- (setq indent-tabs-mode nil)
- (setq c-basic-offset 4))))
+ "../../chromium/src/third_party/checkstyle/checkstyle-6.5-all.jar"))))
;;;