Skip to content

dart_fmt breaks code with // ignore: ... comments at end of line #546

Closed
@zoechi

Description

@zoechi

I have generated code like

import 'package:fhir_client_api/fhir_client_api.dart' show
  FhirDate, // ignore: unused_shown_name
  FhirXhtml, // ignore: unused_shown_name
  PropertyMetadata, ElementDefinitionBindingMeta, ReferenceMeta, // ignore: unused_shown_name
  ClassMetadata

after dartfmt I get something like

import 'package:fhir_client_api/fhir_client_api.dart' show
  FhirDate, // ignore: unused_shown_name
  FhirXhtml, // ignore: unused_shown_name
  PropertyMetadata, 
  ElementDefinitionBindingMeta, ReferenceMeta, // ignore: unused_shown_name
  ClassMetadata

This shows a warning that PropertyMetadata is shown but not used (according to the linter rule unused_shown_name)

I think lines with // ignore: ... at the end must not be wrapped

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions