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

Analyzer & code fix for ~IDE0047~ FS3583: remove unnecessary parentheses #16079

Merged
merged 93 commits into from
Oct 31, 2023

Commits on Oct 4, 2023

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

Commits on Oct 5, 2023

  1. Consistency

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    8207085 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f7403f4 View commit details
    Browse the repository at this point in the history
  3. Try-finally tweak

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    9113205 View commit details
    Browse the repository at this point in the history
  4. Fix

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    7377e41 View commit details
    Browse the repository at this point in the history
  5. Fantomas

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    37142b6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f51569a View commit details
    Browse the repository at this point in the history
  7. Explain

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    a5aa829 View commit details
    Browse the repository at this point in the history
  8. More Fantomas

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    a31049b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    92bcc2f View commit details
    Browse the repository at this point in the history
  10. Fantomas

    brianrourkeboll committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    c4528ee View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a176f26 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. Structs

    brianrourkeboll committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    aa04c18 View commit details
    Browse the repository at this point in the history
  2. Don't need that

    brianrourkeboll committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    f4bcdc7 View commit details
    Browse the repository at this point in the history
  3. Spaces

    brianrourkeboll committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    34f037b View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2023

  1. getTextAtRange → getSourceLineStr

    * Use `getSourceLineStr` and enable handling sensitive indentation
      inside parens.
    brianrourkeboll committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    5a6c260 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a1f313 View commit details
    Browse the repository at this point in the history
  3. Singleton

    brianrourkeboll committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    dea8ffc View commit details
    Browse the repository at this point in the history
  4. brianrourkeboll committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    9bd1097 View commit details
    Browse the repository at this point in the history
  5. Better

    brianrourkeboll committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    48d172b View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. Streamline

    brianrourkeboll committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    919dc4d View commit details
    Browse the repository at this point in the history
  2. One more

    brianrourkeboll committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    7f71794 View commit details
    Browse the repository at this point in the history
  3. Don't need that here

    brianrourkeboll committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    591c5df View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Configuration menu
    Copy the full SHA
    f06cdd5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e493e1 View commit details
    Browse the repository at this point in the history
  3. Add comment

    brianrourkeboll committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    5059bf2 View commit details
    Browse the repository at this point in the history
  4. Make private

    brianrourkeboll committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    e5c281d View commit details
    Browse the repository at this point in the history
  5. Fix infix op tests

    brianrourkeboll committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    fb951ab View commit details
    Browse the repository at this point in the history
  6. Add some more tests

    brianrourkeboll committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    a82be7c View commit details
    Browse the repository at this point in the history
  7. Be (somewhat) more systematic about precedence, &c.

    * Represent precedence for more kinds of expression than just symbolic
      infix operators.
    
    * Handle exprs potentially confusable with type applications.
    
    * Handle more numeric literal cases.
    brianrourkeboll committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    178bdc5 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Configuration menu
    Copy the full SHA
    4da7680 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d10c9d View commit details
    Browse the repository at this point in the history
  3. Comments

    brianrourkeboll committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    bf7c62a View commit details
    Browse the repository at this point in the history
  4. Space after backticks

    brianrourkeboll committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    bbf91df View commit details
    Browse the repository at this point in the history
  5. Parens in interp hole

    brianrourkeboll committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    6decef7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cbdd095 View commit details
    Browse the repository at this point in the history
  7. Submodule

    brianrourkeboll committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    b30c503 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Configuration menu
    Copy the full SHA
    02edd60 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed7aa1e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    19da092 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1271c6e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e30168b View commit details
    Browse the repository at this point in the history
  6. Move diagnostic creation logic into its own file

    * We're still calling the logic directly inside of
      `DocumentDiagnosticAnalyzer` rather than exporting the type as an
      implementation of the `IFSharpUnnecessaryParenthesesDiagnosticAnalyzer`
      interface, since that interface does not exist upstream in Roslyn, and
      it seems like we would currently prefer not to go through the
      logistics of upstreaming it.
    brianrourkeboll committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a2c9fe2 View commit details
    Browse the repository at this point in the history
  7. Fantomas

    brianrourkeboll committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    58d08d1 View commit details
    Browse the repository at this point in the history
  8. Remove comment

    brianrourkeboll committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a8e44ca View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5a62e22 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2181148 View commit details
    Browse the repository at this point in the history
  11. Update surface area

    brianrourkeboll committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    2df60d9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a906b35 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Configuration menu
    Copy the full SHA
    e1d8a7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f542cb View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2023

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

    brianrourkeboll committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    8a62a50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cc2c0fb View commit details
    Browse the repository at this point in the history
  4. The prefix op rules are tricky…

    * +Assorted other bits and bobs
    brianrourkeboll committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    daf39fa View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Configuration menu
    Copy the full SHA
    caccbf9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a9ec3f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1eeaa5d View commit details
    Browse the repository at this point in the history
  4. Fix incomplete exprs

    brianrourkeboll committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    b758378 View commit details
    Browse the repository at this point in the history
  5. Missed that

    brianrourkeboll committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    dec772c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    43605d0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d2f1666 View commit details
    Browse the repository at this point in the history
  8. Fantomas

    brianrourkeboll committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    4494ccd View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. Configuration menu
    Copy the full SHA
    addc8d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a7cca0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c96ec3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dab4696 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a57de4f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9958126 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. Configuration menu
    Copy the full SHA
    ba48167 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    73a55b7 View commit details
    Browse the repository at this point in the history
  3. Pretty sure we don't actually need that

    * Upon further thought, I'm pretty sure we _don't_ need to memoize
      the checking for dangling right-hand expressions, because we never
      dive deeper than needed for the check at hand, and the check will
      be quite shallow unless there are vast amounts of, say, nested matches
      inside of an if-condition body, but even then, such a check is both
      necessary and will only happen once, e.g.:
    
      ```fsharp
      let f x =
        if
           (match x with
            | _ ->
                match x with
                | _ ->
                    match x with
                    | _ ->
                        match x with
                        | _ ->
                            match x with
                            | _ ->
                                if x then x else x) then x else x
      ```
    
      If any other if-expression were found, or any nested parenthesized
      expression, or any construct without an exposed right-hand expression,
      the dive would end.
    brianrourkeboll committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    80067ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a7e969f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    31440be View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3710278 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    eb15dd0 View commit details
    Browse the repository at this point in the history
  8. Fantomas

    brianrourkeboll committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    b077e09 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Configuration menu
    Copy the full SHA
    1d6db65 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2b70f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3800ee2 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. Configuration menu
    Copy the full SHA
    cc04486 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfdcab3 View commit details
    Browse the repository at this point in the history
  3. Remove incorrect test

    * This test purported to test FS1182, but the actual diagnostic that is
      generated from the example is FS1183.
    brianrourkeboll committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    13c2840 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    953b580 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. Don't need

    brianrourkeboll committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    d49b21e View commit details
    Browse the repository at this point in the history
  2. A few more tests

    brianrourkeboll committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    53b80ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e622dd2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    deb313f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b4a347 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    518af84 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    19637f3 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

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