Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 6ae2211

Browse files
authored
chore: bump dart-code-metrics-action (#751)
* chore: bump dart-code-metrics-action * docs: update documentation
1 parent c50fffa commit 6ae2211

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.github/workflows/package_analyze.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,16 @@ jobs:
6161
run: dart analyze --fatal-warnings --fatal-infos .
6262

6363
- name: Analyze by Dart Code Metrics
64-
uses: dart-code-checker/dart-code-metrics-action@v1
64+
uses: dart-code-checker/dart-code-metrics-action@v1.5.0
6565
with:
6666
github_token: ${{ secrets.GITHUB_TOKEN }}
6767
folders: "bin, example, lib, test"
68+
pull_request_comment: true
69+
fatal_warnings: true
70+
fatal_performance: true
71+
fatal_style: true
6872
check_unused_files: true
6973
check_unused_files_folders: "bin, example, lib"
70-
pull_request_comment: true
7174

7275
- name: Verify formatting
7376
run: dart format --set-exit-if-changed .

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"Checkstyle",
1010
"codeclimate",
1111
"codecov",
12+
"codemagic",
1213
"codequality",
1314
"commitlint",
1415
"cyclomatic",

website/docs/integrations/github-action.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GitHub Action
22

3-
Dart Code Metrics GitHub Action allows you to integrate Dart Code Metrics into your CI/CD process and get code quality reports inside PR's.
3+
[Dart Code Metrics GitHub Action](https://github.com/marketplace/actions/dart-code-metrics-action) allows you to integrate Dart Code Metrics into your CI/CD process and get code quality reports inside PR's.
44

55
## Usage {#usage}
66

@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222

2323
- name: dart-code-metrics
2424
uses: dart-code-checker/dart-code-metrics-action@v1
@@ -28,13 +28,22 @@ jobs:
2828
2929
### Inputs {#inputs}
3030
31-
| Name | Required | Description | Default |
32-
| :--------------------- | :------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------ |
33-
| **github_token** | ☑️ | Required to post a report on GitHub. _Note:_ the secret [`GITHUB_TOKEN`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token) is already provided by GitHub and you don't have to set it up yourself. | |
34-
| **folders** | | List of folders whose contents will be scanned. | [`lib`] |
35-
| **relative_path** | | If your package isn't at the root of the repository, set this input to indicate its location. | |
36-
| **github_pat** | Required if you had private GitHub repository in the package dependencies | [**Personal access token**](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) must access to _repo_ and _read:user_ [scopes](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) | |
37-
| **check_unused_files** | | Additional scan for find unused files in package. | `false` |
31+
### Inputs
32+
33+
| Name | Required | Description | Default |
34+
| :------------------------------------ | :------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------ |
35+
| **github_token** | ☑️ | Required to post a report on GitHub. *Note:* the secret [`GITHUB_TOKEN`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token) is already provided by GitHub and you don't have to set it up yourself. | |
36+
| **github_pat** | Required if you had private GitHub repository in the package dependencies | [**Personal access token**](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) must access to *repo* and *read:user* [scopes](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) | |
37+
| **folders** | | List of folders whose contents will be scanned. | [`lib`] |
38+
| **relative_path** | | If your package isn't at the root of the repository, set this input to indicate its location. | |
39+
| **pull_request_comment** | | Publish detailed report commented directly into your pull request. | `false` |
40+
| **analyze_report_title_pattern** | | Configurable analyze report title pattern. | `Dart Code Metrics analyze report of $packageName` |
41+
| **fatal_warnings** | | Treat warning level issues as fatal. | `false` |
42+
| **fatal_performance** | | Treat performance level issues as fatal. | `false` |
43+
| **fatal_style** | | Treat style level issues as fatal. | `false` |
44+
| **check_unused_files** | | Additional scan for find unused files in package. | `false` |
45+
| **check_unused_files_folders** | | List of folders whose contents will be scanned for find unused files. | Taken from `folders` argument |
46+
| **unused_files_report_title_pattern** | | Configurable unused files report title pattern. | `Dart Code Metrics unused files report of $packageName` |
3847

3948
### Output example {#output-example}
4049

0 commit comments

Comments
 (0)