8000 Fix linting issues and warnings by luanpotter · Pull Request #5 · thosakwe/prompts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
8000

Fix linting issues and warnings #5

Closed
wants to merge 1 commit into from

Conversation

luanpotter
Copy link

This fixes a few linting issues/warnings that I noticed (mostly through my editor).

I ran dartanalyzer using the provided analysis file on the root of the project and found 9 issues, that I am fixing in this PR:

> dartanalyzer lib/prompts.dart
Analyzing lib/prompts.dart...
  lint • Only use double quotes for strings containing single quotes. • lib/prompts.dart:57:16 • prefer_single_quotes
  lint • Only use double quotes for strings containing single quotes. • lib/prompts.dart:64:32 • prefer_single_quotes
  lint • Only use double quotes for strings containing single quotes. • lib/prompts.dart:147:16 • prefer_single_quotes
  lint • DO use curly braces for all flow control structures. • lib/prompts.dart:191:5 • curly_braces_in_flow_control_structures
  lint • Omit type annotations for local variables. • lib/prompts.dart:321:14 • omit_local_variable_types
  lint • Omit type annotations for local variables. • lib/prompts.dart:327:12 • omit_local_variable_types
  lint • Omit type annotations for local variables. • lib/prompts.dart:395:10 • omit_local_variable_types
  lint • Omit type annotations for local variables. • lib/prompts.dart:420:9 • omit_local_variable_types
  lint • Omit type annotations for local variables. • lib/prompts.dart:464:3 • omit_local_variable_types
9 lints found.

As you can see here, pub reduces some scoring because of linting issues (also it makes the code easier to read):

image

This PR fixes all nine issues.

@luanpotter
Copy link
Author

I believe all these improvements have already been made by @productiveme while migrating to Null-Safety (#7):

[luan@aurora prompts]$ dartanalyzer lib/prompts.dart 
Analyzing lib/prompts.dart...
No issues found!

the project is free of analysis issues now! So let me close this PR :)

@luanpotter luanpotter closed this Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0