The enum_to_string utility logic needs to be updated to create code consistent with the SonarQube standards. To demonstrate the issue, I ran the following commands on seneca:
cd /d1/personal/johnhg/MET/MET_development/MET-develop
git checkout develop
source internal/scripts/environment/development.seneca
./bootstrap
make clean install
git status
These are mostly output from the enum_to_string utility. Fixing that should minimize these diffs. For this PR, I did the following:
Updated enum_to_string to remove parenthesis from return statements, use nullptr, switch to using while ( true ), and move the location of using namespace std;.
Ran make clean install test on seneca.
This means all auto-generated code is now up to date.
Beyond changes in src/basic/enum_to_string and in the .yy and .ll input files, the diffs for this PR are almost non-existent. The diff in configobjecttype_to_string.cc is just the removal of one blank line.
Expected Differences
[x] Do these changes introduce new tools, command line arguments, or configuration file options? [No]
If yes, please describe:
[x] Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
If yes, please describe:
Pull Request Testing
[x] Describe testing already performed for these changes:
See above.
[x] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Review the code changes.
Confirm that no diffs are flagged in the GHA testing workflow.
[x] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
None needed.
[x] Do these changes include sufficient testing updates? [Yes]
None needed.
[x] Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
[x] Please complete this pull request review by [Fri 3/15/2024].
[x] Review the source issue metadata (required labels, projects, and milestone).
[x] Complete the PR definition above.
[x] Ensure the PR title matches the feature or bugfix branch name.
[x] Define the PR metadata, as permissions allow.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
[x] After submitting the PR, select the :gear: icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
[ ] After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
[ ] Close the linked issue and delete your feature or bugfix branch from GitHub.
The
enum_to_string
utility logic needs to be updated to create code consistent with the SonarQube standards. To demonstrate the issue, I ran the following commands on seneca:And here's the files with diffs:
These are mostly output from the
enum_to_string
utility. Fixing that should minimize these diffs. For this PR, I did the following:enum_to_string
to remove parenthesis from return statements, use nullptr, switch to usingwhile ( true )
, and move the location ofusing namespace std;
.make clean install test
on seneca.Beyond changes in
src/basic/enum_to_string
and in the.yy
and.ll
input files, the diffs for this PR are almost non-existent. The diff inconfigobjecttype_to_string.cc
is just the removal of one blank line.Expected Differences
[x] Do these changes introduce new tools, command line arguments, or configuration file options? [No] If yes, please describe:
[x] Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No] If yes, please describe:
Pull Request Testing
[x] Describe testing already performed for these changes: See above.
[x] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Review the code changes.
Confirm that no diffs are flagged in the GHA testing workflow.
[x] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes] None needed.
[x] Do these changes include sufficient testing updates? [Yes] None needed.
[x] Will this PR result in changes to the test suite? [No] If yes, describe the new output and/or changes to the existing output:
[x] Please complete this pull request review by [Fri 3/15/2024].
Pull Request Checklist
See the METplus Workflow for details.