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: DCM
on: [push]
jobs:
check:
name: dart-code-metrics-action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: dart-code-metrics
uses: dart-code-checker/dart-code-metrics-action@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Inputs
Name | Required | Description | Default |
---|---|---|---|
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_pat | Required if you had private GitHub repository in the package dependencies | Personal access token must access to repo and read:user scopes | |
folders | List of folders whose contents will be scanned. | [lib ] |
|
relative_path | If your package isn't at the root of the repository, set this input to indicate its location. | ||
pull_request_comment | Publish detailed report commented directly into your pull request. | false |
|
analyze_report_title_pattern | Configurable analyze report title pattern. | DCM analyze report of $packageName |
|
fatal_warnings | Treat warning level issues as fatal. | false |
|
fatal_performance | Treat performance level issues as fatal. | false |
|
fatal_style | Treat style level issues as fatal. | false |
|
check_unused_files | Additional scan for find unused files in package. | false |
|
check_unused_files_folders | List of folders whose contents will be scanned for find unused files. | Taken from folders argument |
|
unused_files_report_title_pattern | Configurable unused files report title pattern. | DCM unused files report of $packageName |
Output Example
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