--------------------------------------------------------------------------- Private helpers --------------------------------------------------------------------------- newFullLinter mirrors createLinter() from cmd/gosqlx/cmd/lint.go exactly, using a fixed line-length of 100 for the MCP context.
()
| 222 | // newFullLinter mirrors createLinter() from cmd/gosqlx/cmd/lint.go exactly, |
| 223 | // using a fixed line-length of 100 for the MCP context. |
| 224 | func 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. |
| 242 | func toolResult(data map[string]any) (*mcpmcp.CallToolResult, error) { |