Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring project-wide page width using a surrounding analysis_options.yaml file #1571

Merged
merged 7 commits into from
Oct 7, 2024

Commits on Oct 1, 2024

  1. Add code for working with analysis_options.yaml files.

    This can find, read, and merge them. It handles `include` inside the
    file.
    
    It works using an abstraction over the file system so that (in theory at
    least), this code could be harvested and made reusable by other tools
    that need to work with analysis_options.yaml files but don't want to
    work directly with files on disk.
    
    It also includes an implementation of that abstraction using dart:io.
    
    Right now, this is all just private inside dart_style, but is organized
    so that it would be easy to pull out into a separate package later if we
    want.
    munificent committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    76830e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    81d0b28 View commit details
    Browse the repository at this point in the history
  3. Split cli_test.dart into separate files.

    It was getting pretty huge. I didn't want to stuff more tests in there
    for CLI integration of analysis_options, so splitting it up into smaller
    files first.
    
    There are no meaningful changes here, just moving code around.
    munificent committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    aea8bec View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Look up page width of surrounding analysis_options.yaml file.

    When formatting from the CLI using files or stdin with a --stdin-name
    option, looks in the surrounding directories for an
    analysis_options.yaml file. If found and the file specifies a formatter
    page width, uses that.
    
    Handles includes and merging as well. Doesn't handle "package:" includes
    yet.
    munificent committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    f56469b View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    09ec863 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Apply review feedback.

    munificent committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    23637d1 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into analysis-options

    # Conflicts:
    #	lib/src/language_version_cache.dart
    munificent committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    2e37ca3 View commit details
    Browse the repository at this point in the history