crossplane-contrib / crossplane-lint

27 stars 10 forks source link

ignore well-known crossplane fields #5

Open janwillies opened 1 year ago

janwillies commented 1 year ago

Given the following input:

- fromFieldPath: "metadata.uid"
  toFieldPath: "spec.writeConnectionSecretToRef.name"
  transforms:
    - type: string
      string:
        fmt: "%s-sql" #change

The linter spots an error because it can't find metadata.uid in the XRD.

The linter should know about the well-known fields, e.g. https://github.com/crossplane/crossplane/blob/4e4f57a80dc19d24bb712acaa853a836b6963dc9/internal/xcrd/schemas.go#L23-L25