From e9d416ffd90478cd266f3dec808b68cf349982bb Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 21 May 2025 14:05:48 +0200 Subject: [PATCH] update flycheck --- bba.org | 2 +- .../flycheck-autoloads.el | 0 .../flycheck-buttercup.el | 2 +- .../flycheck-ert.el | 0 .../flycheck-pkg.el | 10 +-- .../flycheck.el | 89 ++++++++++++++++--- 6 files changed, 84 insertions(+), 19 deletions(-) rename elpa/{flycheck-20241130.1502 => flycheck-20250423.1305}/flycheck-autoloads.el (100%) rename elpa/{flycheck-20241130.1502 => flycheck-20250423.1305}/flycheck-buttercup.el (99%) rename elpa/{flycheck-20241130.1502 => flycheck-20250423.1305}/flycheck-ert.el (100%) rename elpa/{flycheck-20241130.1502 => flycheck-20250423.1305}/flycheck-pkg.el (67%) rename elpa/{flycheck-20241130.1502 => flycheck-20250423.1305}/flycheck.el (99%) diff --git a/bba.org b/bba.org index 0a4fce93..ec2fcd86 100644 --- a/bba.org +++ b/bba.org @@ -696,7 +696,7 @@ log-format. #+BEGIN_SRC emacs-lisp (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20230306.414") + (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20250423.1305") (require 'flycheck) (add-hook 'after-init-hook #'global-flycheck-mode) (flycheck-define-checker puppet-lint diff --git a/elpa/flycheck-20241130.1502/flycheck-autoloads.el b/elpa/flycheck-20250423.1305/flycheck-autoloads.el similarity index 100% rename from elpa/flycheck-20241130.1502/flycheck-autoloads.el rename to elpa/flycheck-20250423.1305/flycheck-autoloads.el diff --git a/elpa/flycheck-20241130.1502/flycheck-buttercup.el b/elpa/flycheck-20250423.1305/flycheck-buttercup.el similarity index 99% rename from elpa/flycheck-20241130.1502/flycheck-buttercup.el rename to elpa/flycheck-20250423.1305/flycheck-buttercup.el index 98022659..5782980a 100644 --- a/elpa/flycheck-20241130.1502/flycheck-buttercup.el +++ b/elpa/flycheck-20250423.1305/flycheck-buttercup.el @@ -1,6 +1,6 @@ ;;; flycheck-buttercup.el --- Flycheck: Extensions to Buttercup -*- lexical-binding: t; -*- -;; Copyright (C) 2017 Flycheck contributors +;; Copyright (C) 2017-2025 Flycheck contributors ;; Copyright (C) 2016 Sebastian Wiesner and Flycheck contributors ;; Author: Sebastian Wiesner diff --git a/elpa/flycheck-20241130.1502/flycheck-ert.el b/elpa/flycheck-20250423.1305/flycheck-ert.el similarity index 100% rename from elpa/flycheck-20241130.1502/flycheck-ert.el rename to elpa/flycheck-20250423.1305/flycheck-ert.el diff --git a/elpa/flycheck-20241130.1502/flycheck-pkg.el b/elpa/flycheck-20250423.1305/flycheck-pkg.el similarity index 67% rename from elpa/flycheck-20241130.1502/flycheck-pkg.el rename to elpa/flycheck-20250423.1305/flycheck-pkg.el index 3fd2f435..d89ca263 100644 --- a/elpa/flycheck-20241130.1502/flycheck-pkg.el +++ b/elpa/flycheck-20250423.1305/flycheck-pkg.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "flycheck" "20241130.1502" +(define-package "flycheck" "20250423.1305" "On-the-fly syntax checking." - '((emacs "26.1")) - :url "https://github.com/flycheck/flycheck" - :commit "ebaf48359b3e21879c8f6f3c1b5d0221b345035e" - :revdesc "ebaf48359b3e" + '((emacs "27.1")) + :url "https://www.flycheck.org" + :commit "2842e237f6abe6602ac3b3bb1ce45bc130e0a1ec" + :revdesc "2842e237f6ab" :keywords '("convenience" "languages" "tools") :authors '(("Sebastian Wiesner" . "swiesner@lunaryorn.com")) :maintainers '(("Clément Pit-Claudel" . "clement.pitclaudel@live.com") diff --git a/elpa/flycheck-20241130.1502/flycheck.el b/elpa/flycheck-20250423.1305/flycheck.el similarity index 99% rename from elpa/flycheck-20241130.1502/flycheck.el rename to elpa/flycheck-20250423.1305/flycheck.el index 0aee4ede..1c20efa7 100644 --- a/elpa/flycheck-20241130.1502/flycheck.el +++ b/elpa/flycheck-20250423.1305/flycheck.el @@ -1,6 +1,6 @@ ;;; flycheck.el --- On-the-fly syntax checking -*- lexical-binding: t; -*- -;; Copyright (C) 2017-2024 Flycheck contributors +;; Copyright (C) 2017-2025 Flycheck contributors ;; Copyright (C) 2012-2016 Sebastian Wiesner and Flycheck contributors ;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;; @@ -10,9 +10,9 @@ ;; Bozhidar Batsov ;; URL: https://www.flycheck.org ;; Keywords: convenience, languages, tools -;; Package-Version: 20241130.1502 -;; Package-Revision: ebaf48359b3e -;; Package-Requires: ((emacs "26.1")) +;; Package-Version: 20250423.1305 +;; Package-Revision: 2842e237f6ab +;; Package-Requires: ((emacs "27.1")) ;; This file is not part of GNU Emacs. @@ -180,6 +180,7 @@ lua-luacheck lua markdown-markdownlint-cli + markdown-markdownlint-cli2 markdown-mdl markdown-pymarkdown nix @@ -1275,7 +1276,7 @@ Only has effect when variable `global-flycheck-mode' is non-nil." -(defconst flycheck-version "35.0-snapshot" +(defconst flycheck-version "35.0" "The current version of Flycheck. Should be kept in sync with the package version metadata. @@ -8086,6 +8087,9 @@ Requires GCC 4.4 or newer. See URL `https://gcc.gnu.org/'." :modes (c-mode c++-mode c-ts-mode c++-ts-mode) :next-checkers ((warning . c/c++-cppcheck))) +(flycheck-def-args-var flycheck-cppcheck-args c/c++-cppcheck + :package-version '(flycheck . "35")) + (flycheck-def-option-var flycheck-cppcheck-checks '("style") c/c++-cppcheck "Enabled checks for Cppcheck. @@ -8178,6 +8182,7 @@ See URL `https://cppcheck.sourceforge.net/'." (pcase major-mode ((or `c++-mode `c++-ts-mode) "c++") ((or `c-mode `c-ts-mode) "c"))) + (eval flycheck-cppcheck-args) source) :error-parser flycheck-parse-cppcheck :modes (c-mode c++-mode c-ts-mode c++-ts-mode)) @@ -8402,6 +8407,14 @@ See URL `https://stylelint.io/'." :package-version '(flycheck . "32")) (make-variable-buffer-local 'flycheck-cuda-language-standard) +(flycheck-def-option-var flycheck-cuda-compiler-options '("-Wall" "-Wextra") cuda-nvcc + "Specify options directly to the compiler/preprocessor." + :type '(choice (const :tag "No additional compiler options" nil) + (repeat :tag "Addition compiler options" + (string :tag "Compiler option"))) + :safe #'flycheck-string-list-p + :package-version '(flycheck . "35")) + (flycheck-def-option-var flycheck-cuda-gencodes nil cuda-nvcc "Our real and virtual GPU architectures to pass to nvcc." :type '(repeat (file :tag "GPU architecture")) @@ -8459,6 +8472,7 @@ See URL `https://developer.nvidia.com/cuda-llvm-compiler'." (option-flag "--expt-extended-lambda" flycheck-cuda-extended-lambda) (option-list "-include" flycheck-cuda-includes) (option-list "-gencode" flycheck-cuda-gencodes) + (option-list "-Xcompiler" flycheck-cuda-compiler-options) (option-list "-D" flycheck-cuda-definitions concat) (option-list "-I" flycheck-cuda-include-path) source) @@ -8468,12 +8482,18 @@ See URL `https://developer.nvidia.com/cuda-llvm-compiler'." " " (or "" (file-name)) ":" line ":" line-end) (error line-start (or "" (file-name)) - "(" line "): error: " (message) line-end) + "(" line "): error" + (optional " #" (id (one-or-more digit) (optional "-D"))) + ": " (message) line-end) (error line-start (or "" (file-name)) ":" line ":" column - ": fatal error: " (optional (message)) line-end) + ": fatal error" + (optional " #" (id (one-or-more digit) (optional "-D"))) + ": " (optional (message)) line-end) (warning line-start (or "" (file-name)) - "(" line "): warning: " (message) line-end)) + "(" line "): warning" + (optional " #" (id (one-or-more digit) (optional "-D"))) + ": " (message) line-end)) :modes cuda-mode) @@ -10041,11 +10061,26 @@ See URL `https://stedolan.github.io/jq/'." (zero-or-more not-newline) line-end)) :modes (json-mode js-json-mode json-ts-mode)) +(flycheck-def-option-var flycheck-jsonnet-include-paths nil jsonnet + "a list of include paths to specify to the jsonnet binary, via -J . + +For example (\"./lib\") ." + :type '(repeat (directory :tag "Include directory")) + :safe #'flycheck-string-list-p + :package-version '(flycheck . "35.0")) + +(flycheck-def-args-var flycheck-jsonnet-command-args jsonnet + :package-version '(flycheck . "35.0")) + (flycheck-define-checker jsonnet "A Jsonnet syntax checker using the jsonnet binary. See URL `https://jsonnet.org'." - :command ("jsonnet" source-inplace) + :command + ("jsonnet" + (option-list "-J" flycheck-jsonnet-include-paths) + (eval flycheck-jsonnet-command-args) + source-inplace) :error-patterns ((error line-start "STATIC ERROR: " (file-name) ":" (or (seq line ":" column (zero-or-one (seq "-" end-column))) @@ -10879,7 +10914,7 @@ See URL `https://docs.astral.sh/ruff/'." (id (one-or-more (any alpha)) (one-or-more digit) " ") (message (one-or-more not-newline)) line-end)) - :working-directory flycheck-python-find-project-root + :working-directory flycheck-python-find-project-root :modes (python-mode python-ts-mode) :next-checkers ((warning . python-mypy))) @@ -11267,6 +11302,35 @@ See URL `https://github.com/igorshubovych/markdownlint-cli'." (url "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s")) (and error-code `(url . ,(format url error-code)))))) +(flycheck-def-config-file-var flycheck-markdown-markdownlint-cli2-config + markdown-markdownlint-cli2 + '(".markdownlint-cli2.json" ".markdownlint-cli2.jsonc" ".markdownlint-cli2.yaml") + :package-version '(flycheck . "35")) + +(flycheck-define-checker markdown-markdownlint-cli2 + "Markdown checker using markdownlint-cli2. + +See URL `https://github.com/DavidAnson/markdownlint-cli2'." + :command ("markdownlint-cli2" + (config-file "--config" flycheck-markdown-markdownlint-cli2-config) + "--" + source) + :error-patterns + ((error line-start + (file-name) ":" line + (? ":" column) " " (id (one-or-more (not (any space)))) + " " (message) line-end)) + :error-filter + (lambda (errors) + (flycheck-sanitize-errors + (flycheck-remove-error-file-names "(string)" errors))) + :modes (markdown-mode gfm-mode) + :error-explainer + (lambda (err) + (let ((error-code (substring (flycheck-error-id err) 0 5)) + (url "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s")) + (and error-code `(url . ,(format url error-code)))))) + (flycheck-def-option-var flycheck-markdown-mdl-rules nil markdown-mdl "Rules to enable for mdl. @@ -11328,7 +11392,7 @@ See URL `https://github.com/markdownlint/markdownlint'." See URL `https://pypi.org/project/pymarkdownlnt/'." :command ("pymarkdown" - (config-file "--config" flycheck-markdown-markdownlint-cli-config) + (config-file "--config" flycheck-markdown-pymarkdown-config) "scan" source) :error-patterns @@ -11661,7 +11725,8 @@ See URL `https://www.ruby-lang.org/'." ((error line-start "SyntaxError in -:" line ": " (message) line-end) (warning line-start "-:" line ":" (optional column ":") " warning: " (message) line-end) - (error line-start "-:" line ": " (message) line-end)) + ;; Ruby 3.4 includes the interpreter path when emitting syntax errors + (error line-start (optional (one-or-more (not (any ":"))) ": ") "-:" line ": " (message) line-end)) :modes (enh-ruby-mode ruby-mode ruby-ts-mode) :next-checkers ((warning . ruby-chef-cookstyle))) -- 2.47.3