Closed MobiliteDev closed 1 month ago
Hello,
I'm not sure if I'm misusing the package or if it's a bug, but I can't seem to get it working.
Open VSCode and create a new Flutter project.
Choose "Empty Application".
Update the pubspec.yaml file as follows:
pubspec.yaml
name: test_leancode_lint description: "A new Flutter project." publish_to: 'none' version: 0.1.0 environment: sdk: ^3.5.0 dependencies: flutter: sdk: flutter dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^4.0.0 leancode_lint: ^14.2.0 custom_lint: ^0.6.8 flutter: uses-material-design: true
Update analysis_options.yaml to this:
analysis_options.yaml
include: package:leancode_lint/analysis_options.yaml # Optional lint rules configuration custom_lint: rules: - use_design_system_item: AppText: - instead_of: Text from_package: flutter - instead_of: RichText from_package: flutter AppScaffold: - instead_of: Scaffold from_package: flutter analyzer: plugins: # Required for custom lint support - custom_lint exclude: - '**/*.g.dart'
Restart VSCode.
I expect to see a warning suggesting to replace Text with AppText.
Text
AppText
No warning is triggered, even after manually running dart analyze.
dart analyze
However, if I add double quotes to a string, a warning does get triggered, which indicates that the analysis is running correctly.
Any help or guidance would be greatly appreciated!
I found the solution. It was not related to this package but to my Flutter installations. Sorry for the inconvenience.
Hello,
I'm not sure if I'm misusing the package or if it's a bug, but I can't seem to get it working.
Steps to Reproduce
Open VSCode and create a new Flutter project.
Choose "Empty Application".
Update the
pubspec.yaml
file as follows:Update
analysis_options.yaml
to this:Restart VSCode.
Expected Result
I expect to see a warning suggesting to replace
Text
withAppText
.Actual Result
No warning is triggered, even after manually running
dart analyze
.However, if I add double quotes to a string, a warning does get triggered, which indicates that the analysis is running correctly.
Any help or guidance would be greatly appreciated!