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 #427

Closed ipierre1 closed 5 months ago

ipierre1 commented 5 months ago

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

ssvaidyanathan commented 5 months ago

now available in v2.50.0

Thanks for the PR :)