Skip to content

Commit 31677d5

Browse files
- linting fiixes.
1 parent 8f34adc commit 31677d5

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

internal/stackql/astanalysis/earlyanalysis/first_passes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ func (sp *standardInitialPasses) initialPasses(
219219
return err
220220
}
221221
ast := result.AST
222+
//nolint:gocritic // prefer switch
222223
switch node := ast.(type) {
223224
case *sqlparser.Explain:
224225
ast = node.Statement

internal/stackql/planbuilder/entrypoint.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (pb *standardPlanBuilder) BuildUndoPlanFromContext(_ handler.HandlerContext
3838
return nil, nil
3939
}
4040

41-
//nolint:funlen,gocognit,errcheck // no big deal
41+
//nolint:funlen,gocognit,errcheck,gocyclo,cyclop // no big deal
4242
func (pb *standardPlanBuilder) BuildPlanFromContext(handlerCtx handler.HandlerContext) (plan.Plan, error) {
4343
defer handlerCtx.GetGarbageCollector().Close()
4444
tcc, err := internaldto.NewTxnControlCounters(handlerCtx.GetTxnCounterMgr())
@@ -163,6 +163,7 @@ func (pb *standardPlanBuilder) BuildPlanFromContext(handlerCtx handler.HandlerCo
163163
}
164164
}
165165

166+
//nolint:gocritic // prefer switch
166167
switch statement.(type) {
167168
case *sqlparser.Explain:
168169
// explain plans are never cacheable and always readonly

internal/stackql/primitivegenerator/statement_analyzer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@ func (pb *standardPrimitiveGenerator) analyzeSchemaVsMap(
891891
func (pb *standardPrimitiveGenerator) AnalyzePGInternal(
892892
pbi planbuilderinput.PlanBuilderInput) error {
893893
handlerCtx := pbi.GetHandlerCtx()
894+
//nolint:gocritic // prefer switch for now
894895
switch pbi.GetStatement().(type) {
895896
case *sqlparser.Explain:
896897
return pb.AnalyzeExplain(pbi, pbi.GetMessages(), nil)

0 commit comments

Comments
 (0)