Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.14 KB

README.md

File metadata and controls

40 lines (33 loc) · 1.14 KB

resharper-to-codeclimate

converts an xml file containing resharper inspectcode results to a json file that follows the code climate spec.

note, currently only converts to the subset of the code climate spec required for gitlab-ci.

usage

dotnet tool install -g resharper-to-codeclimate
resharper-to-codeclimate results.xml results.json

example .gitlab-ci.yml

variables:
  DOTNET_PACKAGES: '$CI_PROJECT_DIR\.nuget\packages'
  DOTNET_CLI_HOME: '$CI_PROJECT_DIR\.dotnet'
  DOTNET_NOLOGO: 'true'

codequality:
  stage: codequality
  script:
    - dotnet tools restore
    - jb inspectcode Project.sln -o=results.xml
    - resharper-to-codeclimate results.xml results.json
  cache:
    key:
      files: 
        - .config/dotnet-tools.json
    paths:
      - .nuget/
  artifacts:
    when: always
    reports:
      codequality:
        - results.json