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

make the right comparaison for the PR results #30

Conversation

adrienpessu
Copy link
Collaborator

@adrienpessu adrienpessu commented Dec 14, 2023

This pull request primarily focuses on refactoring and enhancing the functionality of the Sarif Viewer tool. The changes include updates to the SarifService and SarifViewerWindowFactory classes, the addition of a new data class, and a minor version update for the plugin.

Here are the key changes:

  1. Plugin Version Update:

    • gradle.properties: Updated the pluginUntilBuild version from 232.* to 233.*.
  2. New Data Class Addition:

    • src/main/kotlin/com/github/adrienpessu/sarifviewer/models/BranchItemComboBox.kt: Added a new data class BranchItemComboBox to hold information about the pull request number, head, base, PR title, and commit.
  3. Updates to SarifService Class:

    • src/main/kotlin/com/github/adrienpessu/sarifviewer/services/SarifService.kt: Several changes were made to this class, including importing new modules, refactoring the loadSarifFile method to getSarifFromGitHub which now returns a list of SarifSchema210 objects, and adding a new analyseResult function to process a list of Result objects. [1] [2] [3] [4] [5]
  4. Updates to SarifViewerWindowFactory Class:

    • src/main/kotlin/com/github/adrienpessu/sarifviewer/toolWindow/SarifViewerWindowFactory.kt: This class saw a series of changes including the addition of new imports, the replacement of selectList with comboBranchPR of type BranchItemComboBox, refactoring of the loadDataAndUI method to include a selectedCombo parameter, and significant updates to the extractSarif and populateCombo methods to accommodate these changes. [1] [2] [3] [4] [5] [6] [7] [8]

Copy link

github-actions bot commented Dec 14, 2023

Qodana Community for JVM

33 new problems were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 4
Incorrect string capitalization 🔶 Warning 2
Redundant SAM constructor 🔶 Warning 2
Local 'var' is never modified and can be declared as 'val' 🔶 Warning 1
Accessor call that can be replaced with property access syntax ◽️ Notice 7
Property naming convention ◽️ Notice 6
Object literal can be converted to lambda ◽️ Notice 5
Can be replaced with binary operator ◽️ Notice 3
Unnecessary parentheses in function call with lambda ◽️ Notice 2
Return or assignment can be lifted out ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@adrienpessu adrienpessu changed the title chore: use an object for the combobox make the right comparaison for the PR results Dec 21, 2023
@adrienpessu adrienpessu marked this pull request as ready for review December 21, 2023 17:49
…ranch-to-focus-only-on-new-findings' of github.com:adrienpessu/SARIF-viewer into 23-make-a-diff-of-the-findings-in-the-pr-and-the-main-branch-to-focus-only-on-new-findings
@adrienpessu adrienpessu merged commit 1a43517 into main Dec 22, 2023
8 checks passed
@adrienpessu adrienpessu deleted the 23-make-a-diff-of-the-findings-in-the-pr-and-the-main-branch-to-focus-only-on-new-findings branch December 22, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant