apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
91 stars 71 forks source link

[DevOps] Add CodeClimate style fomatter to use apigee-lint into GitLab CI/CD #428

Closed ipierre1 closed 5 months ago

ipierre1 commented 5 months ago

Linked to issue : https://github.com/apigee/apigeelint/issues/427

To use full functionnalities on GitLab CI/CD, it would be nice to implement codeclimate formatter to use codequality reports artifact into pipeline job artifacts as bellow:

apigeelint:
  stage: lint
  image: node:12-alpine
  before_script:
    - npm install -g apigeelint
  script:
    - apigeelint -f codeclimate.js > apigeelint-results.json
  artifacts:
    reports:
      codequality:
        - "${CI_PROJECT_DIR}/apigeelint-results.json"

Code Quality of GitLab use CodeClimate json format, with enforcement on fingerprint which is not optional for GitLab CI/CD.

Codequality : https://docs.gitlab.com/ee/ci/testing/code_quality.html Codeclimate specification : https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types

google-cla[bot] commented 5 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.