diff --git a/handlers/sshd_config/analyzer/match.go b/handlers/sshd_config/analyzer/match.go index cf1491e..68d4769 100644 --- a/handlers/sshd_config/analyzer/match.go +++ b/handlers/sshd_config/analyzer/match.go @@ -3,7 +3,7 @@ package analyzer import ( "config-lsp/common" sshdconfig "config-lsp/handlers/sshd_config" - match_parser "config-lsp/handlers/sshd_config/fields/match-parser" + matchparser "config-lsp/handlers/sshd_config/fields/match-parser" "config-lsp/utils" "errors" "fmt" @@ -54,7 +54,7 @@ func analyzeMatchBlocks( } func analyzeMatchValueNegation( - value *match_parser.MatchValue, + value *matchparser.MatchValue, ) []common.LSPError { errs := make([]common.LSPError, 0) @@ -83,7 +83,7 @@ func analyzeMatchValueNegation( } func analyzeMatchValuesContainsPositiveValue( - values *match_parser.MatchValues, + values *matchparser.MatchValues, ) []common.LSPError { if len(values.Values) == 0 { return nil diff --git a/handlers/sshd_config/ast/listener.go b/handlers/sshd_config/ast/listener.go index 27fa37a..aa744d8 100644 --- a/handlers/sshd_config/ast/listener.go +++ b/handlers/sshd_config/ast/listener.go @@ -4,7 +4,7 @@ import ( "config-lsp/common" commonparser "config-lsp/common/parser" "config-lsp/handlers/sshd_config/ast/parser" - match_parser "config-lsp/handlers/sshd_config/fields/match-parser" + matchparser "config-lsp/handlers/sshd_config/fields/match-parser" "strings" "github.com/emirpasic/gods/maps/treemap" @@ -109,10 +109,10 @@ func (s *sshParserListener) ExitEntry(ctx *parser.EntryContext) { if s.sshContext.isKeyAMatchBlock { // Add new match block - var match *match_parser.Match + var match *matchparser.Match if s.sshContext.currentOption.OptionValue != nil { - matchParser := match_parser.NewMatch() + matchParser := matchparser.NewMatch() errors := matchParser.Parse( s.sshContext.currentOption.OptionValue.Value.Raw, location.Start.Line, diff --git a/handlers/sshd_config/fields/match-parser/error-listener.go b/handlers/sshd_config/fields/match-parser/error-listener.go index fd9e4bb..e7264b0 100644 --- a/handlers/sshd_config/fields/match-parser/error-listener.go +++ b/handlers/sshd_config/fields/match-parser/error-listener.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import ( "config-lsp/common" diff --git a/handlers/sshd_config/fields/match-parser/listener.go b/handlers/sshd_config/fields/match-parser/listener.go index 01f6fb4..ce5e130 100644 --- a/handlers/sshd_config/fields/match-parser/listener.go +++ b/handlers/sshd_config/fields/match-parser/listener.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import ( "config-lsp/common" diff --git a/handlers/sshd_config/fields/match-parser/match_ast.go b/handlers/sshd_config/fields/match-parser/match_ast.go index 1d80f78..d45105e 100644 --- a/handlers/sshd_config/fields/match-parser/match_ast.go +++ b/handlers/sshd_config/fields/match-parser/match_ast.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import ( "config-lsp/common" diff --git a/handlers/sshd_config/fields/match-parser/match_fields.go b/handlers/sshd_config/fields/match-parser/match_fields.go index dca690d..3dc12dd 100644 --- a/handlers/sshd_config/fields/match-parser/match_fields.go +++ b/handlers/sshd_config/fields/match-parser/match_fields.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import "slices" diff --git a/handlers/sshd_config/fields/match-parser/parser.go b/handlers/sshd_config/fields/match-parser/parser.go index abbc2f7..d81f73c 100644 --- a/handlers/sshd_config/fields/match-parser/parser.go +++ b/handlers/sshd_config/fields/match-parser/parser.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import ( "config-lsp/common" diff --git a/handlers/sshd_config/fields/match-parser/parser_test.go b/handlers/sshd_config/fields/match-parser/parser_test.go index 2dbdb8a..558ce21 100644 --- a/handlers/sshd_config/fields/match-parser/parser_test.go +++ b/handlers/sshd_config/fields/match-parser/parser_test.go @@ -1,4 +1,4 @@ -package match_parser +package matchparser import ( "testing" diff --git a/handlers/sshd_config/handlers/completions_match.go b/handlers/sshd_config/handlers/completions_match.go index 462afa4..773727f 100644 --- a/handlers/sshd_config/handlers/completions_match.go +++ b/handlers/sshd_config/handlers/completions_match.go @@ -3,14 +3,14 @@ package handlers import ( sshdconfig "config-lsp/handlers/sshd_config" "config-lsp/handlers/sshd_config/fields" - match_parser "config-lsp/handlers/sshd_config/fields/match-parser" + matchparser "config-lsp/handlers/sshd_config/fields/match-parser" protocol "github.com/tliron/glsp/protocol_3_16" ) func getMatchCompletions( d *sshdconfig.SSHDocument, - match *match_parser.Match, + match *matchparser.Match, cursor uint32, ) ([]protocol.CompletionItem, error) { if match == nil || len(match.Entries) == 0 { @@ -34,31 +34,31 @@ func getMatchCriteriaCompletions() []protocol.CompletionItem { return []protocol.CompletionItem{ { - Label: string(match_parser.MatchCriteriaTypeUser), + Label: string(matchparser.MatchCriteriaTypeUser), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeGroup), + Label: string(matchparser.MatchCriteriaTypeGroup), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeHost), + Label: string(matchparser.MatchCriteriaTypeHost), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeAddress), + Label: string(matchparser.MatchCriteriaTypeAddress), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeLocalAddress), + Label: string(matchparser.MatchCriteriaTypeLocalAddress), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeLocalPort), + Label: string(matchparser.MatchCriteriaTypeLocalPort), Kind: &kind, }, { - Label: string(match_parser.MatchCriteriaTypeRDomain), + Label: string(matchparser.MatchCriteriaTypeRDomain), Kind: &kind, }, } @@ -74,7 +74,7 @@ func getMatchAllKeywordCompletion() protocol.CompletionItem { } func getMatchValueCompletions( - entry *match_parser.MatchEntry, + entry *matchparser.MatchEntry, cursor uint32, ) []protocol.CompletionItem { value := entry.GetValueByCursor(entry.End.Character) @@ -91,19 +91,19 @@ func getMatchValueCompletions( } switch entry.Criteria.Type { - case match_parser.MatchCriteriaTypeUser: + case matchparser.MatchCriteriaTypeUser: return fields.MatchUserField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeGroup: + case matchparser.MatchCriteriaTypeGroup: return fields.MatchGroupField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeHost: + case matchparser.MatchCriteriaTypeHost: return fields.MatchHostField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeAddress: + case matchparser.MatchCriteriaTypeAddress: return fields.MatchAddressField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeLocalAddress: + case matchparser.MatchCriteriaTypeLocalAddress: return fields.MatchLocalAddressField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeLocalPort: + case matchparser.MatchCriteriaTypeLocalPort: return fields.MatchLocalPortField.FetchCompletions(line, relativeCursor) - case match_parser.MatchCriteriaTypeRDomain: + case matchparser.MatchCriteriaTypeRDomain: return fields.MatchRDomainField.FetchCompletions(line, relativeCursor) }