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

tooling: Correct upper case values in docs build errors. #426

Conversation

Aymen-Soussi-01
Copy link
Contributor

@Aymen-Soussi-01 Aymen-Soussi-01 commented Feb 19, 2025

Replace all ids and options items by their value in small letters.

Also-by: Aymen Soussi [email protected]

I used 2 regex to do the job (:[a-z]: .__.) and (:[a-z]: ._.) and replaced them with \L$1 all using VS Code option to search and replace regex patterns to handle all options and id cases that not follow the pattern.
In another PR we will handle the case of id and options that start only with one "_" Plus there were some small mistakes like changing ASIL_D/B to asil_d/b and some small unnecessary ones that I fixed manually by returning them to their old value.

After the correction of the check_id_format we reduced more then 200 build errors
Related to: #282

Copy link

The created documentation from the pull request is available at: docu-html

@hoe-jo
Copy link
Contributor

hoe-jo commented Feb 19, 2025

With the regexes you just proposed we loose the information where we need to set the first two underscores. It´s not clear for me how you want to check this later. My proposal would be:

  1. \b(([A-Z0-9]+){1,4})*(?=[a-z]) -> \L$1_

@AlexanderLanin
Copy link
Member

With the regexes you just proposed we loose the information where we need to set the first two underscores. It´s not clear for me how you want to check this later.

The underscores are not touched. Why do we need to know where they are?

@hoe-jo
Copy link
Contributor

hoe-jo commented Feb 20, 2025

Just updated the regex with this we would fix the prefixes

@Aymen-Soussi-01 Aymen-Soussi-01 force-pushed the Aymen-Soussi-01-fix-build-errors-for-options-with-big-letters branch from d240bc1 to 9ff82ee Compare February 20, 2025 08:39
@Aymen-Soussi-01
Copy link
Contributor Author

@hoe-jo I manually reviewed every value I changed and didn't find any lost information. The 2 regex worked well and made the objective of PR. If you found any example of lost infos in this PR please mention it so that I can see how to correct it.
Also, I tried your regex and it doesn't give the expected results as it changes every single line of rst files and make most of the words if not all of them lost infos

@hoe-jo
Copy link
Contributor

hoe-jo commented Feb 20, 2025

Ok, let me please reformulate then:

Currently we can distinguish between prefix and keyword:
RL_contributor

If we change it to:
rl_contributor

How do we (later) introduce here the 2nd underscore? We already lost here the information what is prefix and what is keyword, other example:
STD_REQ_sometext -> std_req_sometext

To add here the 2nd (missing) underscore we would have to search for each workproduct itself later and correct it

With the Regex:
b(([A-Z0-9]+){1,4})*(?=[a-z]) -> \L$1_

This is done automatically in one step

@Aymen-Soussi-01 Aymen-Soussi-01 force-pushed the Aymen-Soussi-01-fix-build-errors-for-options-with-big-letters branch from 9ff82ee to d4a4471 Compare February 20, 2025 10:11
@Aymen-Soussi-01
Copy link
Contributor Author

@hoe-jo the underscore handling will be in the next PR

@hoe-jo
Copy link
Contributor

hoe-jo commented Feb 20, 2025

Fine for me if you know how to separate those later

@AlexanderLanin
Copy link
Member

We should use different need types for differentiation and not id-naming-rules.

AlexanderLanin
AlexanderLanin previously approved these changes Feb 20, 2025
@AlexanderLanin
Copy link
Member

Mhh this PR does not actually reduce the number of warnings?!

@Aymen-Soussi-01
Copy link
Contributor Author

@AlexanderLanin We need to complete the underscore part to reduce the build errors as most of needs are not following the patters and not only are in big letters

@AlexanderLanin
Copy link
Member

But this PR does not reduce warnings. It's still ~1500 warnings, same as before.

@Aymen-Soussi-01
Copy link
Contributor Author

Aymen-Soussi-01 commented Feb 20, 2025

@AlexanderLanin Yes after doing my changes and before merging the main and resolving the conflicts somehow the errors where 1078 then they become >1800 after the merge and squash of the main I still don't get it as I resolve some small conflicts in 4 or 5 files which contains some valid ids and options but most of errors are related to underscore

Replace all ids and options items by their value in small letters.

Also-by: Aymen Soussi [email protected]
@Aymen-Soussi-01 Aymen-Soussi-01 force-pushed the Aymen-Soussi-01-fix-build-errors-for-options-with-big-letters branch from d4a4471 to 9c70b51 Compare February 20, 2025 11:22
@Aymen-Soussi-01
Copy link
Contributor Author

@AlexanderLanin I just corrected one of the checks (check_id_format) and the errors now have been reduced to 1651 error

@AlexanderLanin AlexanderLanin merged commit 88b3909 into eclipse-score:main Feb 20, 2025
7 checks passed
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.

3 participants