Skip to content

Instantly share code, notes, and snippets.

@becojo
Created July 15, 2024 16:52
Show Gist options
  • Save becojo/77b6fa8a30541c5732a6fb39ffb815c8 to your computer and use it in GitHub Desktop.
Save becojo/77b6fa8a30541c5732a6fb39ffb815c8 to your computer and use it in GitHub Desktop.
rules:
- id: go-migrate-dagger
languages: [go]
patterns:
- pattern-either:
- pattern: func $F(..., $ARG *$T, ...) $RET
- pattern: func $F(...) *$T
- pattern: func(...) *$T { ... }
- pattern: func(..., $ARG *$T, ...) $RET { ... }
- pattern: |
type $S struct {
...
$F *$T
...
}
- metavariable-regex:
metavariable: $T
regex: (Container|Directory|File|Secret|Service)
- focus-metavariable: $T
severity: WARNING
message: "Dagger Go SDK types must use the `dagger.` prefix starting 0.12"
fix: dagger.$T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment