Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 638 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 638 Bytes

XS002

The XS002 analyzer reports cases of schemas where attributes are not listed in alphabetical order.

Flagged Code

map[string]*schema.Schema{
    "name": { /* ... */ },
    "arn": { /* ... */ },
  },
}

Passing Code

map[string]*schema.Schema{
    "arn": { /* ... */ },
    "name": { /* ... */ },
  },
}

Ignoring Reports

Singular reports can be ignored by adding the a //lintignore:XS002 Go code comment at the end of the offending line or on the line immediately proceding, e.g.

//lintignore:XS002
map[string]*schema.Schema{
    "name": { /* ... */ },
    "arn": { /* ... */ },
  },
}