mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
25 lines
455 B
Go
25 lines
455 B
Go
package analyzer
|
|
|
|
import (
|
|
"config-lsp/common"
|
|
sshconfig "config-lsp/handlers/ssh_config"
|
|
"errors"
|
|
)
|
|
|
|
func analyzeBlocks(
|
|
d *sshconfig.SSHDocument,
|
|
) []common.LSPError {
|
|
errs := make([]common.LSPError, 0)
|
|
|
|
for _, block := range d.GetAllBlocks() {
|
|
if block.GetOptions().Size() == 0 {
|
|
errs = append(errs, common.LSPError{
|
|
Range: block.GetEntryOption().LocationRange,
|
|
Err: errors.New("This block is empty"),
|
|
})
|
|
}
|
|
}
|
|
|
|
return errs
|
|
}
|