[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter 3ca33ee87a 2/3: clean code
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter 3ca33ee87a 2/3: clean code |
Date: |
Sun, 29 May 2022 23:58:18 -0400 (EDT) |
branch: elpa/evil-nerd-commenter
commit 3ca33ee87a4930ff141ff9ea934aab66ca1a811c
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
clean code
---
Makefile | 10 +++++-----
tests/my-byte-compile.el | 10 ++--------
tests/my-elint.el | 3 +--
3 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index b5ad514a53..47083ce749 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
SHELL = /bin/sh
EMACS ?= emacs
PROFILER =
-
-.PHONY: test deps clean
RM= @rm -rf
EMACS_BATCH_OPTS=--batch -Q \
-L . \
@@ -12,6 +10,8 @@ EMACS_BATCH_OPTS=--batch -Q \
-l evil-nerd-commenter-sdk.el \
-l evil-nerd-commenter.el
+.PHONY: test deps clean compile lint
+
# Delete byte-compiled files etc.
clean:
$(RM) *~
@@ -25,12 +25,12 @@ deps:
@if [ ! -f deps/web-mode.el ]; then curl -L
https://raw.githubusercontent.com/fxbois/web-mode/master/web-mode.el >
deps/web-mode.el; fi;
lint: deps
- @$(EMACS) ${EMACS_BATCH_OPTS} -l tests/my-elint.el 2>&1 | grep -E
"([Ee]rror|[Ww]arning):" && exit 1 || exit 0
+ @$(EMACS) $(EMACS_BATCH_OPTS) -l tests/my-elint.el 2>&1 | grep -E
"([Ee]rror|[Ww]arning):" && exit 1 || exit 0
compile: deps
$(RM) *.elc
- @$(EMACS) ${EMACS_BATCH_OPTS} -l tests/my-byte-compile.el 2>&1 | grep
-E "([Ee]rror|[Ww]arning):" && exit 1 || exit 0
+ @$(EMACS) $(EMACS_BATCH_OPTS) -l tests/my-byte-compile.el 2>&1 | grep
-E "([Ee]rror|[Ww]arning):" && exit 1 || exit 0
# Run tests.
test: compile deps
- $(EMACS) $(EMACS_BATCH_OPTS) -l tests/evil-nerd-commenter-tests.el
+ @$(EMACS) $(EMACS_BATCH_OPTS) -l tests/evil-nerd-commenter-tests.el
diff --git a/tests/my-byte-compile.el b/tests/my-byte-compile.el
index 18396b0b2c..5cf4841328 100644
--- a/tests/my-byte-compile.el
+++ b/tests/my-byte-compile.el
@@ -1,9 +1,8 @@
;;; my-elint.el --- syntax check the code -*- lexical-binding: t -*-
-;; Copyright (C) 2022 Free Software Foundation, Inc.
+;; Copyright (C) 2022 Chen Bin
;;
;; Author: Chen Bin <chenbin.sh@gmail.com>
-;; URL: https://github.com/tumashu/pyim
;; This file is NOT part of GNU Emacs.
@@ -35,12 +34,7 @@
(string-match "\\.el$" file)
(not (string-match "\\.dir-locals\\.el" file))))
(lambda (dir parent)
- (not (or (string= dir ".")
- (string= dir "..")
- (string= dir ".git")
- (string= dir ".svn")
- (string= dir "deps")
- (string= dir "tests")
+ (not (or (member dir '("." ".." ".git" ".svn" "deps" "tests"))
(file-symlink-p (expand-file-name dir parent))))))))
(dolist (file files)
(byte-compile-file file)))
diff --git a/tests/my-elint.el b/tests/my-elint.el
index 4b5d906378..8dbdd80a91 100644
--- a/tests/my-elint.el
+++ b/tests/my-elint.el
@@ -3,7 +3,6 @@
;; Copyright (C) 2022 Free Software Foundation, Inc.
;;
;; Author: Chen Bin <chenbin.sh@gmail.com>
-;; URL: https://github.com/tumashu/pyim
;; This file is NOT part of GNU Emacs.
@@ -21,7 +20,7 @@
;; along with this program; if not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
-;; Syntax check the pyim code. It's used in Emacs cli.
+;; Syntax check the code. It's used in Emacs cli.
;;
;;; Code: