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

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.

ssvaidyanathan commented 5 months ago

Thanks for the PR @ipierre1

Can you pls sign the Contributor License Agreement (CLA) so that I can merge and release this version

ipierre1 commented 5 months ago

Hi @ssvaidyanathan ,

Yes, I just sign CLA with my GitHub username. Thanks in advance

ssvaidyanathan commented 5 months ago

Its still not approved --> https://github.com/apigee/apigeelint/pull/429/checks?check_run_id=22844353512

ipierre1 commented 5 months ago

Its still not approved --> https://github.com/apigee/apigeelint/pull/429/checks?check_run_id=22844353512

Sorry I hadn't clicked on the re-scan button, now on the checks page it appears green.