This action allows to use DCM from GitHub Actions.
DCM is a static analysis tool that helps you analyze and improve your code quality.
Create dartcodemetrics.yaml under .github/workflows With the following contents.
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 }}| 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:userscopes | |
| 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 |
If you would like to help contribute to this GitHub Action, please see CONTRIBUTING
The scripts and documentation in this project are released under the MIT License

