passsy / dart-lint

An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
Apache License 2.0
277 stars 82 forks source link

Comments in the analysis_options.yaml file break customization #5

Closed kuhnroyal closed 4 years ago

kuhnroyal commented 4 years ago

I am creating this issue after my comment here: https://github.com/passsy/dart-lint/issues/3#issuecomment-571707108

After further testing, I have discovered that the comment ins the analysis_options.yaml file break the possibility of customization. This may occur due to some YAML library parsing problems, maybe some undocumented handling of comment nodes, no idea.

I have done the following to determine this:

  1. Try to use pedenatic package and extend the rules adding and disabling - this works - pedantic has no comments in their files
  2. Copy the analysis_options.yaml file of this library to a local project file - customization does not work
  3. Remove all comments form the local file - customization works
Afsar-Pasha commented 4 years ago

https://github.com/passsy/dart-lint/commit/53718851f83a4fce3bf5788eefb2742fb247c564#diff-4bbaceb22700a77fd30e9913c8693dd1R395 (line with only "-") this caused the issue, fixed in https://github.com/passsy/dart-lint/commit/baed5a1aad2e0354e79c02a23e0ff298ce36f1e9#diff-4bbaceb22700a77fd30e9913c8693dd1L406, wait until new version is released.

kuhnroyal commented 4 years ago

Ah nice, must have missed this. I guess I keep the issue open until the next version is released. @passsy Can you pick this into the 2.7 branch?

passsy commented 4 years ago

Thanks for reporting @kuhnroyal and nailing down the problem @Afsar-Pasha!

I published v1.1.1 including the fix