-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Description
Running pana on a Dart package (^3.8.0) with a lint package that depends on a linter package configuring trailing_commas: preserve
returns the following output:
## ✗ Pass static analysis (40 / 50)
### [~] 40/50 points: code has no errors, warnings, lints, or formatting issues
<details>
<summary>
/private/var/folders/g2/tbck_xp929j_lxjk6d79trwr0000gp/T/pana_aPI6ZQ/lib/my_package.dart doesn't match the Dart formatter.
</summary>
To format your files run: `dart format .`
</details>
Overriding the setting in the package's own analysis_options.yaml
and setting trailing_commas: preserve
there returns the following output:
## ✓ Pass static analysis (50 / 50)
### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues
Current behavoiur
Receiving only 40/50 points.
Expected behaviour
Receiving 50/50 points without setting trailing_commas: preserve
to the package's own analysis_options.yaml
.
Steps to reproduce
- Create a new Dart package my_linter with SDK constraint ^3.8.0.
- Create an analysis_options.yanl with the follwing as content inside lib
formatter:
trailing_commas: preserve
- Create another package my_package with SDK constraint ^3.8.0.
- Add my_linter to dev_dependencies
- Put the following content inside my_package.dart
void foo(
int a,
int b,
) {}
- Run the following command inside my_package
dart pub global run pana .
alestiago, zzundalek, leif-zuttermeister and FMorschel
Metadata
Metadata
Assignees
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)