edgewall/trac

View on GitHub

Showing 1,372 of 1,372 total issues

Avoid too many return statements within this function.
Open

                return ''
Severity: Major
Found in trac/ticket/roadmap.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return tag.span(alist[0], *[(', ', a) for a in alist[1:]])
    Severity: Major
    Found in trac/ticket/query.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return tag(groups[0], [(', ', g) for g in groups[1:]])
      Severity: Major
      Found in trac/ticket/query.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return tag.div(tag.dl([(tag.dt(ticket_anchor(ticket)),
        Severity: Major
        Found in trac/ticket/query.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return tag.span(_("No results"), class_='query_no_results')
          Severity: Major
          Found in trac/ticket/query.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                return (('NOT ' if neg else '')
            Severity: Major
            Found in trac/ticket/query.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return None
              Severity: Major
              Found in trac/ticket/query.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return tag.div(
                Severity: Major
                Found in trac/ticket/query.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return tag.div(
                  Severity: Major
                  Found in trac/ticket/query.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return None                     # no match for action, can't decide
                    Severity: Major
                    Found in tracopt/perm/authz_policy.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return 'ticket_preview.html', data
                      Severity: Major
                      Found in trac/ticket/web_ui.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return 'ticket.html', data
                        Severity: Major
                        Found in trac/ticket/web_ui.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return resolved
                          Severity: Major
                          Found in tracopt/versioncontrol/git/PyGIT.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return None
                            Severity: Major
                            Found in tracopt/versioncontrol/git/PyGIT.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return None
                              Severity: Major
                              Found in tracopt/versioncontrol/git/PyGIT.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return rc
                                Severity: Major
                                Found in tracopt/versioncontrol/git/PyGIT.py - About 30 mins to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          $("table.code th."+highlight_rev).each(function() {
                                            $(this.parentNode).addClass("hilite")
                                          });
                                  Severity: Minor
                                  Found in trac/htdocs/js/blame.js and 1 other location - About 30 mins to fix
                                  trac/htdocs/js/blame.js on lines 65..67

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 45.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                              subs = cls.find_by_sid_and_distributor(
                                                  env, sub['sid'], sub['authenticated'], sub['distributor'])
                                  Severity: Minor
                                  Found in trac/notification/model.py and 1 other location - About 30 mins to fix
                                  trac/notification/model.py on lines 90..91

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 32.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                            $("table.code th."+message_rev).each(function() {
                                              $(this.parentNode).removeClass("hilite")
                                            });
                                  Severity: Minor
                                  Found in trac/htdocs/js/blame.js and 1 other location - About 30 mins to fix
                                  trac/htdocs/js/blame.js on lines 101..103

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 45.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                  Open

                                                      if milestone.is_completed:
                                                          title = _(
                                                              "Completed %(duration)s ago (%(date)s)",
                                                              duration=pretty_timedelta(milestone.completed),
                                                              date=user_time(context.req, format_datetime,
                                  Severity: Minor
                                  Found in trac/ticket/roadmap.py and 2 other locations - About 30 mins to fix
                                  trac/ticket/roadmap.py on lines 1107..1111
                                  trac/ticket/roadmap.py on lines 1112..1116

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 32.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language