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

Add fixer #72

Merged
merged 38 commits into from
Mar 15, 2023
Merged

Add fixer #72

merged 38 commits into from
Mar 15, 2023

Commits on Feb 13, 2023

  1. WIP - Fixer

    bombsimon committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    080f4fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6453d4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    45b4214 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7847f97 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    60d1740 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    22b0e8d View commit details
    Browse the repository at this point in the history
  7. Use consistent config names

    bombsimon committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ba04c0b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    745e9b2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    56c7e0e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a3c022a View commit details
    Browse the repository at this point in the history
  11. Add test for fixer

    With `RunWithSuggestedFixes` we can assert that the output of the
    diagnostics created are corect. It's a bit weird because the golden file
    will contain all the expected assertions even though the would no longer
    be triggered. For now they're kept to make the test pass.
    
    Ref: https://godocs.io/golang.org/x/tools/go/analysis/analysistest#RunWithSuggestedFixes
    bombsimon committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    42258ce View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Add support to fix other than reported line

    We can now fix a line that's not the one we reported. This is used when
    we have multiple cuddled vars but want to keep the last one since it's
    allowed (and required if error cuddling is forced).
    
    Also adds all the config flags
    bombsimon committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    182524d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c44041 View commit details
    Browse the repository at this point in the history
  3. Add test case for advanced formatting

    We currently only support adding a newline if we don't think vars should
    be cuddled. For `var` blocks we would ideally group them instead of
    separating by newline but this is currently not supported.
    
    This test only serves as an expectation of the fixer.
    bombsimon committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    9372cd9 View commit details
    Browse the repository at this point in the history
  4. Fix lint issues

    bombsimon committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    07a9043 View commit details
    Browse the repository at this point in the history
  5. WIP: Removal fixer

    * Remove newline in end of block
    * Remove newline in start of block (and comments...)
    
    This is WIP because we need to preserve the comments so they don't get
    deleted when we remove beginning of blocks.
    bombsimon committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    eab3161 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. WIP: Removal of comments

    bombsimon committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    3491d2d View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Configuration menu
    Copy the full SHA
    5098be0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    86d102f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a216a31 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f27a3f0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    86e1170 View commit details
    Browse the repository at this point in the history
  6. Setup tests based on config

    bombsimon committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    9ac306f View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2023

  1. Configuration menu
    Copy the full SHA
    0674abf View commit details
    Browse the repository at this point in the history
  2. Add support for case blocks, update tests

    * Work around case blocks
    * All tests now uses fixer
    * Different tests can set config per test
    bombsimon committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    f15f90c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3632854 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    37c13c3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    746e1b9 View commit details
    Browse the repository at this point in the history
  6. Cleanup

    bombsimon committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    21ded97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cd12910 View commit details
    Browse the repository at this point in the history
  8. Add back commented out test

    bombsimon committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    fc8dfa4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4e30c94 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9f07f21 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2023

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

Commits on Mar 15, 2023

  1. Configuration menu
    Copy the full SHA
    ff1beac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97dc165 View commit details
    Browse the repository at this point in the history
  3. Remove empty file

    bombsimon committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    3bd7017 View commit details
    Browse the repository at this point in the history
  4. Fix typo in test

    bombsimon committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    02bf217 View commit details
    Browse the repository at this point in the history