Skip to content

Commit 56e7e9b

Browse files
rtpgjcs090218
andauthored
Fix up many linting issues (#4652)
* use clangd-15 instead of clangd-11 in CI * Fix up types for customize * fix quote escaping * Fix equality check eq does object identity checking, while equal does recursive value checking. * make sure to pass the TCP port * lsp-camel-jar-file is a file --------- Co-authored-by: Jen-Chieh Shen <jcs090218@gmail.com>
1 parent 910341f commit 56e7e9b

29 files changed

+135
-56
lines changed

clients/lsp-autotools.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
makefile-bsdmake-mode
4242
makefile-imake-mode)
4343
"List of major mode that work with Autotools."
44-
:type '(list symbol)
44+
:type '(repeat function)
4545
:group 'lsp-autotools)
4646

4747
(defun lsp-autotools--download-server (_client callback error-callback update?)

clients/lsp-awk.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"Command to run the AWK language server."
3737
:group 'lsp-awk
3838
:risky t
39-
:type '(list string))
39+
:type '(repeat string))
4040

4141
(lsp-register-client
4242
(make-lsp-client

clients/lsp-clojure.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
(expand-file-name "~/.gitlibs/libs"))
9595
"LSP clojure dirs that should be considered library folders."
9696
:group 'lsp-clojure
97-
:type '(list string))
97+
:type '(repeat directory))
9898

9999
(defcustom lsp-clojure-test-tree-position-params nil
100100
"The optional test tree position params.

clients/lsp-cucumber.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This is only for development use."
4141
(defcustom lsp-cucumber-active-modes
4242
'( feature-mode)
4343
"List of major mode that work with Cucumber language server."
44-
:type '(list symbol)
44+
:type '(repeat function)
4545
:group 'lsp-cucumber)
4646

4747
(lsp-defcustom lsp-cucumber-features

clients/lsp-eslint.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ workspace (see https://eslint.org/docs/user-guide/command-line-interface)."
176176

177177
(defcustom lsp-eslint-code-action-disable-rule-comment t
178178
"Controls whether code actions to add a rule-disabling comment should be shown."
179-
:type 'bool
179+
:type 'boolean
180180
:package-version '(lsp-mode . "6.3"))
181181

182182
(defcustom lsp-eslint-code-action-disable-rule-comment-location "separateLine"
@@ -193,12 +193,12 @@ Accepts the following values:
193193
(defcustom lsp-eslint-code-action-show-documentation t
194194
"Controls whether code actions to show documentation for an ESLint rule should
195195
be shown."
196-
:type 'bool
196+
:type 'boolean
197197
:package-version '(lsp-mode . "8.0.0"))
198198

199199
(defcustom lsp-eslint-warn-on-ignored-files nil
200200
"Controls whether a warning should be emitted when a file is ignored."
201-
:type 'bool
201+
:type 'boolean
202202
:package-version '(lsp-mode . "8.0.0"))
203203

204204
(defcustom lsp-eslint-rules-customizations []

clients/lsp-glsl.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"Command to run the GLSL language server."
3737
:group 'lsp-glsl
3838
:risky t
39-
:type '(list string))
39+
:type '(repeat string))
4040

4141
(lsp-register-client
4242
(make-lsp-client

clients/lsp-idris.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
(defcustom lsp-idris2-lsp-trace-server "off"
4646
"Traces the communication between VS Code and the language server."
4747
:group 'lsp-idris
48-
:type '(choice (:tag "off" "messages" "verbose"))
48+
:type '(choice (const "off")
49+
(const "messages")
50+
(const "verbose"))
4951
:package-version '(lsp-mode . "9.0.0"))
5052

5153
(lsp-register-custom-settings

clients/lsp-kotlin.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ executable with `exec-path'."
5050

5151
(defcustom lsp-kotlin-trace-server "off"
5252
"Traces the communication between VSCode and the Kotlin language server."
53-
:type '(choice (:tag "off" "messages" "verbose"))
53+
:type '(choice (const "off")
54+
(const "messages")
55+
(const "verbose")
56+
)
5457
:group 'lsp-kotlin
5558
:package-version '(lsp-mode . "6.1"))
5659

clients/lsp-lisp.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
(defcustom lsp-lisp-active-modes
3535
'( lisp-mode)
3636
"List of major mode that work with lisp."
37-
:type '(list symbol)
37+
:type '(repeat function)
3838
:group 'lsp-lisp)
3939

4040
(defcustom lsp-lisp-alive-port 8006

clients/lsp-lua.el

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,18 @@
137137

138138
(defcustom lsp-lua-color-mode "Semantic"
139139
"Color mode."
140-
:type '(choice (:tag "Grammar" "Semantic"))
140+
:type '(choice (const "Grammar")
141+
(const "Semantic"))
141142
:package-version '(lsp-mode . "8.0.0")
142143
:group 'lsp-lua-language-server)
143144

144145
(defcustom lsp-lua-completion-call-snippet "Disable"
145146
"Shows function call snippets."
146-
:type '(choice (:tag "Disable" "Both" "Replace"))
147+
:type '(choice
148+
(const "Disable")
149+
(const "Both")
150+
(const "Replace")
151+
)
147152
:package-version '(lsp-mode . "8.0.0")
148153
:group 'lsp-lua-language-server)
149154

@@ -165,7 +170,9 @@ fragment. If it is set to `0`, this feature can be disabled."
165170

166171
(defcustom lsp-lua-completion-keyword-snippet "Replace"
167172
"Shows keyword syntax snippets."
168-
:type '(choice (:tag "Disable" "Both" "Replace"))
173+
:type '(choice (const "Disable")
174+
(const "Both")
175+
(const "Replace"))
169176
:package-version '(lsp-mode . "8.0.0")
170177
:group 'lsp-lua-language-server)
171178

@@ -339,7 +346,8 @@ tolerance for this setting. Please adjust it to the appropriate value."
339346
(defcustom lsp-lua-runtime-file-encoding "utf8"
340347
"File encoding. The `ansi' option is only available under the `Windows'
341348
platform."
342-
:type '(choice (:tag "utf8" "ansi"))
349+
:type '(choice (const "utf8")
350+
(const "ansi"))
343351
:package-version '(lsp-mode . "8.0.0")
344352
:group 'lsp-lua-language-server)
345353

@@ -383,7 +391,13 @@ and the language server will provide special support.
383391

384392
(defcustom lsp-lua-runtime-version "Lua 5.4"
385393
"Lua runtime version."
386-
:type '(choice (:tag "Lua 5.1" "Lua 5.2" "Lua 5.3" "Lua 5.4" "LuaJIT"))
394+
:type '(choice
395+
(const "Lua 5.1")
396+
(const "Lua 5.2")
397+
(const "Lua 5.3")
398+
(const "Lua 5.4")
399+
(const "LuaJIT")
400+
)
387401
:package-version '(lsp-mode . "8.0.0")
388402
:group 'lsp-lua-language-server)
389403

0 commit comments

Comments
 (0)