open-traffic-generator / conformance

Open Traffic Generator Conformance Tests
MIT License
4 stars 1 forks source link

Add linter and auto-formatter for Python and Go tests in CI #39

Closed ashutshkumr closed 1 year ago

ashutshkumr commented 1 year ago

use black to lint and auto-format python code: https://github.com/open-traffic-generator/openapiart/blob/main/do.py#L144 for reference

use golangci-lint and gofmt to lint and format Go code: https://github.com/open-traffic-generator/openapiart/blob/main/do.py#L247 for reference

users should be able to run ./do.sh lint in order to format and lint all the tests. It should optionally accept an argument to specify path to be linted / format.

NOTE: When run by user, it should automatically fix any bad formatting and just raise linter error if there's any. But in CI, also raise an error if there's a need to fix bad formatting.