Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 5372467

Browse files
authored
fix: --reporter=json for check-unnecessary-nullable crashes, saying Converting object to an encodable object failed: Instance of 'MappedIterable<FormalParameter, String>' (#980)
* fix --reporter=json for check-unnecessary-nullable crashes, saying Converting object to an encodable object failed: Instance of 'MappedIterable<FormalParameter, String>' #979 * Update CHANGELOG.md
1 parent 8c1637d commit 5372467

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* feat: support passing file paths to all commands.
66
* fix: avoid-top-level-members-in-tests ignore lib
7+
* fix: `--reporter=json` for `check-unnecessary-nullable` crashes, saying `Converting object to an encodable object failed: Instance of 'MappedIterable<FormalParameter, String>'`
78

89
## 4.18.0-dev.2
910

lib/src/analyzers/unnecessary_nullable_analyzer/reporters/reporters_list/json/unnecessary_nullable_json_reporter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class UnnecessaryNullableJsonReporter extends JsonReporter<
4444
Map<String, Object> _issueToJson(UnnecessaryNullableIssue issue) => {
4545
'declarationType': issue.declarationType,
4646
'declarationName': issue.declarationName,
47-
'parameters': issue.parameters,
47+
'parameters': issue.parameters.toList(),
4848
'column': issue.location.column,
4949
'line': issue.location.line,
5050
'offset': issue.location.offset,

0 commit comments

Comments
 (0)