sue445/chrome-gitlab-notifier

View on GitHub

Showing 10,177 of 10,177 total issues

File jquery-3.2.1.js has 6620 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.2.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in lib/jquery-3.2.1.js - About 2 wks to fix

Function Sizzle has 1452 lines of code (exceeds 25 allowed). Consider refactoring.
Open

(function( window ) {

var i,
    support,
    Expr,
Severity: Major
Found in lib/jquery-3.2.1.js - About 1 wk to fix

File bootstrap.js has 1596 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.3.7 (http://getbootstrap.com)
 * Copyright 2011-2016 Twitter, Inc.
 * Licensed under the MIT license
 */
Severity: Major
Found in lib/bootstrap.js - About 4 days to fix

File mithril.js has 1527 lines of code (exceeds 250 allowed). Consider refactoring.
Open

;(function() {
"use strict"
function Vnode(tag, key, attrs0, children0, text, dom) {
    return {tag: tag, key: key, attrs: attrs0, children: children0, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}
}
Severity: Major
Found in lib/mithril.js - About 4 days to fix

Function _12 has 742 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var _12 = function($window) {
    var $doc = $window && $window.document
    var currentRedraw
    var nameSpace = {
        svg: "http://www.w3.org/2000/svg",
Severity: Major
Found in lib/mithril.js - About 3 days to fix

Function view has 305 lines of code (exceeds 25 allowed). Consider refactoring.
Open

app.view = function(vnode) {
  const state = vnode.state;

  const matchSearchKey = (project) => {
    const keys = state.search_key.split(" ");
Severity: Major
Found in src/options.js - About 1 day to fix

Function ajax has 251 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ajax: function( url, options ) {

        // If url is an object, simulate pre-1.5 signature
        if ( typeof url === "object" ) {
            options = url;
Severity: Major
Found in lib/jquery-3.2.1.js - About 1 day to fix

Function setDocument has 245 lines of code (exceeds 25 allowed). Consider refactoring.
Open

setDocument = Sizzle.setDocument = function( node ) {
    var hasCompare, subWindow,
        doc = node ? node.ownerDocument || node : preferredDoc;

    // Return early if doc is invalid or already selected
Severity: Major
Found in lib/jquery-3.2.1.js - About 1 day to fix

Function _25 has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var _25 = function($window, mountRedraw00) {
    var fireAsync
    function setPath(path0, data, options) {
        path0 = buildPathname(path0, data)
        if (fireAsync != null) {
Severity: Major
Found in lib/mithril.js - About 7 hrs to fix

Function Deferred has 176 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Deferred: function( func ) {
        var tuples = [

                // action, add listener, callbacks,
                // ... .then handlers, argument index, [final state]
Severity: Major
Found in lib/jquery-3.2.1.js - About 7 hrs to fix

Function view has 162 lines of code (exceeds 25 allowed). Consider refactoring.
Open

app.view = function(vnode) {
  const state = vnode.state;

  const matchSearchKey = (project) => {
    const keys = state.search_key.split(" ");
Severity: Major
Found in src/trigger.js - About 6 hrs to fix

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

      case "Milestone": {
        // Milestone
        return this.gitlab.getEventInternalId({
          project_name: project.name,
          target_type:  target_type,
Severity: Major
Found in src/background.js and 1 other location - About 6 hrs to fix
src/background.js on lines 108..125

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 161.

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

        } else {
          // API v3
          return this.gitlab.getEventInternalId({
            project_name: project.name,
            target_type:  target_type,
Severity: Major
Found in src/background.js and 1 other location - About 6 hrs to fix
src/background.js on lines 128..145

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 161.

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

Function _18 has 145 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var _18 = function($window, Promise, oncompletion) {
    var callbackCount = 0
    function PromiseProxy(executor) {
        return new Promise(executor)
    }
Severity: Major
Found in lib/mithril.js - About 5 hrs to fix

Function notifyProjectEvent has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  notifyProjectEvent(project_id, project_event){
    const target_type = project_event.target_type || "Commit";

    let comment_target_type;
    if((target_type == "Note" || target_type == "DiffNote" ) && project_event.action_name == "commented on"){
Severity: Major
Found in src/background.js - About 5 hrs to fix

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

  const tokenList = () => {
    if (!state.gitlab.triggers) {
      return m("li.token", m("div","------"));
    }
    return state.gitlab.triggers.filter((token) =>{ 
Severity: Major
Found in src/trigger.js and 1 other location - About 5 hrs to fix
src/trigger.js on lines 19..35

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 139.

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

    m("form.form-inline[role='form']", [
      m(".form-group.col-xs-4", [
        m(".input-group", [
          m(".input-group-addon", [
            m("span.glyphicon.glyphicon-search")
Severity: Major
Found in src/trigger.js and 1 other location - About 5 hrs to fix
src/options.js on lines 292..314

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 139.

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

  const branchList = () => {
    if (!state.gitlab.branches) {
      return m("li", m("div","------"));
    }
    return state.gitlab.branches.filter((branch) =>{ 
Severity: Major
Found in src/trigger.js and 1 other location - About 5 hrs to fix
src/trigger.js on lines 44..61

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 139.

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

    m("form.form-inline[role='form'].form-custom", [
      m(".form-group.col-xs-4", [
        m(".input-group", [
          m(".input-group-addon", [
            m("span.glyphicon.glyphicon-search")
Severity: Major
Found in src/options.js and 1 other location - About 5 hrs to fix
src/trigger.js on lines 111..133

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 139.

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

  function Plugin(option) {
    return this.each(function () {
      var $this   = $(this)
      var data    = $this.data('bs.tooltip')
      var options = typeof option == 'object' && option
Severity: Major
Found in lib/bootstrap.js and 1 other location - About 5 hrs to fix
lib/bootstrap.js on lines 1859..1869

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 137.

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