Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential issues with defined lints sets #737

Closed
mit-mit opened this issue May 10, 2021 · 7 comments
Closed

Potential issues with defined lints sets #737

mit-mit opened this issue May 10, 2021 · 7 comments

Comments

@mit-mit
Copy link
Member

mit-mit commented May 10, 2021

I compared the lints listed in the yaml files here against my internal notes, and I'm seeing the following potential issues:

Core lints

Missing from this repo

  • always_declare_return_types
  • unawaited_futures

Recommended lints

  • avoid_empty_else
  • avoid_private_typedef_functions
  • avoid_relative_lib_imports
  • avoid_shadowing_type_parameters
  • avoid_types_as_parameter_names
  • await_only_futures
  • camel_case_extensions
  • camel_case_types
  • curly_braces_in_flow_control_structures
  • empty_catches
  • file_names
  • hash_and_equals
  • iterable_contains_unrelated_type
  • list_remove_unrelated_type
  • no_duplicate_case_values
  • non_constant_identifier_names
  • omit_local_variable_types
  • package_prefixed_library_names
  • prefer_generic_function_type_aliases
  • prefer_is_empty
  • prefer_is_not_empty
  • prefer_iterable_whereType
  • prefer_mixin
  • prefer_typing_uninitialized_variables
  • provide_deprecation_message
  • unnecessary_overrides
  • unrelated_type_equality_checks
  • use_rethrow_when_possible
  • valid_regexps
  • void_checks
@mit-mit
Copy link
Member Author

mit-mit commented May 10, 2021

@pq @munificent @goderbauer are all these omissions intentional?

@devoncarew
Copy link
Member

unawaited_futures, omit_local_variable_types, and prefer_mixin were removed from v1.0.0 as there's not yet full alignment on those (I believe some issues affected Flutter code that need to be addressed first). See https://github.com/dart-lang/linter/pull/2601/files

I don't have any info on the other recommended items. I assume this repo was mostly a straight copy from https://github.com/dart-lang/linter/tree/master/tool/canonical ?

@goderbauer
Copy link
Contributor

Additionally, avoid_private_typedef_functions was removed in dart-lang/linter#2517 after we agreed in a meeting that that lint is too narrow.

All the other lints you're listing under "Recommended lints" are actually part of the core.yaml set (https://github.com/dart-lang/lints/blob/1f80da49abf8b4ea15461e42ebb09eb51917b49d/lib/core.yaml), which is imported from recommended.yaml:

https://github.com/dart-lang/lints/blob/96ebfd81c4ad1846787bfeaac2e1966655b0a56c/lib/recommended.yaml#L1

So all the lints listed in the issue (with the noted exceptions of unawaited_futures, omit_local_variable_types, prefer_mixin, and avoid_private_typedef_functions) actually appear to be part of core.yaml/recommended.yaml.

@mit-mit
Copy link
Member Author

mit-mit commented May 10, 2021

All the other lints you're listing under "Recommended lints" are actually part of the core.yaml set

Sorry, my bad, that was a flaw of the way I did my diff.

@mit-mit
Copy link
Member Author

mit-mit commented May 10, 2021

How about I close this issue, but open three new tracking issues for each of unawaited_futures, omit_local_variable_types, and prefer_mixin ?

@pq
Copy link
Member

pq commented May 10, 2021

... open three new tracking issues ...

That would be great.

@mit-mit
Copy link
Member Author

mit-mit commented May 12, 2021

Closing; we now have tracking issues for the four potential lints:

#743
#742
#741
#740

@mit-mit mit-mit closed this as completed May 12, 2021
@mosuem mosuem transferred this issue from dart-lang/lints Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants