efm-langserver
efm-langserver copied to clipboard
Prefix do not work pattern?
Summary
When work yamllint and actionlint under efm-langerver. yamllint message inlucde prefix. actionlint message do not include prefix.
test setting
efm-langserver setting
version: 2
tools:
yamllint-lint: &yamllint-lint
prefix: yamllint
lint-command: 'yamllint --strict --format parsable ${INPUT}'
lint-stdin: false
lint-formats:
- '%f:%l:%c: [%t%*[a-z]] %m'
env:
- 'PYTHONIOENCODING=UTF-8'
actionlint-lint: &actionlint-lint
prefix: actionlint
lint-command: "bash -c \"[[ '${INPUT}' =~ \\\\.github/workflows/ ]]\" && actionlint -oneline -no-color -"
lint-stdin: true
lint-formats:
- '%f:%l:%c: %m'
root-markers:
- .github
languages:
yaml:
- <<: *yamllint-lint
- <<: *actionlint-lint
see also tsuyoshicho/vim-efm-langserver-settings latest
target file (OK)
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: test
run:
echo "test"
# Actionlint : no error
vim quickfix result
.github\workflows\actionlint_ok.yml|1 col 1 warning| Warning:[yamllint] missing document start "---" (document-start)
.github\workflows\actionlint_ok.yml|1 col 1 warning| Warning:[yamllint] truthy value should be one of [false, true] (truthy)
.github\workflows\actionlint_ok.yml|1 col 9 error| Error:[yamllint] wrong new line character: expected \n (new-lines)
target file (NG)
on: pop
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: test
run:
echo "test"
# Actionlint : error occur
# .github\workflows\actionlint_ok.yml|1 col 5 error| Error:1:Value is not accepted. Valid values:...
(for .github/workflows/actionlint_ng.yml)
vim quickfix result
.github\workflows\actionlint_ng.yml|1 col 5 error| Error:1:Value is not accepted. Valid values: "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issue_comment", "issues", "label", "member", "milestone", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "pull_request_target", "push", "registry_package", "release", "status", "watch", "workflow_dispatch", "workflow_run", "repository_dispatch".
.github\workflows\actionlint_ng.yml|1 col 1 warning| Warning:[yamllint] missing document start "---" (document-start)
.github\workflows\actionlint_ng.yml|1 col 1 warning| Warning:[yamllint] truthy value should be one of [false, true] (truthy)
.github\workflows\actionlint_ng.yml|1 col 8 error| Error:[yamllint] wrong new line character: expected \n (new-lines)
.github\workflows\actionlint_ng.yml|11 col 81 error| Error:[yamllint] line too long (110 > 80 characters) (line-length)
or use test file repo https://github.com/tsuyoshicho/action-test-repo/tree/test/efm-actionlint
Expect result
prefix work fine
.github\workflows\actionlint_ng.yml|1 col 5 error| Error:1:[actionlint] Value is not accepted. Valid values: "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issue_comment", "issues", "label", "member", "milestone", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "pull_request_target", "push", "registry_package", "release", "status", "watch", "workflow_dispatch", "workflow_run", "repository_dispatch".
Actual result
- yamllint with prefix message
- actionlint without prefix message
.github\workflows\actionlint_ng.yml|1 col 5 error| Error:1:Value is not accepted. Valid values: "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issue_comment", "issues", "label", "member", "milestone", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "pull_request_target", "push", "registry_package", "release", "status", "watch", "workflow_dispatch", "workflow_run", "repository_dispatch".
First line actionlint error message, do not contain [actionlint]
.
i had the same problem, with pylint and eslint. I am using neovim, i reinstalled the efm server and it worked.
EDIT: installed using LSPInstall
Thanks, I re-try it. (but I'm installing efm latest before it tests...)
Don't fix it...