Skip to content

Repository files navigation

Build StatusAction VersionLicenseGitHub popularityDocker Pulls

DCM logo

DCM Action

This action allows to use DCM from GitHub Actions.

What is DCM?

DCM is a static analysis tool that helps you analyze and improve your code quality.

Usage

Create dartcodemetrics.yaml under .github/workflows With the following contents.

Default configuration

name: DCMon: [push]jobs:
check:
name: dart-code-metrics-actionruns-on: ubuntu-lateststeps:
- uses: actions/checkout@v3
- name: dart-code-metricsuses: dart-code-checker/dart-code-metrics-action@v3with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

NameRequiredDescriptionDefault
github_token☑️Required to post a report on GitHub. Note: the secret GITHUB_TOKEN is already provided by GitHub and you don't have to set it up yourself.
github_patRequired if you had private GitHub repository in the package dependenciesPersonal access token must access to repo and read:userscopes
foldersList of folders whose contents will be scanned.[lib]
relative_pathIf your package isn't at the root of the repository, set this input to indicate its location.
pull_request_commentPublish detailed report commented directly into your pull request.false
analyze_report_title_patternConfigurable analyze report title pattern.DCM analyze report of $packageName
fatal_warningsTreat warning level issues as fatal.false
fatal_performanceTreat performance level issues as fatal.false
fatal_styleTreat style level issues as fatal.false
check_unused_filesAdditional scan for find unused files in package.false
check_unused_files_foldersList of folders whose contents will be scanned for find unused files.Taken from folders argument
unused_files_report_title_patternConfigurable unused files report title pattern.DCM unused files report of $packageName

Output Example

  • Check run output:

    annotation

  • Annotation:

    annotation

How to contribute

If you would like to help contribute to this GitHub Action, please see CONTRIBUTING

LICENSE

The scripts and documentation in this project are released under the MIT License

About

A GitHub action to perform DCM checks automatically

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages