Advertisement
Guest User

kepler revive issue

a guest
Sep 12th, 2022
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.53 KB | None | 0 0
  1. ^[[1mpkg/power/rapl/power.go:49^[[0m:1: ^[[31mdon't use `init` function^[[0m (gochecknoinits)^M
  2. ^[[1mcmd/exporter.go:65^[[0m:3: ^[[31mexitAfterDefer: log.Fatalf will exit, and `defer gpu.Shutdown()` will not run^[[0m (gocritic)^M
  3. ^[[1mcmd/exporter.go:63^[[0m:2: ^[[31mimportShadow: shadow of imported from 'github.com/sustainable-computing-io/kepler/pkg/collector' package 'collector'^[[0m (gocritic)^M
  4. ^[[1mcmd/exporter.go:93^[[0m:8: ^[[31mG114: Use of net/http serve function that has no support for setting timeouts^[[0m (gosec)^M
  5. ^[[1mpkg/bpf_assets/assets.go:17^[[0m:1: ^[[31mST1003: should not use underscores in package names^[[0m (stylecheck)^M
  6. ^[[1mpkg/cgroup/path_handler.go:48^[[0m:16: ^[[31mioutilDeprecated: ioutil.ReadFile is deprecated, use os.ReadFile instead^[[0m (gocritic)^M
  7. ^[[1mpkg/cgroup/path_handler.go:29^[[0m:1: ^[[31mparamTypeCombine: func(topFolder string, containerID string) string could be replaced with func(topFolder, containerID string) string^[[0m (gocritic)^M
  8. ^[[1mpkg/cgroup/path_handler.go:67^[[0m:3: ^[[31msingleCaseSwitch: should rewrite switch statement to if statement^[[0m (gocritic)^M
  9. ^[[1mpkg/cgroup/stat_reader.go:117^[[0m:3: ^[[31msingleCaseSwitch: should rewrite switch statement to if statement^[[0m (gocritic)^M
  10. ^[[1mpkg/cgroup/slice_handler.go:167^[[0m: ^[[31mFile is not `gofmt`-ed with `-s`^[[0m (gofmt)^M
  11. ^[[1mpkg/cgroup/stat_reader.go:38^[[0m: ^[[31mFile is not `gofmt`-ed with `-s`^[[0m (gofmt)^M
  12. ^[[1mpkg/cgroup/slice_handler_test.go:69^[[0m:19: ^[[31m`avilable` is a misspelling of `available`^[[0m (misspell)^M
  13. ^[[1mpkg/cgroup/stat_reader.go:138^[[0m:15: ^[[31munnecessary conversion^[[0m (unconvert)^M
  14. ^[[1mpkg/cgroup/slice_handler_test.go:42^[[0m: ^[[31munnecessary trailing newline^[[0m (whitespace)^M
  15. ^[[1mpkg/cgroup/path_handler.go:22^[[0m:2: ^[[31mSA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.^[[0m (staticcheck)^M
  16. ^[[1mpkg/cgroup/slice_handler.go:36^[[0m:2: ^[[31mST1003: should not use ALL_CAPS in Go names; use CamelCase instead^[[0m (stylecheck)^M
  17. ^[[1mpkg/cgroup/slice_handler.go:37^[[0m:2: ^[[31mST1003: should not use ALL_CAPS in Go names; use CamelCase instead^[[0m (stylecheck)^M
  18. ^[[1mpkg/cgroup/slice_handler.go:41^[[0m:2: ^[[31mST1003: should not use ALL_CAPS in Go names; use CamelCase instead^[[0m (stylecheck)^M
  19. ^[[1mpkg/collector/collector_test.go:39^[[0m:16: ^[[31mError return value of `json.Unmarshal` is not checked^[[0m (errcheck)^M
  20. ^[[1mpkg/collector/reader.go:159^[[0m:40: ^[[31mError return value of `.AddNewCurr` is not checked^[[0m (errcheck)^M
  21. ^[[1mpkg/collector/reader.go:173^[[0m:58: ^[[31mError return value of `(*github.com/sustainable-computing-io/kepler/pkg/collector.UInt64Stat).AddNewCurr` is not checked^[[0m (errcheck)^M
  22. ^[[1mpkg/collector/reader.go:233^[[0m:44: ^[[31mError return value of `(*github.com/sustainable-computing-io/kepler/pkg/collector.UInt64Stat).SetNewAggr` is not checked^[[0m (errcheck)^M
  23. ^[[1mpkg/collector/reader.go:234^[[0m:44: ^[[31mError return value of `(*github.com/sustainable-computing-io/kepler/pkg/collector.UInt64Stat).SetNewAggr` is not checked^[[0m (errcheck)^M
  24. ^[[1mpkg/collector/reader.go:316^[[0m:48: ^[[31mError return value of `.AddNewCurr` is not checked^[[0m (errcheck)^M
  25. ^[[1mpkg/collector/reader.go:317^[[0m:48: ^[[31mError return value of `.AddNewCurr` is not checked^[[0m (errcheck)^M
  26. ^[[1mpkg/collector/types.go:63^[[0m:24: ^[[31mError return value of `(*github.com/sustainable-computing-io/kepler/pkg/collector.UInt64Stat).SetNewAggr` is not checked^[[0m (errcheck)^M
  27. ^[[1mpkg/collector/collector.go:287^[[0m: ^[[31mFunction 'Collect' is too long (151 > 100)^[[0m (funlen)^M
  28. ^[[1mpkg/collector/reader.go:103^[[0m: ^[[31mFunction 'readBPFEvent' has too many statements (63 > 50)^[[0m (funlen)^M
  29. ^[[1mpkg/collector/collector.go:91^[[0m:20: ^[[31mappendAssign: append result not assigned to the same slice^[[0m (gocritic)^M
  30. ^[[1mpkg/collector/metrics.go:70^[[0m:3: ^[[31mappendCombine: can combine chain of 2 appends into one^[[0m (gocritic)^M
  31. ^[[1mpkg/collector/pod_energy.go:190^[[0m:3: ^[[31mappendCombine: can combine chain of 2 appends into one^[[0m (gocritic)^M
  32. ^[[1mpkg/collector/pod_energy.go:195^[[0m:3: ^[[31mappendCombine: can combine chain of 2 appends into one^[[0m (gocritic)^M
  33. ^[[1mpkg/collector/pod_energy.go:236^[[0m:7: ^[[31mhugeParam: v is heavy (200 bytes); consider passing it by pointer^[[0m (gocritic)^M
  34. ^[[1mpkg/collector/pod_energy.go:178^[[0m:13: ^[[31mredundantSprint: v.Command is already string^[[0m (gocritic)^M
  35. ^[[1mpkg/collector/pod_energy.go:129^[[0m:1: ^[[31munnamedResult: consider giving a name to these results^[[0m (gocritic)^M
  36. ^[[1mpkg/collector/pod_energy.go:135^[[0m:1: ^[[31munnamedResult: consider giving a name to these results^[[0m (gocritic)^M
  37. ^[[1mpkg/collector/collector_test.go:24^[[0m:30: ^[[31mcommentFormatting: put a space between `//` and comment text^[[0m (gocritic)^M
  38. ^[[1mpkg/collector/collector_test.go:25^[[0m:30: ^[[31mcommentFormatting: put a space between `//` and comment text^[[0m (gocritic)^M
  39. ^[[1mpkg/collector/collector_test.go:59^[[0m:40: ^[[31mhttpNoBody: http.NoBody should be preferred to the nil request body^[[0m (gocritic)^M
  40. ^[[1mpkg/collector/collector_test.go:63^[[0m:14: ^[[31mioutilDeprecated: ioutil.ReadAll is deprecated, use io.ReadAll instead^[[0m (gocritic)^M
  41. ^[[1mpkg/collector/collector_test.go:115^[[0m:13: ^[[31mioutilDeprecated: ioutil.ReadAll is deprecated, use io.ReadAll instead^[[0m (gocritic)^M
  42. ^[[1mpkg/collector/metrics_test.go:16^[[0m:13: ^[[31mappendAssign: append result not assigned to the same slice^[[0m (gocritic)^M
  43. ^[[1mpkg/collector/reader.go:43^[[0m:1: ^[[31mcommentFormatting: put a space between `//` and comment text^[[0m (gocritic)^M
  44. ^[[1mpkg/collector/reader.go:119^[[0m:3: ^[[31mcommentedOutCode: may want to remove commented-out code^[[0m (gocritic)^M
  45. ^[[1mpkg/collector/reader.go:342^[[0m:66: ^[[31mhugeParam: cpuTime is heavy (256 bytes); consider passing it by pointer^[[0m (gocritic)^M
  46. ^[[1mpkg/collector/reader.go:373^[[0m:20: ^[[31mhugeParam: cpuTime is heavy (256 bytes); consider passing it by pointer^[[0m (gocritic)^M
  47. ^[[1mpkg/collector/collector.go:69^[[0m: ^[[31mFile is not `gofmt`-ed with `-s`^[[0m (gofmt)^M
  48. ^[[1mpkg/collector/pod_energy.go:20^[[0m: ^[[31mFile is not `goimports`-ed with -local github.com/golangci/golangci-lint^[[0m (goimports)^M
  49. ^[[1mpkg/collector/collector_test.go:9^[[0m: ^[[31mFile is not `goimports`-ed with -local github.com/golangci/golangci-lint^[[0m (goimports)^M
  50. "github.com/prometheus/client_golang/prometheus"^M
  51. "github.com/prometheus/client_golang/prometheus/promhttp"^M
  52. ^[[1mpkg/collector/metrics_test.go:4^[[0m: ^[[31mFile is not `goimports`-ed with -local github.com/golangci/golangci-lint^[[0m (goimports)^M
  53. ^[[1mpkg/collector/reader.go:204^[[0m:2: ^[[31mnaked return in func `readBPFEvent` with 102 lines of code^[[0m (nakedret)^M
  54. ^[[1mpkg/collector/pod_energy.go:165^[[0m:34: ^[[31munnecessary conversion^[[0m (unconvert)^M
  55. ^[[1mpkg/collector/reader.go:151^[[0m:25: ^[[31munnecessary conversion^[[0m (unconvert)^M
  56. ^[[1mpkg/collector/reader.go:58^[[0m:2: ^[[31m`maxEnergyDelta` is unused^[[0m (varcheck)^M
  57. ^[[1mpkg/collector/reader.go:65^[[0m:2: ^[[31m`gpuEnergy` is unused^[[0m (varcheck)^M
  58. ^[[1mpkg/collector/reader.go:73^[[0m:2: ^[[31m`numCPUs` is unused^[[0m (varcheck)^M
  59. ^[[1mpkg/collector/reader.go:247^[[0m:3: ^[[31mS1000: should use for range instead of for { select {} }^[[0m (gosimple)^M
  60. ^[[1mpkg/collector/reader.go:219^[[0m:2: ^[[31mS1023: redundant `return` statement^[[0m (gosimple)^M
  61. ^[[1mpkg/collector/collector.go:356^[[0m:4: ^[[31mshadow: declaration of "edesc" shadows declaration at line 339^[[0m (govet)^M
  62. ^[[1mpkg/collector/metrics.go:82^[[0m:6: ^[[31mshadow: declaration of "metricNames" shadows declaration at line 48^[[0m (govet)^M
  63. ^[[1mpkg/collector/reader.go:177^[[0m:3: ^[[31mSA4006: this value of `err` is never used^[[0m (staticcheck)^M
  64. ^[[1mpkg/collector/collector_test.go:12^[[0m:2: ^[[31mSA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.^[[0m (staticcheck)^M
  65. ^[[1mpkg/collector/collector.go:41^[[0m:2: ^[[31mST1003: should not use underscores in Go names; const mJ_SUFFIX should be mJSUFFIX^[[0m (stylecheck)^M
  66. ^[[1mpkg/power/rapl/source/msr_util.go:57^[[0m:1: ^[[31mdon't use `init` function^[[0m (gochecknoinits)^M
  67. ^[[1mpkg/power/rapl/source/sysfs.go:49^[[0m:1: ^[[31mdon't use `init` function^[[0m (gochecknoinits)^M
  68. ^[[1mpkg/power/rapl/source/estimate.go:92^[[0m:12: ^[[31mioutilDeprecated: ioutil.ReadFile is deprecated, use os.ReadFile instead^[[0m (gocritic)^M
  69. ^[[1mpkg/power/rapl/source/estimate.go:108^[[0m:1: ^[[31munnamedResult: consider giving a name to these results^[[0m (gocritic)^M
  70. ^[[1mpkg/power/rapl/source/msr_util.go:75^[[0m:3: ^[[31massignOp: replace `i = i + 1` with `i++`^[[0m (gocritic)^M
  71. ^[[1mpkg/power/rapl/source/msr_util.go:94^[[0m:3: ^[[31massignOp: replace `i = i + 1` with `i++`^[[0m (gocritic)^M
  72. ^[[1mpkg/power/rapl/source/msr_util.go:109^[[0m:3: ^[[31massignOp: replace `i = i + 1` with `i++`^[[0m (gocritic)^M
  73. ^[[1mpkg/power/rapl/source/msr_util.go:80^[[0m:16: ^[[31mioutilDeprecated: ioutil.ReadFile is deprecated, use os.ReadFile instead^[[0m (gocritic)^M
  74. ^[[1mpkg/power/rapl/source/sysfs.go:71^[[0m:4: ^[[31mnestingReduce: invert if cond, replace body with `continue`, move old body after the statement^[[0m (gocritic)^M
  75. ^[[1mpkg/power/rapl/source/msr_util.go:53^[[0m:14: ^[[31mvar `timeUnits` is unused^[[0m (unused)^M
  76. ^[[1mpkg/power/rapl/source/sysfs.go:125^[[0m:3: ^[[31mS1005: unnecessary assignment to the blank identifier^[[0m (gosimple)^M
  77. ^[[1mpkg/power/rapl/source/sysfs.go:126^[[0m:3: ^[[31mS1005: unnecessary assignment to the blank identifier^[[0m (gosimple)^M
  78. ^[[1mpkg/power/rapl/source/sysfs.go:127^[[0m:3: ^[[31mS1005: unnecessary assignment to the blank identifier^[[0m (gosimple)^M
  79. ^[[1mpkg/power/rapl/source/estimate.go:23^[[0m:2: ^[[31mSA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.^[[0m (staticcheck)^M
  80. ^[[1mpkg/power/rapl/source/msr_util.go:122^[[0m:14: ^[[31mST1003: func parameter packageId should be packageID^[[0m (stylecheck)^M
  81. ^[[1mpkg/power/rapl/source/msr_util.go:169^[[0m:19: ^[[31mST1003: func parameter packageId should be packageID^[[0m (stylecheck)^M
  82. ^[[1mpkg/power/rapl/source/msr_util.go:177^[[0m:20: ^[[31mST1003: func parameter packageId should be packageID^[[0m (stylecheck)^M
  83. ^[[1mpkg/power/rapl/source/sysfs.go:69^[[0m:6: ^[[31mST1003: range var pkId should be pkID^[[0m (stylecheck)^M
  84. ^[[1mpkg/power/rapl/source/sysfs.go:124^[[0m:6: ^[[31mST1003: range var pkgId should be pkgID^[[0m (stylecheck)^M
  85. ^[[1mpkg/power/acpi/acpi.go:85^[[0m:8: ^[[31mcommentedOutCode: may want to remove commented-out code^[[0m (gocritic)^M
  86. ^[[1mpkg/power/acpi/acpi.go:115^[[0m:16: ^[[31mioutilDeprecated: ioutil.ReadDir is deprecated, use os.ReadDir instead^[[0m (gocritic)^M
  87. ^[[1mpkg/power/acpi/acpi.go:170^[[0m:48: ^[[31mgetPowerFromSensor - result 1 (error) is always nil^[[0m (unparam)^M
  88. ^[[1mpkg/power/gpu/gpu_nvml.go:96^[[0m:4: ^[[31mcommentedOutCode: may want to remove commented-out code^[[0m (gocritic)^M
  89. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:166^[[0m:2: ^[[31mdeclaration has 4 blank identifiers^[[0m (dogsled)^M
  90. ^[[1mpkg/pod_lister/cgroup_stats.go:44^[[0m:40: ^[[31mcaptLocal: `PID' should not be capitalized^[[0m (gocritic)^M
  91. ^[[1mpkg/pod_lister/cgroup_stats.go:37^[[0m:28: ^[[31mregexpSimplify: can re-write `([0-9]+):([0-9]+).rbytes=([0-9]+).wbytes=([0-9]+)` as `(\d+):(\d+).rbytes=(\d+).wbytes=(\d+)`^[[0m (gocritic)^M
  92. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:56^[[0m:5: ^[[31memptyStringTest: replace `len(nodeName) == 0` with `nodeName == ""`^[[0m (gocritic)^M
  93. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:60^[[0m:5: ^[[31memptyStringTest: replace `len(port) == 0` with `port == ""`^[[0m (gocritic)^M
  94. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:75^[[0m:42: ^[[31mhttpNoBody: http.NoBody should be preferred to the nil request body^[[0m (gocritic)^M
  95. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:96^[[0m:15: ^[[31mioutilDeprecated: ioutil.ReadAll is deprecated, use io.ReadAll instead^[[0m (gocritic)^M
  96. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:112^[[0m:1: ^[[31mparamTypeCombine: func() (containerCPU map[string]float64, containerMem map[string]float64, nodeCPU float64, nodeMem float64, retErr error) could be replaced with func() (containerCPU, containerMem map[string]float64, nodeCPU, nodeMem float64, retErr error)^[[0m (gocritic)^M
  97. ^[[1mpkg/pod_lister/resolve_container.go:80^[[0m:34: ^[[31mcaptLocal: `PID' should not be capitalized^[[0m (gocritic)^M
  98. ^[[1mpkg/pod_lister/resolve_container.go:85^[[0m:39: ^[[31mcaptLocal: `PID' should not be capitalized^[[0m (gocritic)^M
  99. ^[[1mpkg/pod_lister/resolve_container.go:95^[[0m:1: ^[[31mparamTypeCombine: func() (containerCPU map[string]float64, containerMem map[string]float64, nodeCPU float64, nodeMem float64, retErr error) could be replaced with func() (containerCPU, containerMem map[string]float64, nodeCPU, nodeMem float64, retErr error)^[[0m (gocritic)^M
  100. ^[[1mpkg/pod_lister/resolve_container.go:137^[[0m:2: ^[[31mrangeValCopy: each iteration copies 1000 bytes (consider pointers or indexing)^[[0m (gocritic)^M
  101. ^[[1mpkg/pod_lister/resolve_container.go:139^[[0m:3: ^[[31mrangeValCopy: each iteration copies 128 bytes (consider pointers or indexing)^[[0m (gocritic)^M
  102. ^[[1mpkg/pod_lister/resolve_container.go:152^[[0m:3: ^[[31mrangeValCopy: each iteration copies 128 bytes (consider pointers or indexing)^[[0m (gocritic)^M
  103. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:80^[[0m:72: ^[[31mG402: TLS InsecureSkipVerify set true.^[[0m (gosec)^M
  104. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:161^[[0m:2: ^[[31mnaked return in func `ListMetrics` with 50 lines of code^[[0m (nakedret)^M
  105. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:49^[[0m:2: ^[[31mvar `containerNameTag` is unused^[[0m (unused)^M
  106. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:47^[[0m:2: ^[[31mvar `containerStartTimeMetricName` is unused^[[0m (unused)^M
  107. ^[[1mpkg/pod_lister/cgroup_stats.go:100^[[0m:2: ^[[31mS1008: should use 'return major == "253"' instead of 'if major == "253" { return true }; return false'^[[0m (gosimple)^M
  108. ^[[1mpkg/pod_lister/byte_order.go:1^[[0m:1: ^[[31mST1003: should not use underscores in package names^[[0m (stylecheck)^M
  109. ^[[1mpkg/pod_lister/cgroup_stats.go:17^[[0m:1: ^[[31mST1003: should not use underscores in package names^[[0m (stylecheck)^M
  110. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:41^[[0m:2: ^[[31mST1003: var podUrl should be podURL^[[0m (stylecheck)^M
  111. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:43^[[0m:2: ^[[31mST1003: var nodeCpuUsageMetricName should be nodeCPUUsageMetricName^[[0m (stylecheck)^M
  112. ^[[1mpkg/pod_lister/kubelet_pod_lister.go:45^[[0m:2: ^[[31mST1003: var containerCpuUsageMetricName should be containerCPUUsageMetricName^[[0m (stylecheck)^M
  113. ^[[1mpkg/pod_lister/resolve_container.go:228^[[0m:26: ^[[31mST1003: func parameter cgroupId should be cgroupID^[[0m (stylecheck)^M
  114. ^[[1mpkg/attacher/bcc_attacher_stub.go:55^[[0m:2: ^[[31mS1023: redundant `return` statement^[[0m (gosimple)^M
  115. ^[[1mpkg/config/config.go:64^[[0m:17: ^[[31mError return value of `json.Unmarshal` is not checked^[[0m (errcheck)^M
  116. ^[[1mpkg/config/config.go:93^[[0m:1: ^[[31mparamTypeCombine: func(modelName string, selectFilter string) could be replaced with func(modelName, selectFilter string)^[[0m (gocritic)^M
  117. ^[[1mpkg/config/config.go:78^[[0m:2: ^[[31mS1008: should use 'return !os.IsNotExist(err)' instead of 'if os.IsNotExist(err) { return false }; return true'^[[0m (gosimple)^M
  118. ^[[1mpkg/config/config.go:50^[[0m:6: ^[[31mS1002: should omit comparison to bool constant, can be simplified to `enabled`^[[0m (gosimple)^M
  119. ^[[1mpkg/model/estimate.go:161^[[0m:19: ^[[31munslice: could simplify buf[:] to buf^[[0m (gocritic)^M
  120. ^[[1mpkg/model/model.go:63^[[0m:2: ^[[31mvar `modelServerEndpoint` is unused^[[0m (unused)^M
  121. ^[[1mpkg/model/estimate.go:122^[[0m:6: ^[[31mfunc `f64Tof32` is unused^[[0m (unused)^M
  122. ^[[1mpkg/model/model.go:102^[[0m: ^[[31munnecessary trailing newline^[[0m (whitespace)^M
  123. ^[[1mpkg/model/estimate.go:111^[[0m:3: ^[[31mshadow: declaration of "unknownValue" shadows declaration at line 104^[[0m (govet)^M
  124. ^[[1mpkg/model/estimate.go:142^[[0m:2: ^[[31mST1003: var powerRequestJson should be powerRequestJSON^[[0m (stylecheck)^M
  125. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement