Rename the installed bridge executable
This commit is contained in:
parent
fa486c61ae
commit
841695e30c
|
|
@ -930,7 +930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
||||
|
||||
[[package]]
|
||||
name = "vsg_bridge_ls"
|
||||
name = "vsg-bridge-ls"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "vsg_bridge_ls"
|
||||
name = "vsg-bridge-ls"
|
||||
description = "A very featureless VSG to lsp bridge"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
|
|
|
|||
|
|
@ -215,36 +215,36 @@ pipeline {
|
|||
publishChecks(
|
||||
conclusion: 'SUCCESS',
|
||||
name: 'Rust CI',
|
||||
summary: 'vsg_bridge_ls passed CI.',
|
||||
summary: 'vsg-bridge-ls passed CI.',
|
||||
text: 'Dependency audit/policy, MSRV/stable checks, formatting, tests, Clippy, and coverage completed successfully.',
|
||||
title: 'Build Successful'
|
||||
)
|
||||
|
||||
echo '✅ vsg_bridge_ls passed CI.'
|
||||
echo '✅ vsg-bridge-ls passed CI.'
|
||||
}
|
||||
|
||||
failure {
|
||||
publishChecks(
|
||||
conclusion: 'FAILURE',
|
||||
name: 'Rust CI',
|
||||
summary: 'vsg_bridge_ls failed CI.',
|
||||
summary: 'vsg-bridge-ls failed CI.',
|
||||
text: 'A dependency audit/policy, MSRV/stable, formatting, test, Clippy, or coverage check failed. Check the Jenkins log.',
|
||||
title: 'Build Failed'
|
||||
)
|
||||
|
||||
echo '❌ vsg_bridge_ls CI failed.'
|
||||
echo '❌ vsg-bridge-ls CI failed.'
|
||||
}
|
||||
|
||||
unstable {
|
||||
publishChecks(
|
||||
conclusion: 'ACTION_REQUIRED',
|
||||
name: 'Rust CI',
|
||||
summary: 'vsg_bridge_ls CI is unstable.',
|
||||
summary: 'vsg-bridge-ls CI is unstable.',
|
||||
text: 'The Jenkins build completed with an unstable status.',
|
||||
title: 'Build Unstable'
|
||||
)
|
||||
|
||||
echo '⚠️ vsg_bridge_ls CI is unstable.'
|
||||
echo '⚠️ vsg-bridge-ls CI is unstable.'
|
||||
}
|
||||
|
||||
cleanup {
|
||||
|
|
|
|||
21
README.md
21
README.md
|
|
@ -1,10 +1,10 @@
|
|||
# vsg_bridge_ls
|
||||
# vsg-bridge-ls
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
`vsg_bridge_ls` reports [VSG](https://github.com/jeremiah-c-leary/vhdl-style-guide)
|
||||
`vsg-bridge-ls` reports [VSG](https://github.com/jeremiah-c-leary/vhdl-style-guide)
|
||||
diagnostics through the Language Server Protocol (LSP). A complete setup needs
|
||||
the companion VSG fork and this bridge.
|
||||
|
||||
|
|
@ -49,8 +49,8 @@ Activate the environment and verify both executables:
|
|||
```sh
|
||||
. .venv/bin/activate
|
||||
command -v vsg
|
||||
command -v vsg_bridge_ls
|
||||
vsg_bridge_ls --version
|
||||
command -v vsg-bridge-ls
|
||||
vsg-bridge-ls --version
|
||||
```
|
||||
|
||||
The version includes both the Cargo release and build commit, for example
|
||||
|
|
@ -62,7 +62,12 @@ Add this minimal setup to `~/.config/helix/languages.toml`:
|
|||
|
||||
```toml
|
||||
[language-server.vsg_bridge_ls]
|
||||
command = "vsg_bridge_ls"
|
||||
command = "vsg-bridge-ls"
|
||||
args = [
|
||||
"--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml",
|
||||
# Uncomment the next line to enable the experimental grouped line fix.
|
||||
# "--experimental-multi-rule-line-fix",
|
||||
]
|
||||
|
||||
[[language]]
|
||||
name = "vhdl"
|
||||
|
|
@ -96,9 +101,9 @@ to request that action.
|
|||
For deliberately unformatted files and expected interactions, see the
|
||||
[LSP showcase](showcase/README.md).
|
||||
|
||||
An additional multi-rule action is available behind
|
||||
`--experimental-multi-rule-line-fix`. It is disabled by default because VSG
|
||||
phases can move later findings to different lines. See the
|
||||
The commented argument above enables an additional multi-rule action. It is
|
||||
disabled by default because VSG phases can move later findings to different
|
||||
lines. See the
|
||||
[experimental action safety notes](doc/experimental-multi-rule-line-fix.md)
|
||||
before enabling it.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ Add this configuration to `~/.config/helix/languages.toml`:
|
|||
|
||||
```toml
|
||||
[language-server.vsg_bridge_ls]
|
||||
command = "vsg_bridge_ls"
|
||||
command = "vsg-bridge-ls"
|
||||
args = [
|
||||
"--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml",
|
||||
# Uncomment the next line to enable the experimental grouped line fix.
|
||||
# "--experimental-multi-rule-line-fix",
|
||||
]
|
||||
|
||||
[[language]]
|
||||
name = "vhdl"
|
||||
|
|
@ -24,17 +29,19 @@ language-servers = ["vsg_bridge_ls"]
|
|||
auto-format = false
|
||||
```
|
||||
|
||||
To use VSG configuration files, add arguments to the server entry. Repeat
|
||||
To use another VSG configuration, change the path in the argument list. Repeat
|
||||
`-c PATH` for multiple files; relative paths are resolved from the project:
|
||||
|
||||
```toml
|
||||
args = ["-c", "vhdl/config.yaml"]
|
||||
```
|
||||
|
||||
The experimental grouped same-line action additionally requires
|
||||
`--experimental-multi-rule-line-fix` in this argument list. It is deliberately
|
||||
off by default; read its [safety notes](experimental-multi-rule-line-fix.md)
|
||||
before enabling it.
|
||||
The experimental grouped same-line action is enabled by uncommenting its entry
|
||||
in the complete example. It is deliberately off by default; read its
|
||||
[safety notes](experimental-multi-rule-line-fix.md) before enabling it.
|
||||
Keep every option and value as a separate quoted array item with a trailing
|
||||
comma. An absolute configuration path avoids dependence on Helix's project
|
||||
working directory.
|
||||
|
||||
If another VHDL server is installed, it can run alongside the bridge:
|
||||
|
||||
|
|
@ -66,17 +73,17 @@ Plug 'prabirshrestha/vim-lsp'
|
|||
Then register the bridge in `.vimrc`:
|
||||
|
||||
```vim
|
||||
if executable('vsg_bridge_ls')
|
||||
if executable('vsg-bridge-ls')
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'vsg_bridge_ls',
|
||||
\ 'cmd': {server_info->['vsg_bridge_ls']},
|
||||
\ 'cmd': {server_info->['vsg-bridge-ls']},
|
||||
\ 'allowlist': ['vhdl'],
|
||||
\ })
|
||||
endif
|
||||
```
|
||||
|
||||
Start Vim from the activated `.venv`. To pass a VSG configuration file, change
|
||||
the command to `['vsg_bridge_ls', '-c', 'vhdl/config.yaml']`.
|
||||
the command to `['vsg-bridge-ls', '-c', 'vhdl/config.yaml']`.
|
||||
|
||||
The bridge advertises standard LSP document formatting. Its standard code
|
||||
actions and formatting should appear through vim-lsp's corresponding commands.
|
||||
|
|
@ -104,7 +111,7 @@ Create `.vscode/lsp-proxy.json` in the VHDL project:
|
|||
[
|
||||
{
|
||||
"languageId": "vhdl",
|
||||
"command": "vsg_bridge_ls",
|
||||
"command": "vsg-bridge-ls",
|
||||
"transport": "stdio",
|
||||
"fileExtensions": [".vhd", ".vhdl"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Installation
|
||||
|
||||
`vsg_bridge_ls` starts `vsg` by name, so both executables must be available in
|
||||
`vsg-bridge-ls` starts `vsg` by name, so both executables must be available in
|
||||
the environment used by the editor. Formatting additionally requires the
|
||||
companion fork's `--stdout` and `--no-failure` options; upstream VSG alone is
|
||||
not sufficient for that workflow.
|
||||
|
|
@ -80,7 +80,7 @@ Check the same environment the editor will inherit:
|
|||
|
||||
```sh
|
||||
command -v vsg
|
||||
command -v vsg_bridge_ls
|
||||
command -v vsg-bridge-ls
|
||||
```
|
||||
|
||||
Python 3.8 is the fork's minimum supported version. The complete test suite and
|
||||
|
|
|
|||
|
|
@ -9,8 +9,12 @@ pass the showcase configuration to the bridge:
|
|||
|
||||
```toml
|
||||
[language-server.vsg_bridge_ls]
|
||||
command = "vsg_bridge_ls"
|
||||
args = ["--configuration", "showcase/vsg.yaml"]
|
||||
command = "vsg-bridge-ls"
|
||||
args = [
|
||||
"--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml",
|
||||
# Uncomment the next line to enable the experimental grouped line fix.
|
||||
# "--experimental-multi-rule-line-fix",
|
||||
]
|
||||
|
||||
[[language]]
|
||||
name = "vhdl"
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ mod tests {
|
|||
#[test]
|
||||
fn builds_vsg_configuration_arguments() {
|
||||
let options = Options::try_parse_from([
|
||||
"vsg_bridge_ls",
|
||||
"vsg-bridge-ls",
|
||||
"-c",
|
||||
"first.yaml",
|
||||
"--configuration",
|
||||
|
|
@ -145,7 +145,7 @@ mod tests {
|
|||
/// No configuration option produces an empty VSG argument vector.
|
||||
#[test]
|
||||
fn accepts_no_configuration_files() {
|
||||
let options = Options::try_parse_from(["vsg_bridge_ls"])
|
||||
let options = Options::try_parse_from(["vsg-bridge-ls"])
|
||||
.expect("options without configuration files are valid");
|
||||
|
||||
assert!(options.vsg_arguments().is_empty());
|
||||
|
|
@ -167,7 +167,7 @@ mod tests {
|
|||
#[test]
|
||||
fn parses_experimental_multi_rule_line_flag() {
|
||||
let options =
|
||||
Options::try_parse_from(["vsg_bridge_ls", "--experimental-multi-rule-line-fix"])
|
||||
Options::try_parse_from(["vsg-bridge-ls", "--experimental-multi-rule-line-fix"])
|
||||
.expect("experimental flag is valid");
|
||||
|
||||
assert!(options.experimental_multi_rule_line_fix);
|
||||
|
|
|
|||
Loading…
Reference in New Issue