microsoft / go-winio

Win32 IO-related utilities for Go
MIT License
946 stars 180 forks source link

Add lint and go generate steps to CI #254

Closed helsaawy closed 2 years ago

helsaawy commented 2 years ago

Changes are broken out into two commits The first adds config files, updates ci.yml, adds the git attributes, and updates the README. The second updates the repo to pass the linting stage.

Add CI step to verify go generate was run on repo. Add linter stage to CI along with linter config file, .golangci.yml.

Updated README.md Contributing section on linting requirements.

Added .gitattributes file to prevent issues with checkout out CRLF and gofmt

Added sequence ordering to make sure lint and go generate stages run before tests and build. This way, build and tests are not run on code that could potentially:

  1. not build due to gofmt issues;
  2. contain bugs;
  3. have to be re-submitted after issues are fixed; or
  4. contain outdated Win32 syscall or other auto-generated files.