purcell / package-lint

A linting library for elisp package metadata
GNU General Public License v3.0
194 stars 34 forks source link

Error in package-lint--check-objects-by-regexp #148

Closed conao3 closed 4 years ago

conao3 commented 4 years ago

Hi!

I find this package parse error for request.el When open this file and exec package-int-buffer, I face below error and backtrace.

Debugger entered--Lisp error: (wrong-type-argument listp 0)
  car(0)
  (let ((fmt-str (car (cdr def))) (emacs-version-dep (or (car (cdr (assq (quote emacs) valid-deps))) (quote (0))))) (if (and (version-list-< emacs-version-dep (quote (26 1))) (stringp fmt-str) (string-match "\\(%+\\)[0-9]+\\$" fmt-str) (cl-oddp (length (match-string 1 fmt-str)))) (progn (package-lint--error-at-point (quote error) "You should depend on (emacs \"26.1\") if you need format field numbers."))))
  package-lint--check-format-string(((emacs (24 4) 341)) (error . 0))
  (closure ((deps (emacs (24 4) 341)) (save-match-data-internal 0 9 0 8 8 9) t) (def) (package-lint--check-format-string deps def))((error . 0))
  funcall((closure ((deps (emacs (24 4) 341)) (save-match-data-internal 0 9 0 8 8 9) t) (def) (package-lint--check-format-string deps def)) (error . 0))
  (progn (funcall function obj))
  (if obj (progn (funcall function obj)))
  (let ((obj (if (package-lint--inside-comment-or-string-p) nil (save-excursion (condition-case nil (progn (read ...)) (error nil)))))) (if obj (progn (funcall function obj))))
  (save-excursion (goto-char (match-beginning 0)) (let ((obj (if (package-lint--inside-comment-or-string-p) nil (save-excursion (condition-case nil (progn ...) (error nil)))))) (if obj (progn (funcall function obj)))))
  (while (re-search-forward regexp nil t) (save-excursion (goto-char (match-beginning 0)) (let ((obj (if (package-lint--inside-comment-or-string-p) nil (save-excursion (condition-case nil ... ...))))) (if obj (progn (funcall function obj))))))
  package-lint--check-objects-by-regexp("(\\(?:error\\|format\\|message\\)\\s-" (closure ((deps (emacs (24 4) 341)) (save-match-data-internal 0 9 0 8 8 9) t) (def) (package-lint--check-format-string deps def)))
  (let ((deps (package-lint--check-dependency-list))) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("format" "message" "error"))) "\\s-") (function (lambda (def) (package-lint--check-format-string deps def)))))
  (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("defalias" "defvaralias"))) "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let ((desc (package-lint--check-package-el-can-parse))) (if desc (progn (package-lint--check-package-summary desc) (package-lint--check-provide-form desc) (package-lint--check-no-emacs-in-package-name desc)))) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let ((deps (package-lint--check-dependency-list))) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("format" "message" "error"))) "\\s-") (function (lambda (def) (package-lint--check-format-string deps def))))) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let ((definitions (package-lint--get-defs))) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens))
  (save-excursion (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("defalias" "defvaralias"))) "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let ((desc (package-lint--check-package-el-can-parse))) (if desc (progn (package-lint--check-package-summary desc) (package-lint--check-provide-form desc) (package-lint--check-no-emacs-in-package-name desc)))) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let ((deps (package-lint--check-dependency-list))) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("format" "message" "error"))) "\\s-") (function (lambda (def) (package-lint--check-format-string deps def))))) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let ((definitions (package-lint--get-defs))) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens)))
  (progn (save-excursion (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ("defalias" "defvaralias"))) "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let ((desc (package-lint--check-package-el-can-parse))) (if desc (progn (package-lint--check-package-summary desc) (package-lint--check-provide-form desc) (package-lint--check-no-emacs-in-package-name desc)))) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let ((deps (package-lint--check-dependency-list))) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ...)) "\\s-") (function (lambda (def) (package-lint--check-format-string deps def))))) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let ((definitions (package-lint--get-defs))) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens))))
  (unwind-protect (progn (save-excursion (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt (quote ...)) "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let ((desc (package-lint--check-package-el-can-parse))) (if desc (progn (package-lint--check-package-summary desc) (package-lint--check-provide-form desc) (package-lint--check-no-emacs-in-package-name desc)))) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let ((deps (package-lint--check-dependency-list))) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt ...) "\\s-") (function (lambda ... ...)))) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let ((definitions (package-lint--get-defs))) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens)))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" (regexp-opt ...) "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let ((desc ...)) (if desc (progn ... ... ...))) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let ((deps ...)) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp (concat "(" ... "\\s-") (function ...))) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let ((definitions ...)) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens)))) (set-match-data save-match-data-internal (quote evaporate))))
  (let ((package-lint--errors (quote nil)) (case-fold-search nil)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction (widen) (package-lint--check-reserved-keybindings) (package-lint--check-keywords-list) (package-lint--check-url-header) (package-lint--check-package-version-present) (package-lint--check-lexical-binding-is-on-first-line) (package-lint--check-objects-by-regexp "(define-minor-mode\\s-" (function package-lint--check-minor-mode)) (package-lint--check-objects-by-regexp "(define-global\\(?:ized\\)?-minor-mode\\s-" (function package-lint--check-globalized-minor-mode)) (package-lint--check-objects-by-regexp (concat "(" ... "\\s-") (function package-lint--check-defalias)) (package-lint--check-objects-by-regexp "(defgroup\\s-" (function package-lint--check-defgroup)) (let (...) (if desc ...)) (package-lint--check-no-use-of-cl) (package-lint--check-no-use-of-cl-lib-sublibraries) (package-lint--check-eval-after-load) (let (...) (package-lint--check-lexical-binding-requires-emacs-24 deps) (package-lint--check-libraries-available-in-emacs deps) (package-lint--check-libraries-removed-from-emacs) (package-lint--check-macros-functions-available-in-emacs deps) (package-lint--check-macros-functions-removed-from-emacs) (package-lint--check-objects-by-regexp ... ...)) (package-lint--check-for-literal-emacs-path) (package-lint--check-commentary-existence) (let (...) (package-lint--check-autoloads-on-private-functions definitions) (package-lint--check-defs-prefix definitions) (package-lint--check-symbol-separators definitions)) (package-lint--check-lonely-parens)))) (set-match-data save-match-data-internal (quote evaporate)))) (sort package-lint--errors (function (lambda (a b) (let ((x0 a) (x1 b)) (let* ((x2162 ...) (x2163 ...) (x2164 ...) (x2165 ...) (x2167 ...) (x2168 ...) (x2169 ...)) (let (... ... ...) (let* ... ...))))))))
  package-lint--check-all()
  (save-current-buffer (set-buffer (or buffer (current-buffer))) (package-lint--check-all))
  package-lint-buffer()
  (let ((errs (package-lint-buffer)) (buf "*Package-Lint*")) (save-current-buffer (set-buffer (get-buffer-create buf)) (let ((buffer-read-only nil)) (erase-buffer) (cond ((null errs) (insert "No issues found.")) ((null (cdr errs)) (insert "1 issue found:\n\n")) (t (insert (format "%d issues found:\n\n" (length errs))))) (let ((--dolist-tail-- errs)) (while --dolist-tail-- (let ((x2242 ...)) (let* (... ... ... ... ... ... ... ...) (let ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (special-mode) (view-mode 1)) (display-buffer buf))
  package-lint-current-buffer()
  funcall-interactively(package-lint-current-buffer)
  call-interactively(package-lint-current-buffer record nil)
  command-execute(package-lint-current-buffer record)
  counsel-M-x-action("package-lint-current-buffer")
  #f(compiled-function (x) #<bytecode 0xa3cd4d5>)("package-lint-current-buffer")
  ivy-call()
  #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x2249011>)("M-x " [## skk-viper-normalize-map-function origami-hide-node-overlay helm-source-colors helm-candidates-in-buffer horizontal-pos package-lint--sane-prefixes is-auto-refresh denied edebug-trace forge-gogs-repository--eieio-childp tramp-find-user markdown-xhtml-body-preamble markdown-match-bold vc-git-make-version-backups-p /home/conao/Documents/org/\#+date: helm-type-timers-actions wgrep-clone-to-temp-buffer slime-open-system slime-apropos-symbol hangs sgml-syntax-propertize gnus-summary-recenter local-only contained matched-string implemented edebug-clear-frequency-count tab-bar-select-tab erlang-local-buffer-file-name fails-for helm-buf-or-cur mostly shr-parse-image-data soap-element-namespace-tag--cmacro line-num Edebug\ All\ Defs helm-kill-regexp-as-sexp helm-browse-project-build-buffers-source \' :swank-dependencies slime-inferior-lisp-program-history slime-toggle-trace-fdefinition batches problems align-set-vhdl-rules \. --cl-block-unless-error-- wgrep-after-save-hook Inline\ Code ...] :predicate #f(compiled-function (sym) #<bytecode 0x2279385>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS can be used to store collection-specific\nsession-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x2249011>) ("M-x " [## skk-viper-normalize-map-function origami-hide-node-overlay helm-source-colors helm-candidates-in-buffer horizontal-pos package-lint--sane-prefixes is-auto-refresh denied edebug-trace forge-gogs-repository--eieio-childp tramp-find-user markdown-xhtml-body-preamble markdown-match-bold vc-git-make-version-backups-p /home/conao/Documents/org/\#+date: helm-type-timers-actions wgrep-clone-to-temp-buffer slime-open-system slime-apropos-symbol hangs sgml-syntax-propertize gnus-summary-recenter local-only contained matched-string implemented edebug-clear-frequency-count tab-bar-select-tab erlang-local-buffer-file-name fails-for helm-buf-or-cur mostly shr-parse-image-data soap-element-namespace-tag--cmacro line-num Edebug\ All\ Defs helm-kill-regexp-as-sexp helm-browse-project-build-buffers-source \' :swank-dependencies slime-inferior-lisp-program-history slime-toggle-trace-fdefinition batches problems align-set-vhdl-rules \. --cl-block-unless-error-- wgrep-after-save-hook Inline\ Code ...] :predicate #f(compiled-function (sym) #<bytecode 0x2279385>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t))
  ivy-read("M-x " [## skk-viper-normalize-map-function origami-hide-node-overlay helm-source-colors helm-candidates-in-buffer horizontal-pos package-lint--sane-prefixes is-auto-refresh denied edebug-trace forge-gogs-repository--eieio-childp tramp-find-user markdown-xhtml-body-preamble markdown-match-bold vc-git-make-version-backups-p /home/conao/Documents/org/\#+date: helm-type-timers-actions wgrep-clone-to-temp-buffer slime-open-system slime-apropos-symbol hangs sgml-syntax-propertize gnus-summary-recenter local-only contained matched-string implemented edebug-clear-frequency-count tab-bar-select-tab erlang-local-buffer-file-name fails-for helm-buf-or-cur mostly shr-parse-image-data soap-element-namespace-tag--cmacro line-num Edebug\ All\ Defs helm-kill-regexp-as-sexp helm-browse-project-build-buffers-source \' :swank-dependencies slime-inferior-lisp-program-history slime-toggle-trace-fdefinition batches problems align-set-vhdl-rules \. --cl-block-unless-error-- wgrep-after-save-hook Inline\ Code ...] :predicate #f(compiled-function (sym) #<bytecode 0x2279385>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)
conao3 commented 4 years ago

Thanks!