code_builder icon indicating copy to clipboard operation
code_builder copied to clipboard

feat: merge simplePrefixing allocator ignore with other file ignores

Open Leptopoda opened this issue 2 years ago • 0 comments

Using Allocator.simplePrefixing() with a library decalaration resulted in bad formatted code:

Library((b) => b
  ..docs.add(
    '/// My favorite library.',
  )
  ..body.add(Field((b) => b
    ..name = 'test'
    ..modifier = FieldModifier.final$
    ..assignment = Code.scope((a) => '${a($LinkedHashMap)}()'))))

was generating:

/// My favorite library.
library; // ignore_for_file: no_leading_underscores_for_library_prefixes

import 'dart:collection' as _i1;

final test = _i1.LinkedHashMap();

This PR merges the no_leading_underscores_for_library_prefixes ignore with the other file level ignores for better readable code.


  • [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Leptopoda avatar Jan 09 '24 10:01 Leptopoda