英文:
How to disable strict_raw_type and inference_failure_on_function_return_type from analysis_option.yaml on Flutter?
问题
我有很多警告,来自Dart分析器的strict_raw_type
和inference_failure_on_function_return_type
。
我尝试将规则传递给analysis_option.yaml
:
linter:
rules:
strict_raw_type: false
inference_failure_on_function_return_type: false
但它说这些不被识别为lint规则。
我如何禁用这些规则?
我使用very_good_analysis
包来进行代码检查。
英文:
I have a lot of warnings with strict_raw_type
and inference_failure_on_function_return_type
from the dart analyzer.
I tried to pass to the analysis_option.yaml
the rules:
linter:
rules:
strict_raw_type: false
inference_failure_on_function_return_type: false
But it says that are not recognized as lint rules.
How can I disable these rules?
I use very_good_analysis
package for lints.
答案1
得分: 0
我找到了解决方案:
我在 analyzer
下添加了以下内容:
language:
strict-raw-types: false
并且我还在 analyzer
下添加了一些错误规则:
errors:
inference_failure_on_function_return_type: ignore
inference_failure_on_untyped_parameter: ignore
inference_failure_on_instance_creation: ignore
inference_failure_on_function_invocation: ignore
英文:
I found the solution:
I added under analyzer
:
language:
strict-raw-types: false
And also I added some error rules under analyzer
:
errors:
inference_failure_on_function_return_type: ignore
inference_failure_on_untyped_parameter: ignore
inference_failure_on_instance_creation: ignore
inference_failure_on_function_invocation: ignore
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论