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

Issue #40: removed sonar-java-plugin #439

Merged
merged 1 commit into from
Oct 21, 2022
Merged

Conversation

rnveach
Copy link
Member

@rnveach rnveach commented Oct 20, 2022

Issue #40

Removed the dependency.

I was not seeing any classpath shenanigans mentioned in the issue unless its happening via reflection or such.

The code before this was causing issues with Eclipse:

The package javax.xml.stream is accessible from more than one module: , java.xml CheckstyleProfileImporter.java /sonar-checkstyle/src/main/java/org/sonar/plugins/checkstyle line 28 Java Problem

https://stackoverflow.com/questions/55571046/eclipse-is-confused-by-imports-accessible-from-more-than-one-module

<artifactId>sonar-java-plugin</artifactId>
<version>${sonar-java.version}</version>
<groupId>com.fasterxml.staxmate</groupId>
<artifactId>staxmate</artifactId>
Copy link
Member Author

@rnveach rnveach Oct 20, 2022

Choose a reason for hiding this comment

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

New dependency was required since the other included it and we still use it as well.

@@ -34,7 +33,7 @@ public CheckstyleSensor(CheckstyleExecutor executor) {

@Override
public void describe(SensorDescriptor descriptor) {
descriptor.onlyOnLanguage(Java.KEY).name("CheckstyleSensor");
descriptor.onlyOnLanguage("java").name("CheckstyleSensor");
Copy link
Member Author

Choose a reason for hiding this comment

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

This comes from sonar-java-plugin and so we have to hardcode it since we want to remove that dependency.

Copy link
Member Author

Choose a reason for hiding this comment

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

public class Java extends AbstractLanguage {

  /**
   * Java key
   */
  public static final String KEY = "java";

@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2022

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@romani
Copy link
Member

romani commented Oct 20, 2022

How we can prove that plugin continue to work? compilation is not enough.

Copy link
Contributor

@muhlba91 muhlba91 left a comment

Choose a reason for hiding this comment

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

lgtm

@rnveach
Copy link
Member Author

rnveach commented Oct 20, 2022

@romani I do not know how to test this.
https://github.com/checkstyle/sonar-checkstyle/wiki/How-to-build-and-test-plugin-on-local
Does not say how to set up docker and I have never worked with it.

@romani romani merged commit 9e4743d into checkstyle:master Oct 21, 2022
@romani
Copy link
Member

romani commented Oct 21, 2022

@muhlba91 usually runs it during release, so I hope we will do this that time also so it will be tested

@rnveach rnveach deleted the issue_40 branch October 21, 2022 02:40
@muhlba91
Copy link
Contributor

i usually test it e2e when opening a MR for a new version upgrade, and if other changes happen between that merge and the release i also test it again before releasing it.

i‘ll run a deeper regression test than usually after the changes being merged now.

fyi: next release will take a few more days (probably ~1.5 weeks) as i‘m on business travels since a few weeks and quite busy. i‘ll then shortly after perform the next version upgrade.

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.

3 participants