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

RubySensor.java - NoSuchFieldError: PACKAGES on sonar run #13

Open
fptiangco opened this issue Sep 21, 2016 · 4 comments
Open

RubySensor.java - NoSuchFieldError: PACKAGES on sonar run #13

fptiangco opened this issue Sep 21, 2016 · 4 comments

Comments

@fptiangco
Copy link

Thanks for sharing this plugin, folks.

Just thought I'd raise this: Maven build is ok. Though I'm hitting an error when I eventually run a sonar scan using the plugin in SonarQube..

INFO: Sensor RubySensor
Exception in thread "main" java.lang.NoSuchFieldError: PACKAGES
    at com.godaddy.sonar.ruby.RubySensor.computeBaseMetrics(RubySensor.java:85)

It seems PACKAGES no longer exists in org.sonar.api.measures.CoreMetrics.

@fptiangco
Copy link
Author

Answering my own post here, this has to do with my sonarqube version being v6.0 (and this plugin is dependent on 4.5.2).

Any possible work-arounds perhaps or plans for v6 support?

Thanks!

@fptiangco
Copy link
Author

Solution taken: update RubySensor.java, look for the line CoreMetrics.PACKAGES and replace with CoreMetrics.DIRECTORIES (as PACKAGES has been deprecated in newer sonarqube builds).

@WNut42
Copy link

WNut42 commented Oct 27, 2016

Gread work! It can solve my problem~

@fptiangco
Copy link
Author

Glad that helped

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

No branches or pull requests

2 participants