Skip to content

Commit

Permalink
Issue184 (#185)
Browse files Browse the repository at this point in the history
* Issue 184 - existing warnings

* Issue 184

* Issue 184
  • Loading branch information
shamblett authored Dec 28, 2023
1 parent d24fa5c commit aeb37aa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,13 @@ linter:
- flutter_style_todos
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- collection_methods_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
Expand Down
2 changes: 1 addition & 1 deletion lib/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Builder configBuilder(final BuilderOptions options) => _ConfigBuilder();
class _ConfigBuilder extends Builder {
@override
Map<String, List<String>> get buildExtensions => <String, List<String>>{
'.yaml': <String>['.dart']
'.yaml': <String>['.dart'],
};

static const String _defaultConfigFileName = 'coap_config';
Expand Down
10 changes: 5 additions & 5 deletions lib/src/option/uri_converters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ List<Option<Object?>> uriToOptions(
/// Converts a relative [location] URI into a list of [Option]s.
List<Option<Object?>> locationToOptions(final Uri location) => [
..._uriPathsToOptions<LocationPathOption>(location),
..._uriQueriesToOptions<LocationQueryOption>(location)
..._uriQueriesToOptions<LocationQueryOption>(location),
];

/// Converts a [uri]'s path components into a list of [PathOption]s as specified
Expand All @@ -172,10 +172,10 @@ List<Option<Object?>> _uriPathsToOptions<T extends PathOption>(final Uri uri) {

for (final optionValue in optionValues.skip(1)) {
switch (T) {
case UriPathOption:
case const (UriPathOption):
options.add(UriPathOption(optionValue));
continue;
case LocationPathOption:
case const (LocationPathOption):
options.add(LocationPathOption(optionValue));
continue;
}
Expand Down Expand Up @@ -207,10 +207,10 @@ List<Option<Object?>> _uriQueriesToOptions<T extends QueryOption>(
final optionValue = components.map(Uri.decodeFull).join('=');

switch (T) {
case UriQueryOption:
case const (UriQueryOption):
options.add(UriQueryOption(optionValue));
continue;
case LocationQueryOption:
case const (LocationQueryOption):
options.add(LocationQueryOption(optionValue));
continue;
}
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ dependencies:
yaml: ^3.1.2

dev_dependencies:
build_runner: ^2.4.4
lints: ^2.1.0
test: ^1.24.3
build_runner: ^2.4.7
lints: ^3.0.0
test: ^1.25.0
2 changes: 1 addition & 1 deletion test/coap_message_encode_decode_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void main() {
3,
116,
101,
110
110,
]
];

Expand Down

0 comments on commit aeb37aa

Please sign in to comment.