dtcenter/MET

Documentation: Add SonarQube Code Recommendations to Contributor Guide

jprestop opened this issue · 0 comments

Describe the Task

SonarQube provides recommendations for cleaner code and Howard has been implementing these changes. For example:

  • Do NOT use parentheses in return statements anymore.
  • Minimum scope for local variables. Move local vars as close to their use as possible.
  • Use nullptr instead of 0 to initialize pointers.
  • Prefer strings to character arrays.

We'd like to maintain a list of advice to be included in the Contributor’s Guide. We should also consider reviewing older SonarQube PRs for other changes already made that are not included in the list above. Additionally, it would be great if we could find these SonarQube recommendations online and link to these recommendations.
See C++ standard version related rule tags, for example.

Time Estimate

<1 day of work

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

None

Funding Source

TBD

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next official version or Backlog of Development Ideas
  • For the next official version, select the MET-X.Y.Z Development project

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y.Z Development project for development toward the next official release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.