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

Plugins clean-up #201

Merged
merged 3 commits into from
Jun 25, 2023
Merged

Plugins clean-up #201

merged 3 commits into from
Jun 25, 2023

Conversation

utarwyn
Copy link
Member

@utarwyn utarwyn commented Jun 7, 2023

I have noticed the following points while working on the plugins:

  • JAR of Java and JavaScript plugins seem to be heavy for no particular reason (not a green practice)
  • Implementation of the Sonar API is used inside some plugins (bad practice)
  • Need to manually bumping SonarQube version in few source code files (inconvenient)
  • SonarSource license header is present in some source files

So I have made some modifications to dependencies, sources and tests to address these changes:

  • Remove unused dependencies to reduce the weight of final JARs
    (Java : 3140Ko -> 285Ko, JavaScript : 2403Ko -> 91Ko)
  • Remove the use of Sonar API implementation
  • Use Mockito to mock SonarRuntime elements in tests
  • Remove SonarSource license header

➡️ I've tested the plugins with this clean-up on SonarQube 10.0 and it seems to work fine.
⚠️ This PR must be merged after #188

@utarwyn utarwyn added dependencies Pull requests that update a dependency file 🏗️ refactoring refactoring for best practices 🔥 in progress 🔥 labels Jun 7, 2023
@utarwyn utarwyn self-assigned this Jun 7, 2023
@dedece35
Copy link
Member

@utarwyn PR #188 merged

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.3% 83.3% Coverage
0.0% 0.0% Duplication

@utarwyn utarwyn marked this pull request as ready for review June 23, 2023 22:53
@utarwyn utarwyn requested a review from dedece35 June 23, 2023 22:53
Copy link
Member

@dedece35 dedece35 left a comment

Choose a reason for hiding this comment

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

@utarwyn good job ... all is ok for me (local tests OK)

@dedece35 dedece35 merged commit 3f7e7c4 into main Jun 25, 2023
@dedece35 dedece35 deleted the clean-plugins branch June 25, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏗️ refactoring refactoring for best practices dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants