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

[CRDOM203][5R] add DocType rule as ecorule #16

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Silicoman
Copy link
Contributor

As discuss here, green-code-initiative/ecoCode#103

Add new rule to label as eco-design

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.

before merging this PR, waiting for #17, thus I modify this PR to Draft.
Then, add an explanation of adding this rule as "eco-design" type

@@ -26,7 +26,7 @@ TAG_ECOCONCEPTION=test1
# TAG_ECOCONCEPTION=

# list of rule keys that will be updated with new tag
RULES_KEYS=css:S4655,php:S2014,Web:ItemTagNotWithinContainerTagCheck
RULES_KEYS=css:S4655,php:S2014,Web:ItemTagNotWithinContainerTagCheck,Web:DoctypePresenceCheck
Copy link
Member

Choose a reason for hiding this comment

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

please remove other rules because they are only for testing the system

@dedece35 dedece35 added 👀 👀 review done 👀 👀 review done - waiting for changes 🏆 challenge 🏆 Work done during the ecoCode Challenge enhancement New feature or request labels Apr 10, 2023
@dedece35 dedece35 self-requested a review April 10, 2023 21:23
@dedece35 dedece35 marked this pull request as draft April 10, 2023 21:23
dedece35
dedece35 previously approved these changes Apr 11, 2023
@dedece35
Copy link
Member

Hi @Silicoman , please resolve conflicts and check again tests and your upgrade.
thx.

@dedece35 dedece35 dismissed their stale review April 11, 2023 20:25

resolve conflicts

# Conflicts:
#	tools/rules_config/_config.sh
@Silicoman
Copy link
Contributor Author

i Have resolved with the new script. It's ok, logs below.
I have deleted examples from main.

I'm waiting infos from issue opened if it's a relevant.

--- DEBUG --- Read file ./SONAR_RULES_REUSED.md
--- DEBUG --- Extracting rules: Web:DoctypePresenceCheck

--- DEBUG --- SONAR_TOKEN : xxxxxxxxxxxxxxxxxxxxxxxxx
--- DEBUG --- SONAR_URL : http://localhost:9000
--- DEBUG --- RULES_KEYS : Web:DoctypePresenceCheck
--- DEBUG --- TAG_ECOCONCEPTION : test1

*****  Checking SonarQube connection  *****
--- DEBUG --- SonarQube connection ok : 200

*****  Processing rule Web:DoctypePresenceCheck  *****
Existing sysTags : [
  "user-experience"
]
Existing tags : []
--- DEBUG ---   Processing systag user-experience
  Tag test1 NOT FOUND in tags array nor in systags array : we will add it to rule 'Web:DoctypePresenceCheck'
Execution of command : curl -u xxxxxxxxxxxxxxxxxxxxxxx: -s -o /dev/null --request POST "http://localhost:9000/api/rules/update?key=Web:DoctypePresenceCheck&tags=test1"
CALL to Sonar API to add tag

==> 1 rules updated

# Conflicts:
#	tools/rules_config/SONAR_RULES_REUSED.md
@dedece35 dedece35 marked this pull request as ready for review April 13, 2023 21:26
@dedece35
Copy link
Member

Hi @Silicoman,
ok for me, now.
did you think about our documentation on how to upgrade our installation doc (for developers and clients) ?

@dedece35
Copy link
Member

Hi @Silicoman,
after checking, I don't find rule Web:DoctypePresenceCheck in SonarQube :(
thus, modification isn't possible.

Do you have this rule when you install SonarQube 10, locally ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏆 challenge 🏆 Work done during the ecoCode Challenge enhancement New feature or request 👀 👀 review done 👀 👀 review done - waiting for changes 👀 👀 waiting commiter 👀 👀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants