-
Notifications
You must be signed in to change notification settings - Fork 20
Labels
Description
We should add a code action to ignore InvalidBaseImagePlatform warnings.
docker-language-server/internal/pkg/buildkit/service.go
Lines 178 to 227 in 010a5d4
| func createIgnoreEdit(ruleName string) *types.NamedEdit { | |
| switch ruleName { | |
| case "ConsistentInstructionCasing": | |
| fallthrough | |
| case "CopyIgnoredFile": | |
| fallthrough | |
| case "DuplicateStageName": | |
| fallthrough | |
| case "FromAsCasing": | |
| fallthrough | |
| case "FromPlatformFlagConstDisallowed": | |
| fallthrough | |
| case "InvalidDefaultArgInFrom": | |
| fallthrough | |
| case "InvalidDefinitionDescription": | |
| fallthrough | |
| case "JSONArgsRecommended": | |
| fallthrough | |
| case "LegacyKeyValueFormat": | |
| fallthrough | |
| case "MaintainerDeprecated": | |
| fallthrough | |
| case "MultipleInstructionsDisallowed": | |
| fallthrough | |
| case "NoEmptyContinuation": | |
| fallthrough | |
| case "RedundantTargetPlatform": | |
| fallthrough | |
| case "ReservedStageName": | |
| fallthrough | |
| case "SecretsUsedInArgOrEnv": | |
| fallthrough | |
| case "StageNameCasing": | |
| fallthrough | |
| case "UndefinedArgInFrom": | |
| fallthrough | |
| case "UndefinedVar": | |
| fallthrough | |
| case "WorkdirRelativePath": | |
| return &types.NamedEdit{ | |
| Title: fmt.Sprintf("Ignore this type of error with check=skip=%v", ruleName), | |
| Edit: fmt.Sprintf("# check=skip=%v\n", ruleName), | |
| Range: &protocol.Range{ | |
| Start: protocol.Position{Line: 0, Character: 0}, | |
| End: protocol.Position{Line: 0, Character: 0}, | |
| }, | |
| } | |
| } | |
| return nil | |
| } |