Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

feat: merge simplePrefixing allocator ignore with other file ignores #448

Conversation

Leptopoda
Copy link
Contributor

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.


  • 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 Leptopoda force-pushed the fix/prefixed_import_ignore_library branch from 0749018 to 63deb3d Compare January 9, 2024 10:59
@mosuem
Copy link
Contributor

mosuem commented Oct 29, 2024

Closing as the dart-lang/code_builder repository is merged into the dart-lang/tools monorepo. Please re-open this PR there!

@mosuem mosuem closed this Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants