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

Checkstyle and PMD report parsing #9

Merged
merged 29 commits into from
Aug 31, 2020

Conversation

kloessst
Copy link
Contributor

@kloessst kloessst commented Aug 17, 2020

Motivation and Context

This PR extends the parsing functionality for static code analysis reports.

Description

  • Add XOM for parsing
  • Add PMD parsing
  • Add Checkstyle parsing
  • Switch to parsing of the more verbose spotbugsXml, as it contains a proper source path. Opened an issue to add this information to the xdoc report but this might take a while.
  • Rename classname to filePath
  • Rename type to rule
  • Add PR template

Steps for Testing

  1. Build and deploy the notification locally
  2. Start Artemis in debug mode and create a programming exercise with static code analysis enabled
  3. Set break point in ResultResource.notifyNewResult
  4. Alter pom.xml in the test repository to include the Checkstyle and Pmd maven plugin (example can be found https://github.com/kloessst/BambooTest/blob/master/pom.xml). Just copy those dependencies.
  5. Alter the static code analysis task to match:
    scaTask
  6. Alter the artifacts to match:
    artifacts
  7. Participate in the programming exercise and commit bad code
  8. Inspect the request body when the break point triggers
    --> Static Code Analysis reports should be part of the request body and should match the format defined in the notification plugin readme.

@kloessst kloessst self-assigned this Aug 17, 2020
@kloessst kloessst marked this pull request as ready for review August 28, 2020 12:57
@kloessst kloessst added the enhancement New feature or request label Aug 28, 2020
pom.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@sleiss sleiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, works fine 👍

Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, I only found one issue, see my inline comment.

I wonder if we should add some automatic tests that could be executed using GitHub actions. I think this would really help in the future!

@kloessst kloessst requested a review from krusche August 30, 2020 13:52
@krusche krusche merged commit 2adc533 into master Aug 31, 2020
@krusche krusche deleted the feature/parsing-for-checkstyle-and-pmd branch December 17, 2021 14:01
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants