camaraproject / QualityOnDemand

Repository to describe, develop, document and test the QualityOnDemand API family
https://wiki.camaraproject.org/x/zwOeAQ
Apache License 2.0
41 stars 59 forks source link

First pass for including linting for pull requests #171

Closed RandyLevensalor closed 1 year ago

RandyLevensalor commented 1 year ago

What type of PR is this?

Add one of the following kinds:

What this PR does / why we need it:

This is a first pass to include linting for all pull requests.

With linting we will automate some of the error checking and validation for our commits. Improving the overall code quality and consistency.

Which issue(s) this PR fixes:

Fixes #158

Special notes for reviewers:

This PR includes some changes to the api to resolve many of the linting issues. The majority of these are white space changes, but a few require further scrutiny.

Several of the linters which are included with Megalinter have been disabled. The majority of the errors found were related to the cucumber code and are not the target for the PR. They can be added back at a later date.

The kics linter highlights several "medium" risk security vulnerabilities that could be tedious, but easy to fix if we choose to fix them.

The devskim errors are related to using http for urls in testing and not https. We could update this be use https for the default URL and ignoring the cucumber files for this linter.

.openapirc.yml is where we can modify or extend any of the default rules. Two examples were added to match the commonalities documentation. This is used by the spectral OpenAPI linter. Documentation for spectral is here

There's a lot to discuss with this and even more options that we can configure.

This PR can also be split into two or more PR to separate the API changes from the additions to the linting.

Changelog input

Adding linting and tidying up the API formatting.

Additional documentation

This section can be blank.

docs
RandyLevensalor commented 1 year ago

It looks like I don't have permission to enabling the github actions. An example of the output can be viewed on the cablelabs fork here

RandyLevensalor commented 1 year ago

Splitting this into multiple PRs