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

Support output-location and output-format flag to specify the output file/directory in order to integrate other tools #336

Open
Jenson3210 opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Jenson3210
Copy link

Jenson3210 commented Oct 10, 2024

What problem are you trying to solve?

In order to support other tools to extend the output of the result of the rewriteRun task, we should allow for a report to be written as part of these tasks.

Describe the solution you'd like

SARIF support. potentially later we could add additional formats if required.

Additional context

Are you interested in contributing this feature to OpenRewrite?

Yes! will need some pointers on gradle plugin design possibly

@Jenson3210 Jenson3210 added the enhancement New feature or request label Oct 10, 2024
@Jenson3210 Jenson3210 self-assigned this Oct 10, 2024
@timtebeek timtebeek moved this to Backlog in OpenRewrite Oct 10, 2024
Jenson3210 pushed a commit to Jenson3210/rewrite-gradle-plugin that referenced this issue Oct 15, 2024
@Jenson3210
Copy link
Author

Open questions:

  • Should we move the responsability for sarif to Result. Similar to diff, one could ask result.sariff(), which would return the jsonString or SarifResult objects.
  • Should suggestions include the surrounding context like diff does or should they start at line 1 of change and go till last change?
    • If not, what about nonchanged lines in the middle of 2 changed lines. Typically a diff groups these together. If we make suggestion "per line", it might become a lot of comments and a hard to follow suggestion overview.
      eg. If the diff is
      -List<String>oldVariableName=this.lines();
      +List<String>list=this.lines();
      
      -oldVariableName.forEach(System.out::println);
      -System.out.println("List contains " + oldVariableName.size + " items.")
      +list.forEach(System.out::println);
      +System.out.println("List contains " + list.size + " items.")
      
      Do we want to see 1 suggestion including the whiteline in the middle or a suggestion per block (2)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant