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

JavaScript plugin #67

Merged
merged 9 commits into from
Mar 9, 2023
Merged

JavaScript plugin #67

merged 9 commits into from
Mar 9, 2023

Conversation

utarwyn
Copy link
Member

@utarwyn utarwyn commented Mar 5, 2023

This plugin does not contain rule-based analysis, as it is not possible to use AST with JavaScript. It only allows to reference the rules driven by the ESLint plugin of ecoCode-linter. The plugin works in the same way as SonarJS. I plan to develop a tool to import the rules written in the linter to the rules.json file of the plugin, it will avoid typo and simplify the process to add a rule.

Note that in this first version, the rules are not referenced in SonarQube directly because they are considered as external. But they do appear in the interface during an analysis, with the detail:

image

If you have any ideas to improve the implementation, I'm interested 🤞


Useful links to understand this PR:

@utarwyn utarwyn added the 🚀 enhancement New feature or request label Mar 5, 2023
@utarwyn utarwyn self-assigned this Mar 5, 2023
@utarwyn utarwyn marked this pull request as ready for review March 7, 2023 22:50
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.

Hi @utarwyn,
I'm ok.
As I understand, you developed the systme that you explained in our weekly appoitment a few weeks ago. Am I rigth ?

I noticed that, you didn't modify the docker-compose file with your new plugin. Is it wanted ?
for me and to have a complete local development environment, we need to have javascript-plugin installed with docker-compose.

@utarwyn
Copy link
Member Author

utarwyn commented Mar 8, 2023

Yes this implementation is the result of what I described few weeks ago during a weekly meeting. I’d be happy to give you a demonstration of how it works with a test project. Besides, I could push a JavaScript test project (like what you did for Java).

oops sorry I forgot to modify the docker-compose.yml, I will work on that this evening.

@utarwyn utarwyn requested a review from dedece35 March 9, 2023 07:29
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2023

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

<artifactId>sonar-packaging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<pluginKey>${project.artifactId}</pluginKey>
Copy link
Member

Choose a reason for hiding this comment

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

@dedece35 dedece35 merged commit bdbf4e8 into main Mar 9, 2023
@dedece35 dedece35 deleted the javascript-plugin branch March 9, 2023 21:30
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.

2 participants