Uploaded image for project: 'SEBA'
  1. SEBA
  2. SEBA-891

Resolve any lint violations in Redfish importer

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Resolved (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: NEM
    • Labels:
      None

      Description

      Resolve any errors reported by "make lint"

      root@ip-10-5-1-11:~/cord/device-management# make lint

      Running style check...

      Style check OK

      Running Dockerfile lint check ...

      Dockerfile lint check OK

      Running sanity check...

      Sanity check OK

      Running dependency check...

      all modules verified

      Dependency check OK

      root@ip-10-5-1-11:~/cord/device-management#

      to fix this did following things

      1. to fix lint-dockerfile excluded vendor directory
      2. to fix lint-style had execute go fmt on most files
      3. to fix lint-sanity fixed following errors and generated pb.go file and recompiled demotest

       

      root@ip-10-5-1-11:~/cord/device-management# make lint-sanity

      Running sanity check...

      1. github.com/opencord/device-management

      ./main.go:77:2: Println arg list ends with redundant newline

      ./main.go:96:2: Println arg list ends with redundant newline

      ./main.go:109:2: Println arg list ends with redundant newline

      ./main.go:136:2: Println arg list ends with redundant newline

      ./main.go:171:2: Println arg list ends with redundant newline

      ./main.go:269:14: Printf call has arguments but no formatting directives

      ./main.go:365:2: Println arg list ends with redundant newline

      ./main.go:391:3: Println call has possible formatting directive %v

      ./main.go:397:3: Println call has possible formatting directive %v

      1. github.com/opencord/device-management/demo_test

      demo_test/test.go:54:2: Println arg list ends with redundant newline

      demo_test/test.go:76:3: Error call has possible formatting directive %s

      demo_test/test.go:86:5: Error call has possible formatting directive %s

      demo_test/test.go:88:5: Info call has possible formatting directive %s

      demo_test/test.go:132:3: Fatal call has possible formatting directive %v

      demo_test/test.go:139:3: Fatal call has possible formatting directive %v

      demo_test/test.go:144:3: Fatal call has possible formatting directive %v

      Makefile:102: recipe for target 'lint-sanity' failed

      make: *** [lint-sanity] Error 2

      root@ip-10-5-1-11:~/cord/device-management#

        Attachments

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

          Activity

            People

            Assignee:
            belwalkar Dinesh Belwalkar
            Reporter:
            scottb Scott Baker
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes