Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up many linting issues #4652

Merged
merged 7 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if: runner.os == 'Linux'
run: |
pip3 install python-language-server
sudo apt-get install clangd-11
sudo apt-get install clangd-15

- name: Install depedencies on macOS
if: runner.os == 'macOS'
Expand All @@ -69,7 +69,7 @@ jobs:

- name: Check clangd
if: runner.os == 'Linux'
run: "clangd-11 --version"
run: "clangd-15 --version"

- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-autotools.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
makefile-bsdmake-mode
makefile-imake-mode)
"List of major mode that work with Autotools."
:type 'list
:type '(repeat function)
:group 'lsp-autotools)

(defun lsp-autotools--download-server (_client callback error-callback update?)
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-awk.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Command to run the AWK language server."
:group 'lsp-awk
:risky t
:type 'list)
:type '(repeat string))

(lsp-register-client
(make-lsp-client
Expand Down
3 changes: 1 addition & 2 deletions clients/lsp-camel.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
;; Directory in which the servers will be installed. Lsp Server Install Dir: ~/.emacs.d/.cache/camells
(defcustom lsp-camel-jar-file (f-join lsp-server-install-dir "camells" lsp-camel-jar-name)
"Camel Language server jar command."
:type 'string
:group 'lsp-camel
:type 'file
:type 'directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be file instead of directory, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got confused from the comment above and seeing the word dir too many times. Definitely should be file

:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-camel-jar-download-url
Expand Down
3 changes: 2 additions & 1 deletion clients/lsp-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
(expand-file-name "~/.gitlibs/libs"))
"LSP clojure dirs that should be considered library folders."
:group 'lsp-clojure
:type 'list)
:type '(repeat directory)
)

(defcustom lsp-clojure-test-tree-position-params nil
"The optional test tree position params.
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-cucumber.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This is only for development use."
(defcustom lsp-cucumber-active-modes
'( feature-mode)
"List of major mode that work with Cucumber language server."
:type 'list
:type '(repeat function)
:group 'lsp-cucumber)

(lsp-defcustom lsp-cucumber-features
Expand Down
6 changes: 3 additions & 3 deletions clients/lsp-eslint.el
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ workspace (see https://eslint.org/docs/user-guide/command-line-interface)."

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

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

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

(defcustom lsp-eslint-rules-customizations []
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-glsl.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Command to run the GLSL language server."
:group 'lsp-glsl
:risky t
:type 'list)
:type '(repeat string))

(lsp-register-client
(make-lsp-client
Expand Down
4 changes: 3 additions & 1 deletion clients/lsp-idris.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
(defcustom lsp-idris2-lsp-trace-server "off"
"Traces the communication between VS Code and the language server."
:group 'lsp-idris
:type '(choice (:tag "off" "messages" "verbose"))
:type '(choice (const "off")
(const "messages")
(const "verbose"))
:package-version '(lsp-mode . "9.0.0"))

(lsp-register-custom-settings
Expand Down
5 changes: 4 additions & 1 deletion clients/lsp-kotlin.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ executable with `exec-path'."

(defcustom lsp-kotlin-trace-server "off"
"Traces the communication between VSCode and the Kotlin language server."
:type '(choice (:tag "off" "messages" "verbose"))
:type '(choice (const "off")
(const "messages")
(const "verbose")
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move ) to the previous line? Thanks!

:group 'lsp-kotlin
:package-version '(lsp-mode . "6.1"))

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(defcustom lsp-lisp-active-modes
'( lisp-mode)
"List of major mode that work with lisp."
:type 'list
:type '(repeat function)
:group 'lsp-lisp)

(defcustom lsp-lisp-alive-port 8006
Expand Down
24 changes: 19 additions & 5 deletions clients/lsp-lua.el
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,18 @@

(defcustom lsp-lua-color-mode "Semantic"
"Color mode."
:type '(choice (:tag "Grammar" "Semantic"))
:type '(choice (const "Grammar")
(const "Semantic"))
:package-version '(lsp-mode . "8.0.0")
:group 'lsp-lua-language-server)

(defcustom lsp-lua-completion-call-snippet "Disable"
"Shows function call snippets."
:type '(choice (:tag "Disable" "Both" "Replace"))
:type '(choice
(const "Disable")
(const "Both")
(const "Replace")
)
:package-version '(lsp-mode . "8.0.0")
:group 'lsp-lua-language-server)

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

(defcustom lsp-lua-completion-keyword-snippet "Replace"
"Shows keyword syntax snippets."
:type '(choice (:tag "Disable" "Both" "Replace"))
:type '(choice (const "Disable")
(const "Both")
(const "Replace"))
:package-version '(lsp-mode . "8.0.0")
:group 'lsp-lua-language-server)

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

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

(defcustom lsp-lua-runtime-version "Lua 5.4"
"Lua runtime version."
:type '(choice (:tag "Lua 5.1" "Lua 5.2" "Lua 5.3" "Lua 5.4" "LuaJIT"))
:type '(choice
(const "Lua 5.1")
(const "Lua 5.2")
(const "Lua 5.3")
(const "Lua 5.4")
(const "LuaJIT")
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the style to:

  :type '(choice (const "Lua 5.1")
                 (const "Lua 5.2")
                 (const "Lua 5.3")
                 (const "Lua 5.4")
                 (const "LuaJIT"))

:package-version '(lsp-mode . "8.0.0")
:group 'lsp-lua-language-server)

Expand Down
6 changes: 3 additions & 3 deletions clients/lsp-markdown.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

(defcustom lsp-markdown-server-command-args '("--parser=remark-parse" "--stdio")
"Command-line arguments for the markdown lsp server."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-markdown
:package-version '(lsp-mode . "8.0.0"))

Expand All @@ -59,9 +59,9 @@ For a complete list of plugins, check:

For a complete list of plugins, check:
https://github.com/unifiedjs/unified-language-server/blob/main/CONFIGURATION.md#re-using-settings"
:type '(choice (
:type '(choice
(const "retext-english")
(const "remark-parse")))
(const "remark-parse"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the style to:

  :type '(choice (const "retext-english")
                 (const "remark-parse")))
                 (const "remark-parse"))

:group 'lsp-markdown
:package-version '(lsp-mode . "8.0.0"))

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-marksman.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

(defcustom lsp-marksman-server-command-args '()
"Command-line arguments for the marksman lsp server. Not normally Needed."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-marksman
:package-version '(lsp-mode . "8.0.0"))

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-mdx.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

(defcustom lsp-mdx-server-command-args '("--stdio")
"Command-line arguments for the mdx lsp server."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-mdx
:package-version '(lsp-mode . "8.0.0"))

Expand Down
23 changes: 17 additions & 6 deletions clients/lsp-perlnavigator.el
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,40 @@ default to ~/.perlcriticrc. (no aliases, .bat files or ~/)."
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

(defconst lsp-perlnavigator--log-level-type
'(choice (const "error")
(const "warning")
(const "info")
(const "hint")
(const "none")
))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the style to:

'(choice  (const "error")
          (const "warning")
          (const "info")
          (const "hint")
          (const "none")))

And add a simple docstring to the variable? :)

(defcustom lsp-perlnavigator-severity5 "warning"
"Editor Diagnostic severity level for Critic severity 5."
:type '(choice (:tag "error" "warning" "info" "hint" "none"))
:type lsp-perlnavigator--log-level-type
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-perlnavigator-severity4 "info"
"Editor Diagnostic severity level for Critic severity 4."
:type '(choice (:tag "error" "warning" "info" "hint" "none"))
:type lsp-perlnavigator--log-level-type
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-perlnavigator-severity3 "hint"
"Editor Diagnostic severity level for Critic severity 3."
:type '(choice (:tag "error" "warning" "info" "hint" "none"))
:type lsp-perlnavigator--log-level-type
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-perlnavigator-severity2 "hint"
"Editor Diagnostic severity level for Critic severity 2."
:type '(choice (:tag "error" "warning" "info" "hint" "none"))
:type lsp-perlnavigator--log-level-type
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-perlnavigator-severity1 "hint"
"Editor Diagnostic severity level for Critic severity 1."
:type '(choice (:tag "error" "warning" "info" "hint" "none"))
:type lsp-perlnavigator--log-level-type
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

Expand All @@ -107,7 +114,11 @@ default to ~/.perlcriticrc. (no aliases, .bat files or ~/)."

(defcustom lsp-perlnavigator-trace-server "messages"
"Traces the communication between VS Code and the language server."
:type '(choice (:tag "off" "messages" "verbose"))
:type '(choice
(const "off")
(const "messages")
(const "verbose")
)
:group 'lsp-perlnavigator
:package-version '(lsp-mode . "9.0.0"))

Expand Down
8 changes: 6 additions & 2 deletions clients/lsp-php.el
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ definitions are found in excluded files/folders."
(lsp-defcustom lsp-intelephense-trace-server "off"
"Traces the communication between VSCode and the intelephense
language server."
:type '(choice (:tag "off" "messages" "verbose"))
:type '(choice
(const "off")
(const "messages")
(const "verbose")
)
:group 'lsp-intelephense
:package-version '(lsp-mode . "6.1")
:lsp-path "intelephense.trace.server")
Expand Down Expand Up @@ -440,7 +444,7 @@ already present."
"Alist mapping extension names to `composer' packages.
These extensions can be installed using
`lsp-phpactor-install-extension'."
:type '(alist :key-type "string" :value-type "string")
:type '(alist :key-type string :value-type string)
:group 'lsp-phpactor)

(defun lsp-phpactor-install-extension (extension)
Expand Down
6 changes: 3 additions & 3 deletions clients/lsp-pls.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

(defcustom lsp-pls-arguments nil
"Additional arguments needed to execute PLS."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-pls
:package-version '(lsp-mode . "9.0.0"))

Expand All @@ -58,7 +58,7 @@ Defaults to the workspace root when not configured."

(defcustom lsp-pls-include nil
"Paths to be added to your @INC."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-pls
:package-version '(lsp-mode . "9.0.0"))

Expand Down Expand Up @@ -99,7 +99,7 @@ By default, the perl used to run PLS will be used."
"Additional arguments to pass to Perl when syntax checking.
This is useful if there is a BEGIN block in your code that
changes behavior depending on the contents of @ARGV."
:type '(repeat 'string)
:type '(repeat string)
:group 'lsp-pls
:package-version '(lsp-mode . "9.0.0"))

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-prolog.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"The prolog-lsp server command."
:group 'lsp-prolog
:risky t
:type 'list)
:type '(repeat string))

(lsp-register-client
(make-lsp-client
Expand Down
7 changes: 6 additions & 1 deletion clients/lsp-purescript.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ Passed to the IDE server for source locations."
(lsp-defcustom lsp-purescript-formatter "purty"
"Tool to use to for formatting.
Must be installed and on PATH (or npm installed with addNpmPath set)"
:type '(choice (:tag none purty purs-tidy pose))
:type '(choice
(const "none")
(const "purty")
(const "purs-tidy")
(const "pose")
)
:group 'lsp-purescript
:package-version '(lsp-mode . "9.0.0")
:lsp-path "purescript.formatter")
Expand Down
Loading
Loading