Uploaded image for project: 'VOLTHA'
  1. VOLTHA
  2. VOL-3285

Resolve static code analysis warning in BBSim

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Resolved (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: VOLTHA v2.5
    • Component/s: bbsim
    • Labels:
      None

      Description

      Running `make sca` on the BBSim repo results in a plethora or warnings, eg:

      <testcase name="gosimple" classname="internal/bbsim/devices/onu.go:828:6">
            <failure message="S1002: should omit comparison to bool constant, can be simplified to `o.Dhcp`"><![CDATA[                if o.Dhcp == true {]]></failure>
          </testcase>
          <testcase name="gosimple" classname="internal/bbsim/devices/onu.go:829:7">
            <failure message="S1002: should omit comparison to bool constant, can be simplified to `!o.DhcpFlowReceived`"><![CDATA[                   if o.DhcpFlowReceived == false {]]></failure>
          </testcase>
          <testcase name="gosimple" classname="internal/bbsim/devices/onu.go:839:11">
            <failure message="S1002: should omit comparison to bool constant, can be simplified to `v`"><![CDATA[                                                     if v == true {]]></failure>
          </testcase>
      

      All of these warnings needs to be resolved and the `sca` target needs to be added to the Jenkins testing to avoid regressions.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sbaid Shrey Baid
            Reporter:
            teone Matteo Scandolo
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes