From 9aa39e548e370b1a936463d11740177694b39371 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 31 Jan 2020 17:27:40 +0100 Subject: [PATCH] update flycheck --- bba.org | 2 +- .../flycheck-autoloads.el | 29 +++++++-- .../flycheck-buttercup.el | 0 .../flycheck-ert.el | 0 .../flycheck-pkg.el | 2 +- .../flycheck.el | 62 +++++++++++-------- 6 files changed, 62 insertions(+), 33 deletions(-) rename elpa/{flycheck-20191028.2247 => flycheck-20191126.2142}/flycheck-autoloads.el (90%) rename elpa/{flycheck-20191028.2247 => flycheck-20191126.2142}/flycheck-buttercup.el (100%) rename elpa/{flycheck-20191028.2247 => flycheck-20191126.2142}/flycheck-ert.el (100%) rename elpa/{flycheck-20191028.2247 => flycheck-20191126.2142}/flycheck-pkg.el (85%) rename elpa/{flycheck-20191028.2247 => flycheck-20191126.2142}/flycheck.el (99%) diff --git a/bba.org b/bba.org index bf04b449..47300a91 100644 --- a/bba.org +++ b/bba.org @@ -684,7 +684,7 @@ log-format. #+BEGIN_SRC emacs-lisp :tangle yes (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20191028.2247") + (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20191126.2142") (require 'flycheck) (add-hook 'after-init-hook #'global-flycheck-mode) (flycheck-define-checker puppet-lint diff --git a/elpa/flycheck-20191028.2247/flycheck-autoloads.el b/elpa/flycheck-20191126.2142/flycheck-autoloads.el similarity index 90% rename from elpa/flycheck-20191028.2247/flycheck-autoloads.el rename to elpa/flycheck-20191126.2142/flycheck-autoloads.el index 4a747527..37d6b72d 100644 --- a/elpa/flycheck-20191028.2247/flycheck-autoloads.el +++ b/elpa/flycheck-20191126.2142/flycheck-autoloads.el @@ -1,10 +1,12 @@ ;;; flycheck-autoloads.el --- automatically extracted autoloads ;; ;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + -;;;### (autoloads nil "flycheck" "flycheck.el" (23994 46484 331908 -;;;;;; 665000)) +;;;### (autoloads nil "flycheck" "flycheck.el" (0 0 0 0)) ;;; Generated autoloads from flycheck.el (autoload 'flycheck-manual "flycheck" "\ @@ -225,10 +227,26 @@ Use this together with the `option', `option-list' and (function-put 'flycheck-def-option-var 'doc-string-elt '4) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flycheck" '("flycheck-" "list-flycheck-errors" "help-flycheck-checker-d"))) + +;;;*** + +;;;### (autoloads nil "flycheck-buttercup" "flycheck-buttercup.el" +;;;;;; (0 0 0 0)) +;;; Generated autoloads from flycheck-buttercup.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flycheck-buttercup" '("flycheck-buttercup-format-error-list"))) + +;;;*** + +;;;### (autoloads nil "flycheck-ert" "flycheck-ert.el" (0 0 0 0)) +;;; Generated autoloads from flycheck-ert.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flycheck-ert" '("flycheck-er"))) + ;;;*** -;;;### (autoloads nil nil ("flycheck-buttercup.el" "flycheck-ert.el" -;;;;;; "flycheck-pkg.el") (23994 46484 330738 443000)) +;;;### (autoloads nil nil ("flycheck-pkg.el") (0 0 0 0)) ;;;*** @@ -236,5 +254,6 @@ Use this together with the `option', `option-list' and ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t +;; coding: utf-8 ;; End: ;;; flycheck-autoloads.el ends here diff --git a/elpa/flycheck-20191028.2247/flycheck-buttercup.el b/elpa/flycheck-20191126.2142/flycheck-buttercup.el similarity index 100% rename from elpa/flycheck-20191028.2247/flycheck-buttercup.el rename to elpa/flycheck-20191126.2142/flycheck-buttercup.el diff --git a/elpa/flycheck-20191028.2247/flycheck-ert.el b/elpa/flycheck-20191126.2142/flycheck-ert.el similarity index 100% rename from elpa/flycheck-20191028.2247/flycheck-ert.el rename to elpa/flycheck-20191126.2142/flycheck-ert.el diff --git a/elpa/flycheck-20191028.2247/flycheck-pkg.el b/elpa/flycheck-20191126.2142/flycheck-pkg.el similarity index 85% rename from elpa/flycheck-20191028.2247/flycheck-pkg.el rename to elpa/flycheck-20191126.2142/flycheck-pkg.el index 9142a884..bedc2846 100644 --- a/elpa/flycheck-20191028.2247/flycheck-pkg.el +++ b/elpa/flycheck-20191126.2142/flycheck-pkg.el @@ -1,4 +1,4 @@ -(define-package "flycheck" "20191028.2247" "On-the-fly syntax checking" +(define-package "flycheck" "20191126.2142" "On-the-fly syntax checking" '((dash "2.12.1") (pkg-info "0.4") (let-alist "1.0.4") diff --git a/elpa/flycheck-20191028.2247/flycheck.el b/elpa/flycheck-20191126.2142/flycheck.el similarity index 99% rename from elpa/flycheck-20191028.2247/flycheck.el rename to elpa/flycheck-20191126.2142/flycheck.el index 5c347d92..16c9af23 100644 --- a/elpa/flycheck-20191028.2247/flycheck.el +++ b/elpa/flycheck-20191126.2142/flycheck.el @@ -3940,7 +3940,7 @@ Return ERRORS, with in-place modifications." (while (not (eobp)) (back-to-indentation) ;; If the current line starts with sufficient whitespace, delete the - ;; indendation offset. Otherwise keep the line intact, as we might + ;; indentation offset. Otherwise keep the line intact, as we might ;; loose valuable information (when (>= (- (point) (line-beginning-position)) indent-offset) (delete-char (- indent-offset))) @@ -3955,7 +3955,7 @@ Return ERRORS, with in-place modifications." ERRORS is a list of `flycheck-error' objects. SENTINEL-MESSAGE is a regular expression matched against the error message to -determine whether the errror denotes errors from an included +determine whether the error denotes errors from an included file. Alternatively, it is a function that is given an error and shall return non-nil, if the error denotes errors from an included file." @@ -4163,12 +4163,12 @@ overlays." (flycheck-filter-overlays (overlays-in beg end))) (defun flycheck-overlay-errors-at (pos) - "Return a list of all flycheck errors overlayed at POS." + "Return a list of all flycheck errors overlaid at POS." (seq-map (lambda (o) (overlay-get o 'flycheck-error)) (flycheck-overlays-at pos))) (defun flycheck-overlay-errors-in (beg end) - "Return a list of all flycheck errors overlayed between BEG and END." + "Return a list of all flycheck errors overlaid between BEG and END." (seq-map (lambda (o) (overlay-get o 'flycheck-error)) (flycheck-overlays-in beg end))) @@ -4203,11 +4203,15 @@ overlays." (flycheck-error-level-interesting-p (get-char-property pos 'flycheck-error))) (defun flycheck-error-level-interesting-p (err) - "Check if ERR severity is >= `flycheck-navigation-minimum-level'." + "Check if ERR severity is >= `flycheck-navigation-minimum-level'. + +ERR is also interesting (the function returns true) if there are +no errors as or more severe than `flycheck-navigation-minimum-level'." (when (flycheck-error-p err) (-if-let (min-level flycheck-navigation-minimum-level) - (<= (flycheck-error-level-severity min-level) - (flycheck-error-level-severity (flycheck-error-level err))) + (or (<= (flycheck-error-level-severity min-level) + (flycheck-error-level-severity (flycheck-error-level err))) + (not (flycheck-has-current-errors-p min-level))) t))) (defun flycheck-next-error-pos (n &optional reset) @@ -4867,13 +4871,15 @@ In the latter case, show messages in the buffer denoted by variable `flycheck-error-message-buffer'." (when (and errors (flycheck-may-use-echo-area-p)) (let ((messages (seq-map #'flycheck-error-format-message-and-id errors))) - (let ((result (display-message-or-buffer (string-join messages "\n\n") - flycheck-error-message-buffer - 'not-this-window))) - (when (window-live-p result) - (with-current-buffer (window-buffer result) - (unless (derived-mode-p 'flycheck-error-message-mode) - (flycheck-error-message-mode)))))))) + (display-message-or-buffer (string-join messages "\n\n") + flycheck-error-message-buffer + 'not-this-window) + ;; We cannot rely on `display-message-or-buffer' returning the right + ;; window. See URL `https://github.com/flycheck/flycheck/issues/1643'. + (-when-let ((buf (get-buffer flycheck-error-message-buffer))) + (with-current-buffer buf + (unless (derived-mode-p 'flycheck-error-message-mode) + (flycheck-error-message-mode))))))) (defun flycheck-display-error-messages-unless-error-list (errors) "Show messages of ERRORS unless the error list is visible. @@ -8820,7 +8826,7 @@ See URL `https://github.com/zaach/jsonlint'." "A JSON syntax checker using Python json.tool module. See URL `https://docs.python.org/3.5/library/json.html#command-line-interface'." - :command ("python" "-m" "json.tool" source + :command ("python3" "-m" "json.tool" source ;; Send the pretty-printed output to the null device null-device) :error-patterns @@ -9229,11 +9235,13 @@ are relative to the file being checked." See URL `https://developers.google.com/protocol-buffers/'." :command ("protoc" "--error_format" "gcc" (eval (concat "--java_out=" (flycheck-temp-dir-system))) - (option-list "--proto_path=" flycheck-protoc-import-path concat) - ;; Add the file directory of protobuf path to resolve import - ;; directives + ;; Add the current directory to resolve imports (eval (concat "--proto_path=" (file-name-directory (buffer-file-name)))) + ;; Add other import paths; this needs to be after the current + ;; directory to produce the right output. See URL + ;; `https://github.com/flycheck/flycheck/pull/1655' + (option-list "--proto_path=" flycheck-protoc-import-path concat) source-inplace) :error-patterns ((info line-start (file-name) ":" line ":" column @@ -9481,7 +9489,7 @@ Requires Flake8 3.0 or newer. See URL `https://flake8.readthedocs.io/'." ;; Not calling flake8 directly makes it easier to switch between different ;; Python versions; see https://github.com/flycheck/flycheck/issues/1055. - :command ("python" + :command ("python3" (eval (flycheck-python-module-args 'python-flake8 "flake8")) "--format=default" (config-file "--config" flycheck-flake8rc) @@ -9489,6 +9497,8 @@ Requires Flake8 3.0 or newer. See URL flycheck-option-int) (option "--max-line-length" flycheck-flake8-maximum-line-length nil flycheck-option-int) + (eval (when buffer-file-name + (concat "--stdin-display-name=" buffer-file-name))) "-") :standard-input t :error-filter (lambda (errors) @@ -9496,7 +9506,7 @@ Requires Flake8 3.0 or newer. See URL (seq-map #'flycheck-flake8-fix-error-level errors))) :error-patterns ((warning line-start - "stdin:" line ":" (optional column ":") " " + (file-name) ":" line ":" (optional column ":") " " (id (one-or-more (any alpha)) (one-or-more digit)) " " (message (one-or-more not-newline)) line-end)) @@ -9528,7 +9538,7 @@ See URL `https://www.pylint.org/'." ;; --reports=n disables the scoring report. ;; Not calling pylint directly makes it easier to switch between different ;; Python versions; see https://github.com/flycheck/flycheck/issues/1055. - :command ("python" + :command ("python3" (eval (flycheck-python-module-args 'python-pylint "pylint")) "--reports=n" "--output-format=text" @@ -9565,7 +9575,7 @@ See URL `https://www.pylint.org/'." "A Python syntax checker using Python's builtin compiler. See URL `https://docs.python.org/3.4/library/py_compile.html'." - :command ("python" "-m" "py_compile" source) + :command ("python3" "-m" "py_compile" source) :error-patterns ;; Python 2.7 ((error line-start " File \"" (file-name) "\", line " line "\n" @@ -9788,7 +9798,7 @@ See URL `https://github.com/igorshubovych/markdownlint-cli'." source) :error-patterns ((error line-start - (file-name) ": " line ": " (id (one-or-more (not (any space)))) + (file-name) ":" line " " (id (one-or-more (not (any space)))) " " (message) line-end)) :error-filter (lambda (errors) @@ -10997,7 +11007,7 @@ See URL `http://www.gnu.org/software/texinfo/'." textlint "textlintrc.json" :safe #'stringp) -;; This needs to be set because textlint plugins are installed seperately, +;; This needs to be set because textlint plugins are installed separately, ;; and there is no way to check their installation status -- textlint simply ;; prints a backtrace. (flycheck-def-option-var flycheck-textlint-plugin-alist @@ -11258,9 +11268,9 @@ See URL `https://github.com/adrienverge/yamllint'." (config-file "-c" flycheck-yamllintrc)) :error-patterns ((error line-start - (file-name) ":" line ":" column ": [error] " (message) line-end) + "stdin:" line ":" column ": [error] " (message) line-end) (warning line-start - (file-name) ":" line ":" column ": [warning] " (message) line-end)) + "stdin:" line ":" column ": [warning] " (message) line-end)) :modes yaml-mode) (provide 'flycheck) -- 2.47.3