Skip to content

Commit

Permalink
feat: add format_line_length input (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo authored May 17, 2023
1 parent a6d1ada commit 7436cf3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/dart_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
required: false
type: string
default: "."
format_line_length:
required: false
type: string
default: "80"
min_coverage:
required: false
type: number
Expand Down Expand Up @@ -77,7 +81,7 @@ jobs:
run: ${{inputs.setup}}

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed ${{inputs.format_directories}}
run: dart format --line-length ${{inputs.format_line_length}} --set-exit-if-changed ${{inputs.format_directories}}

- name: 🕵️ Analyze
run: dart analyze --fatal-infos --fatal-warnings ${{inputs.analyze_directories}}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/flutter_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
required: false
type: string
default: "lib test"
format_line_length:
required: false
type: string
default: "80"
min_coverage:
required: false
type: number
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
run: ${{inputs.setup}}

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed ${{inputs.format_directories}}
run: dart format --line-length ${{inputs.format_line_length}} --set-exit-if-changed ${{inputs.format_directories}}

- name: 🕵️ Analyze
run: flutter analyze ${{inputs.analyze_directories}}
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ The Dart package workflow consists of the following steps:

**Default** `"stable"`

#### `format_line_length`

**Optional** The line-length preferred to run the `dart format` command with. Be aware that this does not change the behavior of the analysis step and longer lines could still make the workflow fail if the rule `lines_longer_than_80_chars` is used.

**Default** `"80"`

#### `min_coverage`

**Optional** The minimum coverage percentage allowed.
Expand Down Expand Up @@ -195,6 +201,12 @@ The Flutter package workflow consists of the following steps:

**Default** `""`

#### `format_line_length`

**Optional** The line-length preferred to run the `dart format` command with. Be aware that this does not change the behavior of the analysis step and longer lines could still make the workflow fail if the rule `lines_longer_than_80_chars` is used.

**Default** `"80"`

#### `min_coverage`

**Optional** The minimum coverage percentage allowed.
Expand Down

0 comments on commit 7436cf3

Please sign in to comment.