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

fix(lints): prefer_typing_uninitialized_variables rule #161

Merged
merged 3 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,10 @@ linter:

avoid_redundant_argument_values: false

# Unnecessary use of this in constructors should not be done
unnecessary_this: false

leading_newlines_in_multiline_strings: false

type_annotate_public_apis: false

directives_ordering: false

avoid_function_literals_in_foreach_calls: false

join_return_with_assignment: false

non_constant_identifier_names: false

constant_identifier_names: false

prefer_typing_uninitialized_variables: false
4 changes: 2 additions & 2 deletions lib/services/ib_engine_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class IbEngineServiceImpl implements IbEngineService {
bool ignoreIndex = false,
}) async {
/// Fetch response from API for the given id
var _apiResponse;
List<Map<String, dynamic>> _apiResponse;
try {
_apiResponse = await _ibApi.fetchApiPage(id: id);
} catch (_) {
Expand Down Expand Up @@ -138,7 +138,7 @@ class IbEngineServiceImpl implements IbEngineService {
return _ibChapters;
}

var _chapters;
List<IbChapter> _chapters;
try {
_chapters = await _fetchPagesInDir(ignoreIndex: true);
} on Failure catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/groups/add_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class _AddAssignmentViewState extends State<AddAssignmentView> {
_dialogService.showCustomProgressDialog(title: 'Adding..');

// [ISSUE] [html_editor] Throws error in Tests
var _descriptionEditorText;
String _descriptionEditorText;
try {
_descriptionEditorText =
await _descriptionEditor.currentState.getText();
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/groups/update_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class _UpdateAssignmentViewState extends State<UpdateAssignmentView> {
_dialogService.showCustomProgressDialog(title: 'Updating..');

// [ISSUE] [html_editor] Throws error in Tests
var _descriptionEditorText;
String _descriptionEditorText;
try {
_descriptionEditorText =
await _descriptionEditor.currentState.getText();
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/syntaxes/ib_liquid_syntax.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class IbLiquidSyntax extends md.BlockSyntax {
md.Node parse(md.BlockParser parser) {
var match = pattern.firstMatch(parser.current);
var tags = match[1].split(' ');
var node;
md.Element node;

// Liquid include tags
if (tags[0] == 'include') {
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/app_exceptions.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class AppException implements Exception {
final _message;
final _prefix;
final String _message;

final String _prefix;

AppException([this._message, this._prefix]);

Expand Down