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

Set up Sonar #9846

Open
pdurbin opened this issue Aug 29, 2023 · 4 comments · May be fixed by #9847
Open

Set up Sonar #9846

pdurbin opened this issue Aug 29, 2023 · 4 comments · May be fixed by #9847

Comments

@pdurbin
Copy link
Member

pdurbin commented Aug 29, 2023

No description provided.

pdurbin added a commit that referenced this issue Aug 29, 2023
These properties were required to run this:

export SONAR_TOKEN=xxxx
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=IQSS_dataverse
@bencomp
Copy link
Contributor

bencomp commented Aug 29, 2023

See also (linking in the other direction)

I wonder what Sonar is going to be used for. There's a checkstyle workflow (that could be updated to highlight more issues) and similar actions for other tools exist.

(I shouldn't get involved... I'm just happy that old issues are not completely forgotten.)

@pdurbin
Copy link
Member Author

pdurbin commented Aug 29, 2023

Hey, @bencomp, thanks for stopping by. 😄

I just upgraded Netbeans from 14 to 18 and it was surprisingly easy to set up SolarLint this time. (At least it seems to be going well.)

The plugin was easy to find this time:

Screen Shot 2023-08-29 at 4 54 41 PM

I tried this "analyze" button...

Screen Shot 2023-08-29 at 4 59 33 PM

... and stuff started happening immediately:

Screen Shot 2023-08-29 at 5 02 42 PM

Maybe this is because we already set up https://sonarcloud.io/project/overview?id=IQSS_dataverse earlier. 🤔

I'm sort of surprised it's already analyzing and doing stuff. I assumed I'd have to enter some credentials for my new sonarcloud.io account or set up SonarCube server. 🤔

@poikilotherm
Copy link
Contributor

poikilotherm commented Aug 29, 2023

As I've mentioned before - the connection is necessary to download and apply customized rulesets. Either disabling / reconfiguring or adding new rules. Otherwise it will use the standard ruleset to give you at least something.

@pdurbin
Copy link
Member Author

pdurbin commented Aug 30, 2023

I just found this:

I'm not sure how it works with IntelliJ but I was assuming I'd give Netbeans https://sonarcloud.io/project/overview?id=IQSS_dataverse as a URL and automatically the rules would be downloaded.

Maybe I can download and apply them manually? Shouldn't the rule be checked into our code base anyway?

Here are the numbers we saw on solarcloud yesterday:

Screen Shot 2023-08-30 at 9 13 54 AM

Here are the numbers Netbeans is reporting:

Screen Shot 2023-08-30 at 8 55 21 AM

So yeah, it might be nice to get them to line up.

pdurbin added a commit that referenced this issue Sep 1, 2023
These properties were required to run this:

export SONAR_TOKEN=xxxx
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=IQSS_dataverse
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 a pull request may close this issue.

3 participants