MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / newFullLinter

Function newFullLinter

pkg/mcp/tools.go:224–239  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Private helpers --------------------------------------------------------------------------- newFullLinter mirrors createLinter() from cmd/gosqlx/cmd/lint.go exactly, using a fixed line-length of 100 for the MCP context.

()

Source from the content-addressed store, hash-verified

222// newFullLinter mirrors createLinter() from cmd/gosqlx/cmd/lint.go exactly,
223// using a fixed line-length of 100 for the MCP context.
224func newFullLinter() *linter.Linter {
225 return linter.New(
226 whitespace.NewTrailingWhitespaceRule(), // L001
227 whitespace.NewMixedIndentationRule(), // L002
228 whitespace.NewConsecutiveBlankLinesRule(1), // L003
229 whitespace.NewIndentationDepthRule(4, 4), // L004
230 whitespace.NewLongLinesRule(100), // L005
231 whitespace.NewRedundantWhitespaceRule(), // L010
232
233 style.NewColumnAlignmentRule(), // L006
234 style.NewCommaPlacementRule(style.CommaTrailing), // L008
235 style.NewAliasingConsistencyRule(true), // L009
236
237 keywords.NewKeywordCaseRule(keywords.CaseUpper), // L007
238 )
239}
240
241// toolResult marshals a map[string]any result into an MCP CallToolResult.
242func toolResult(data map[string]any) (*mcpmcp.CallToolResult, error) {

Callers 2

lintSQLInternalFunction · 0.85

Calls 10

NewFunction · 0.92
NewMixedIndentationRuleFunction · 0.92
NewIndentationDepthRuleFunction · 0.92
NewLongLinesRuleFunction · 0.92
NewColumnAlignmentRuleFunction · 0.92
NewCommaPlacementRuleFunction · 0.92

Tested by 1