atsign-foundation/at_app

Migrate from package:pedantic to package:lints

Closed this issue · 14 comments

Describe the solution you'd like

Per the guidance from dart-lang/lints:

in pubspec.yaml:

-  pedantic: ^1.11.0
+  lints: ^1.0.1

and in each analysis_options.yaml:

-include: package:pedantic/analysis_options.yaml
+include: package:lints/recommended.yaml

Hey @XavierChanth, just going through our repos and found that you're using the pedantic dependency. Will this be code breaking while migrating to lints?

Hey @XavierChanth, just going through our repos and found that you're using the pedantic dependency. Will this be code breaking while migrating to lints?

I don't think there should be an issue, the linter may ask for some additional formatting/changes though.

How to work on this one? I see pubspec has the pedantic package, will replacing the package with lints work? I guess, nope.

@prasadsunny1 see https://github.com/atsign-foundation/at_widgets/pull/232/files for an example of a similar replacement

@XavierChanth I'm assuming you want flutter_lints rather than just Dart lints

Understood, PR coming this way soon

@prasadsunny1 see https://github.com/atsign-foundation/at_widgets/pull/232/files for an example of a similar replacement

@XavierChanth I'm assuming you want flutter_lints rather than just Dart lints

Sorry, was out on holiday.
I think package:lints is fine here, no flutter code in the project.

All right, I'll create a fresh PR

All right, I'll create a fresh PR

No need, continue pushing your changes and they will be added to this PR.

Added flutter_lints as linter.
Applied few changes as per the info given by the analyzer

file_manager.dart has a print statement in the catch statement. I have tried to replace it with logger.
Do you think passing logger to FileManager using constructor is a good idea and all the caller for it should be updated?

CreateBase class has the property name which seems to be an override from the base class.
CreateCommand class has the property description which seems to be an override from the base class.

android_manage.dart, line: 17
The analyzer is saying that for each should be converted to simple for loop`

Please tell me if it is all right to do these changes

Check the PR to understand the changes