firehol/netdata

View on GitHub

Showing 1,088 of 2,665 total issues

Method StorCli.collectMegaRaidDrives has 6 return statements (exceeds 4 allowed).
Open

func (s *StorCli) collectMegaRaidDrives(mx map[string]int64, resp *drivesInfoResponse) error {
    if resp == nil {
        return nil
    }

Severity: Major
Found in src/go/plugin/go.d/modules/storcli/collect_drives.go - About 40 mins to fix

    Function ReadLastLine has 6 return statements (exceeds 4 allowed).
    Open

    func ReadLastLine(filename string, maxLineWidth int64) ([]byte, error) {
        if maxLineWidth <= 0 {
            maxLineWidth = DefaultMaxLineWidth
        }
        f, err := os.Open(filename)
    Severity: Major
    Found in src/go/plugin/go.d/pkg/logs/lastline.go - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                                  if (typeof this.plugins_[len].plugin.ylabel_div_ !== 'undefined'
                                      && this.plugins_[len].plugin.ylabel_div_ !== null
                                      && typeof this.plugins_[len].plugin.ylabel_div_.children !== 'undefined'
                                      && this.plugins_[len].plugin.ylabel_div_.children !== null
                                      && typeof this.plugins_[len].plugin.ylabel_div_.children[0].children !== 'undefined'
      Severity: Major
      Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                                    if (typeof this.plugins_[len].plugin.ylabel_div_ !== 'undefined'
                                        && this.plugins_[len].plugin.ylabel_div_ !== null
                                        && typeof this.plugins_[len].plugin.ylabel_div_.children !== 'undefined'
                                        && this.plugins_[len].plugin.ylabel_div_.children !== null
                                        && typeof this.plugins_[len].plugin.ylabel_div_.children[0].children !== 'undefined'
        Severity: Major
        Found in src/web/gui/v1/dashboard.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if (status === true && (after === null || before === null || after <= 0 || before <= 0 || after >= before)) {
                      status = false;
                      after = 0;
                      before = 0;
                  }
          Severity: Major
          Found in src/web/gui/main.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                        if (typeof tmpSnapshotData.highlight_after_ms !== 'undefined'
                            && tmpSnapshotData.highlight_after_ms !== null
                            && tmpSnapshotData.highlight_after_ms > 0
                            && typeof tmpSnapshotData.highlight_before_ms !== 'undefined'
                            && tmpSnapshotData.highlight_before_ms !== null
            Severity: Major
            Found in src/web/gui/main.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                              if ch in '\0 \t\r\n\x85\u2028\u2029'    \
                                      or (not self.flow_level and ch == ':' and
                                              self.peek(length+1) in '\0 \t\r\n\x85\u2028\u2029') \
                                      or (self.flow_level and ch in ',:?[]{}'):
                                  break
              Severity: Major
              Found in src/collectors/python.d.plugin/python_modules/pyyaml3/scanner.py - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                        if isinstance(self.event, DocumentStartEvent):
                            if (self.event.version or self.event.tags) and self.open_ended:
                                self.write_indicator('...', True)
                                self.write_indent()
                            if self.event.version:
                Severity: Major
                Found in src/collectors/python.d.plugin/python_modules/pyyaml3/emitter.py - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if '0' <= ch <= '9' or 'A' <= ch <= 'Z' or 'a' <= ch <= 'z' \
                                      or ch in '-;/?:@&=+$,_.~*\'()[]'   \
                                      or (ch == '!' and handle != '!'):
                                  end += 1
                              else:
                  Severity: Major
                  Found in src/collectors/python.d.plugin/python_modules/pyyaml3/emitter.py - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if ch is None or ch in '"\\\x85\u2028\u2029\uFEFF' \
                                        or not ('\x20' <= ch <= '\x7E'
                                            or (self.allow_unicode
                                                and ('\xA0' <= ch <= '\uD7FF'
                                                    or '\uE000' <= ch <= '\uFFFD'))):
                    Severity: Major
                    Found in src/collectors/python.d.plugin/python_modules/pyyaml3/emitter.py - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if self.context_mark is not None  \
                                  and (self.problem is None or self.problem_mark is None
                                          or self.context_mark.name != self.problem_mark.name
                                          or self.context_mark.line != self.problem_mark.line
                                          or self.context_mark.column != self.problem_mark.column):
                      Severity: Major
                      Found in src/collectors/python.d.plugin/python_modules/pyyaml3/error.py - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if ((not self.canonical or tag is None) and
                                        ((self.style == '' and self.event.implicit[0])
                                                or (self.style != '' and self.event.implicit[1]))):
                                        self.prepared_tag = None
                                        return
                        Severity: Major
                        Found in src/collectors/python.d.plugin/python_modules/pyyaml3/emitter.py - About 40 mins to fix

                          Method Consul.collectGauge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (c *Consul) collectGauge(mx map[string]int64, mfs prometheus.MetricFamilies, name string, mul float64, aliases ...string) {
                          Severity: Minor
                          Found in src/go/plugin/go.d/modules/consul/collect_metrics.go - About 35 mins to fix

                            Function highlightCallback has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    highlightCallback: function (event, x, points, row, seriesName) {
                            Severity: Minor
                            Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 35 mins to fix

                              Function dimensionStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              let dimensionStatus = function (parent, label, name_div, value_div, color) {
                              Severity: Minor
                              Found in src/web/gui/src/dashboard.js/main.js - About 35 mins to fix

                                Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    set: function (state, after, before, view_after, view_before) {
                                Severity: Minor
                                Found in src/web/gui/src/dashboard.js/main.js - About 35 mins to fix

                                  Function genLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          const genLabel = function (state, parent, dim, name, count) {
                                  Severity: Minor
                                  Found in src/web/gui/src/dashboard.js/main.js - About 35 mins to fix

                                    Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        init: function (state, after, before, view_after, view_before) {
                                    Severity: Minor
                                    Found in src/web/gui/src/dashboard.js/main.js - About 35 mins to fix

                                      Function genLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              const genLabel = function (state, parent, dim, name, count) {
                                      Severity: Minor
                                      Found in src/web/gui/v1/dashboard.js - About 35 mins to fix

                                        Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            init: function (state, after, before, view_after, view_before) {
                                        Severity: Minor
                                        Found in src/web/gui/v1/dashboard.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language