Skip to content

Commit 3a30b7c

Browse files
committed
fix: fix linting errors
1 parent 6fc71e8 commit 3a30b7c

File tree

5 files changed

+44
-23
lines changed

5 files changed

+44
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,11 @@ jobs:
3434

3535
- name: Byte compile
3636
run: |
37-
./scripts/test-compile.sh
38-
39-
- name: Install package-lint
40-
run: |
41-
emacs -Q --batch \
42-
--eval "(require 'package)" \
43-
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
44-
--eval "(package-initialize)" \
45-
--eval "(package-refresh-contents)" \
46-
--eval "(package-install 'package-lint)"
37+
./scripts/compile.sh
4738
4839
- name: Run package-lint
4940
run: |
50-
emacs -Q --batch \
51-
--eval "(require 'package)" \
52-
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
53-
--eval "(package-initialize)" \
54-
--eval "(require 'package-lint)" \
55-
-f package-lint-batch-and-exit netlinx-mode.el netlinx-mode-font-lock.el
41+
./scripts/lint.sh
5642
5743
- name: Check documentation
5844
run: |

netlinx-mode-font-lock.el

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
;;; netlinx-mode-font-lock.el --- Font-lock settings for NetLinx mode -*- lexical-binding: t; -*-
1+
;;; netlinx-mode-font-lock.el --- Font-lock settings for NetLinx mode -*- lexical-binding: t; no-byte-compile: t; -*-
22

33
;; Copyright (C) 2024 Norgate AV
44

55
;; Author: Norgate AV
66
;; Maintainer: Norgate AV
7-
;; Version: 0.1.0
8-
;; Package-Requires: ((emacs "29.1"))
9-
;; Keywords: languages, netlinx, amx, harman
10-
;; URL: https://github.com/Norgate-AV/emacs-netlinx-mode
11-
;; SPDX-License-Identifier: MIT
127

138
;;; Commentary:
149

1510
;; This file provides font-lock (syntax highlighting) settings for NetLinx mode
1611
;; using tree-sitter. It defines custom faces and highlighting rules.
12+
;; This is an internal library for netlinx-mode.el and is not a standalone package.
1713

1814
;;; Code:
1915

netlinx-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The file path is configured via `netlinx-mode-help-file'."
9898
(netlinx-mode--ensure-grammar)
9999

100100
;; Keybindings
101-
(define-key netlinx-mode-map (kbd "C-c C-h") #'netlinx-open-help)
101+
(define-key netlinx-mode-map (kbd "C-c C-d") #'netlinx-open-help)
102102

103103
;; Check if the NetLinx grammar is installed (t forces fresh check after installation)
104104
(if (treesit-ready-p 'netlinx t)

scripts/lint.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Get the script directory and project root
6+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
8+
9+
# Files to lint
10+
FILES=("netlinx-mode.el")
11+
12+
echo "Project root: $PROJECT_ROOT"
13+
echo "Files to lint: ${FILES[*]}"
14+
echo ""
15+
16+
echo "Installing package-lint..."
17+
emacs -Q --batch \
18+
--eval "(require 'package)" \
19+
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
20+
--eval "(package-initialize)" \
21+
--eval "(package-refresh-contents)" \
22+
--eval "(package-install 'package-lint)" || {
23+
echo "Failed to install package-lint"
24+
exit 1
25+
}
26+
27+
echo ""
28+
echo "Running package-lint..."
29+
(cd "$PROJECT_ROOT" && emacs -Q --batch \
30+
--eval "(require 'package)" \
31+
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
32+
--eval "(package-initialize)" \
33+
--eval "(require 'package-lint)" \
34+
-f package-lint-batch-and-exit "${FILES[@]}") || {
35+
echo "Package lint failed"
36+
exit 1
37+
}
38+
39+
echo "Package lint succeeded for files: ${FILES[*]}"

0 commit comments

Comments
 (0)