mirror of
https://github.com/vale981/melpazoid
synced 2025-03-06 01:41:38 -05:00
misc small output improvements
This commit is contained in:
parent
3888690118
commit
10f72887d1
2 changed files with 8 additions and 8 deletions
10
melpazoid.el
10
melpazoid.el
|
@ -58,13 +58,13 @@
|
|||
"Warn about and remove `no-byte-compile' directive."
|
||||
(save-excursion
|
||||
(let ((melpazoid--misc-header-printed-p t)) ; HACK: don't print a header
|
||||
(melpazoid-misc "no-byte-compile: t" "Don't set `no-byte-compile: t`" nil t))
|
||||
(melpazoid-misc "no-byte-compile: t" "Don't set `no-byte-compile: t`." nil t))
|
||||
(when melpazoid-can-modify-buffers
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "no-byte-compile:[\s\t]*t" nil t)
|
||||
(delete-char -1)
|
||||
(insert "nil")
|
||||
(melpazoid-insert "- Byte-compiling is enabled in what follows")
|
||||
(melpazoid-insert " Byte-compiling is enabled in what follows")
|
||||
(save-buffer)))))
|
||||
|
||||
(defun melpazoid--buffer-almost-empty-p ()
|
||||
|
@ -175,13 +175,13 @@ a Docker container, e.g. kellyk/emacs does not include the .el files."
|
|||
(melpazoid-misc "This file is part of GNU Emacs." "This statement may not currently be accurate")
|
||||
(melpazoid-misc "lighter \"[^ \"]" "Minor mode lighters should start with a space")
|
||||
(melpazoid-misc "(fset" "Ensure this `fset` isn't being used as a surrogate `defalias`")
|
||||
(melpazoid-misc "(fmakunbound" "Use of `fmakunbound` in a package is an anti-pattern")
|
||||
(melpazoid-misc "(setq major-mode" "Explicitly setting major-mode is an anti-pattern")
|
||||
(melpazoid-misc "(fmakunbound" "Use of `fmakunbound` in a package is usually unnecessary")
|
||||
(melpazoid-misc "(setq major-mode" "Directly setting major-mode is odd (if defining a mode, prefer define-derived-mode)")
|
||||
(melpazoid-misc "([^ ]*read-string \"[^\"]*[^ ]\"" "Many `*-read-string` prompts should end with a space")
|
||||
(melpazoid-misc "(define-derived-mode .*fundamental-mode" "It is unusual to derive from fundamental-mode; try special-mode")
|
||||
(melpazoid-misc ";;;###autoload\n(defcustom" "Don't autoload `defcustom`")
|
||||
(melpazoid-misc ";;;###autoload\n(add-hook" "Don't autoload `add-hook`")
|
||||
(melpazoid-misc "url-copy-file" "Be aware that url-copy-file can't handle redirects")
|
||||
(melpazoid-misc "url-copy-file" "Be aware that url-copy-file can't handle redirects (ensure it works)")
|
||||
(melpazoid-misc ";; Package-Version" "Prefer `;; Version` instead of `;; Package-Version` (MELPA automatically adds `Package-Version`)")
|
||||
(melpazoid-misc "^(define-key" "This define-key could overwrite a user's keybindings. Try: `(defvar my-map (let ((km (make-sparse-keymap))) (define-key ...) km))`")
|
||||
(melpazoid-misc "(string-match[^(](symbol-name" "Prefer to use `eq` on symbols")
|
||||
|
|
|
@ -373,7 +373,7 @@ def _check_license_in_files(elisp_files: list) -> bool:
|
|||
|
||||
def _check_license_in_file(elisp_file: str) -> str:
|
||||
"""Scan the elisp file for some recognized license text."""
|
||||
# TODO: this function could be more comprehensive
|
||||
# TODO: this function could be more comprehensive; don't use grep
|
||||
licenses = {
|
||||
'GPL': r'GNU.* General Public License',
|
||||
'ISC': r'Permission to use, copy, modify, and/or',
|
||||
|
@ -539,14 +539,14 @@ def check_melpa_pr(pr_url: str):
|
|||
|
||||
pr_data = requests.get(f"{MELPA_PULL_API}/{match.groups()[0]}").json()
|
||||
if 'changed_files' not in pr_data:
|
||||
_note('This does not appear to point to a GitHub PR', CLR_ERROR)
|
||||
_note(f"{pr_url} does not appear to be a GitHub PR", CLR_ERROR)
|
||||
return
|
||||
if int(pr_data['changed_files']) != 1:
|
||||
_note('Please only add one recipe per pull request', CLR_ERROR)
|
||||
return
|
||||
name, recipe = _name_and_recipe(pr_data['diff_url'])
|
||||
if not name or not recipe:
|
||||
_note('Unable to build this pull request.', CLR_ERROR)
|
||||
_note(f"Unable to build the pull request at {pr_url}", CLR_ERROR)
|
||||
return
|
||||
|
||||
clone_address: str = _clone_address(name, recipe)
|
||||
|
|
Loading…
Add table
Reference in a new issue