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

Replace IDE 2.x configuration file content with link to source #418

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Replace IDE 2.x configuration file content with link to source #418

merged 2 commits into from
Aug 1, 2022

Commits on Jul 26, 2022

  1. Replace IDE 2.x configuration file content with link to source

    Arduino IDE 2.x allows the user to customize the output of the "Auto Format" feature via a configuration file.
    
    This system is documented in the "Customizing the Auto Formatter Feature" tutorial.
    
    When the user customizes the formatter, their configuration file is used exclusively by the formatter tool rather than
    being merged into the standard configuration. Since the user is likely only interested in modifying a small number of
    specific aspect of the standard configuration (e.g., wishing to use "broken" rather than "attached" braces), they will
    find it convenient to use Arduino's standard configuration as a base for their custom configuration. For this reason,
    the standard configuration is offered in the tutorial.
    
    Previously, the full YAML code of the standard configuration was included in the tutorial page itself. This was the best
    approach at the time the tutorial was created because what was the canonical source in the Arduino IDE code base is in a
    format not usable in this application.
    
    Since that time, the ClangFormat native YAML file has been published in a dedicated permanent location where it is
    hosted as the canonical source for all projects that use the configuration. This enabled the removal of the
    configuration code from the tutorial, replaced by a link to the source file.
    
    This change provides the following benefits:
    
    ### Reduce maintenance burden
    
    The configuration code must be updated periodically in parallel to bumps of the version of ClangFormat used by Arduino
    IDE 2.x and other Arduino development tools.
    
    This is handled as a matter of course in the canonical source file, but the copy hosted in the tutorial content would
    have needed updates as well (or else become outdated).
    
    Pointing the reader to the source ensures they will always have the current configuration without any need to maintain
    the documentation content.
    
    ### Improves approachability of tutorial
    
    The configuration code added a large block of complex YAML to the tutorial. Although it will be necessary for the reader
    to eventually work with this code, they don't have any need to browse through it while reading the tutorial. So having
    the code as part of the tutorial content didn't add anything of value and also harmed the readability.
    per1234 authored Jul 26, 2022
    Configuration menu
    Copy the full SHA
    cacc78d View commit details
    Browse the repository at this point in the history
  2. Move IDE 2.x configuration file link above supplemental link

    Arduino IDE 2.x allows the user to customize the output of the "Auto Format" feature via a configuration file. This
    system is documented in the "Customizing the Auto Formatter Feature" tutorial.
    
    Arduino's standard formatter configuration file is offered as part of the tutorial. Originally, the full YAML code of
    the standard configuration was included in the tutorial page itself. Since that consisted as a large block of cryptic
    code, it made sense to place it at the bottom of that section of the tutorial, after the section's prose content, following this structure:
    
    - Introduction
    - Supplemental note
    - Configuration code
    
    Since that time, the code content has been replaced by a link to the source file. After this change, the placement of
    this essential link (which is less visibly prominent in the page) makes less sense. The content will be easier to follow
    with the new structure:
    
    - Introduction
    - Configuration file link
    - Supplemental note
    per1234 authored Jul 26, 2022
    Configuration menu
    Copy the full SHA
    3200286 View commit details
    Browse the repository at this point in the history