Skip to content

Latest commit

 

History

History

XS002

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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": { /* ... */ },
  },
}