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 64] python plugin : refactoring and corrections #77

Merged
merged 3 commits into from
Mar 16, 2023
Merged

Conversation

dedece35
Copy link
Member

@dedece35 dedece35 commented Mar 14, 2023

As mentionned on ISSUE 64, python rules system was not OK since our upgrade of lib versions and for SonarQube 9.9.
Done on python plugin :

  • clean maven config
  • complete existing rules and change tag eco-conception to eco-design (as recommended in an other issue)
  • refactor central classes of plugin

@dedece35 dedece35 changed the title [ISSUE 64] refactoring + correction python rules system [ISSUE 64] python plugin : refactoring and corrections Mar 14, 2023
@jhertout
Copy link
Contributor

Just by curiosity, why do you remove all the Json for all the rules? I think it was clearer with them than having all the rules properties in the source code. It is just my advice though.

@dedece35
Copy link
Member Author

dedece35 commented Mar 15, 2023

@jhertout
I removed JSON files because with the refactoring of main plugin classes, these files were not used to initialize rules.
maybe this refactoring was not the best way, but I spent a lot of time to analyse the problem and no precise help found on Web.
once python and php plugins UP ... I will spend time to put the same system as Java and mobiles plugins (maybe a particular extension to add : maybe a registrar extension).
now we have a python plugin working again and a python test project to check that plugin works.
I am going to create PHP test project for the same pb on PHP plugin

@jhertout
Copy link
Contributor

OK, thanks. It was to know what is the good way to proceed for our rules. We will do without the json.

@dedece35
Copy link
Member Author

dedece35 commented Mar 16, 2023

@jhertout,
I think that plugins currently working with JSON files must be kept like that.
I did it for python plugin because I looked for a simple and quick solution for python plugin problem (indeed, I spent a lot of time analysing the problem with a dichotomy method because of no idea).
I think I will dod the same for PHP plugin (that has the same problem).
But after hackathon, I think, I come back to these solutions to check why the previous method didn't work.
These problems (Python and PHP) was the good thing to introduce test projects.

@jhertout
Copy link
Contributor

Yes, we will do without the json only for the Python rules. We will keep the json for the other plugins. I think it is a better way to do when we can. Since we need our Python rule before the hackaton, I can't wait a potential refactor. We will create the json later during the python project refactor if necessary.

@dedece35 dedece35 closed this Mar 16, 2023
@dedece35 dedece35 reopened this Mar 16, 2023
@dedece35 dedece35 merged commit 040d6c4 into main Mar 16, 2023
@dedece35 dedece35 deleted the ISSUE_64 branch March 16, 2023 08:43
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

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.

2 participants