Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3
    • Component/s: None
    • Labels:
      None

      Description

      Two possible solutions:

      • Extend the "Noncompliant" comments
        As a first step, we could support only the QF in the current file. It means that we just need a text range, and a replacement String for each issues. For example:
        public int i; // Noncompliant [[fix={1,1,1,7-"private"}]] // Replacement
        int i; // Noncompliant [[fix={1,1,1,1-"public"}]] // Addition
        "s".toString(); // Noncompliant [[fix={1,3,1,14-""}]] // Deletion
        // Ideally, we should also support relative line
        int i; // Noncompliant [[fix={+0,1,+0,1-"public"}]]
        

        Pros: Probably the easiest way, test exactly what is sent to the API.
        Cons: add complexity to the already a bit messy Noncompliant comment. Can not see the actual changes.

      • Provide a second test file: after applying the quick-fixes
        The idea is to apply the fixes to the first test file, and compare it with a second one.
        Pros: we can see the actual output, test that it compiles and clearly identify the diffs when the test fails.
        Cons: we have to implement (or communicate with the API) the logic that will actually do the replacement.

       

      We decided to go for the first solution. (with another structure though).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            quentin.jaquier Quentin Jaquier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: