akirak / elinter

Nix-based CI and local testing framework for Emacs Lisp projects
GNU General Public License v3.0
18 stars 2 forks source link

Add extra checks by melpazoid #24

Closed akirak closed 4 years ago

akirak commented 4 years ago

This adds the following checks by melpazoid:

Implementation status:

I plan on adding the check to lint command of the CLI. It will be the default, but I will add a switch to disable the check (like --no-melpazoid).

The output will be like this:

==========================================================
melpazoid on bad-hello package
==========================================================
Running the following checks from melpazoid.el:
- melpazoid-check-sharp-quotes
- melpazoid-check-misc
----------------------------------------------------------
Running checks on tests/bad-hello.el...

bad-hello.el#L36: Top-level bind-keys can overwrite user keybindings.  Try: `(defvar my-map (let ((km (make-sparse-keymap))) (bind-keys ...) km))`
> (bind-keys ("<f12> <f11> <f10>" . #'emacs-version))

bad-hello.el#L32: Consider `unless ...` instead of `when (not ...)`
>   (when (not t)

bad-hello.el#L19: Prefer `https` over `http` (if possible)
> ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------
Errors found by melpazoid.
akirak commented 4 years ago

Already implemented in v4.