sue445/chrome-gitlab-notifier

View on GitHub

Showing 10,177 of 10,177 total issues

Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function on( elem, types, selector, data, fn, one ) {
    var origFn, type;

    // Types can be a map of types/handlers
    if ( typeof types === "object" ) {
Severity: Minor
Found in lib/jquery-3.2.1.js - About 1 hr to fix

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

            if (attrsResult != null) {
                var next = function () {
                    // eslint-disable-next-line no-bitwise
                    if (mask & 2) { mask &= 1; if (!mask) reallyRemove() }
                }
Severity: Major
Found in lib/mithril.js and 1 other location - About 1 hr to fix
lib/mithril.js on lines 916..922

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

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 PromisePolyfill has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var PromisePolyfill = function(executor) {
    if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with `new`")
    if (typeof executor !== "function") throw new TypeError("executor must be a function")
    var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)
    var instance = self._instance = {resolvers: resolvers, rejectors: rejectors}
Severity: Minor
Found in lib/mithril.js - About 1 hr to fix

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

            if (stateResult != null) {
                var next = function () {
                    // eslint-disable-next-line no-bitwise
                    if (mask & 1) { mask &= 2; if (!mask) reallyRemove() }
                }
Severity: Major
Found in lib/mithril.js and 1 other location - About 1 hr to fix
lib/mithril.js on lines 923..929

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

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 removeNode has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function removeNode(parent, vnode3) {
        var mask = 0
        var original = vnode3.state
        var stateResult, attrsResult
        if (typeof vnode3.tag !== "string" && typeof vnode3.state.onbeforeremove === "function") {
Severity: Minor
Found in lib/mithril.js - About 1 hr to fix

Function execSelector has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function execSelector(state, vnode) {
    var attrs = vnode.attrs
    var children = Vnode.normalizeChildren(vnode.children)
    var hasClass = hasOwn.call(attrs, "class")
    var className = hasClass ? attrs.class : attrs.className
Severity: Minor
Found in lib/mithril.js - About 1 hr to fix

Function toggleClass has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toggleClass: function( value, stateVal ) {
        var type = typeof value;

        if ( typeof stateVal === "boolean" && type === "string" ) {
            return stateVal ? this.addClass( value ) : this.removeClass( value );
Severity: Minor
Found in lib/jquery-3.2.1.js - About 1 hr to fix

Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Modal.prototype.show = function (_relatedTarget) {
    var that = this
    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })

    this.$element.trigger(e)
Severity: Minor
Found in lib/bootstrap.js - About 1 hr to fix

Function onload has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

window.onload = function() {
  m.mount(document.getElementById("app"), {
    oninit: function() {
      const config = new Config(localStorage);

Severity: Minor
Found in src/options_init.js - About 1 hr to fix

Function backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Modal.prototype.backdrop = function (callback) {
    var that = this
    var animate = this.$element.hasClass('fade') ? 'fade' : ''

    if (this.isShown && this.options.backdrop) {
Severity: Minor
Found in lib/bootstrap.js - About 1 hr to fix

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

      m(".form-group", [
        m("label.col-sm-3.control-label[for='private_token']", "Private token"),
        m(".col-sm-5", [
          m("input.form-control[id='private_token'][type='password']", {
            value: state.private_token,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 187..195
src/options.js on lines 196..204
src/options.js on lines 230..238
src/options.js on lines 239..247
src/options.js on lines 262..270

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

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 6 locations. Consider refactoring.
Open

      m(".form-group", [
        m("label.col-sm-3.control-label[for='api_path']", "GitLab API Path"),
        m(".col-sm-5", [
          m("input.form-control[id='api_path'][placeholder='http://example.com/api/v4/'][type='text']", {
            value: state.api_path,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 187..195
src/options.js on lines 205..213
src/options.js on lines 230..238
src/options.js on lines 239..247
src/options.js on lines 262..270

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

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 6 locations. Consider refactoring.
Open

      m(".form-group", [
        m("label.col-sm-3.text-right[for='ignore_own_events']", "Ignore own events"),
        m(".col-sm-5", [
          m("input[id='ignore_own_events'][type='checkbox']", {
            checked: state.ignore_own_events,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 187..195
src/options.js on lines 196..204
src/options.js on lines 205..213
src/options.js on lines 230..238
src/options.js on lines 239..247

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

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 6 locations. Consider refactoring.
Open

      m(".form-group", [
        m("label.col-sm-3.control-label[for='max_event_count']", "Notification to show"),
        m(".col-sm-5", [
          m("input.form-control[id='max_event_count'][type='text']", {
            value: state.max_event_count,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 187..195
src/options.js on lines 196..204
src/options.js on lines 205..213
src/options.js on lines 239..247
src/options.js on lines 262..270

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

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 6 locations. Consider refactoring.
Open

      m(".form-group", [
        m("label.col-sm-3.control-label[for='max_notification_count']", "Notification per project"),
        m(".col-sm-5", [
          m("input.form-control[id='max_notification_count'][type='text']", {
            value: state.max_notification_count,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 187..195
src/options.js on lines 196..204
src/options.js on lines 205..213
src/options.js on lines 230..238
src/options.js on lines 262..270

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

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 6 locations. Consider refactoring.
Open

      m(".form-group", [
        m("label.col-sm-3.control-label[for='gitlab_path']", "GitLab Path"),
        m(".col-sm-5", [
          m("input.form-control[id='gitlab_path'][placeholder='http://example.com/'][type='text']", {
            value: state.gitlab_path,
Severity: Major
Found in src/options.js and 5 other locations - About 1 hr to fix
src/options.js on lines 196..204
src/options.js on lines 205..213
src/options.js on lines 230..238
src/options.js on lines 239..247
src/options.js on lines 262..270

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

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 adjustCSS has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function adjustCSS( elem, prop, valueParts, tween ) {
    var adjusted,
        scale = 1,
        maxIterations = 20,
        currentValue = tween ?
Severity: Minor
Found in lib/jquery-3.2.1.js - About 1 hr to fix

Function activate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Tab.prototype.activate = function (element, container, callback) {
    var $active    = container.find('> .active')
    var transition = callback
      && $.support.transition
      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
Severity: Minor
Found in lib/bootstrap.js - About 1 hr to fix

Function oninit has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    oninit: function() {
      const config = new Config(localStorage);

      this.gitlab_path = config.gitlabPath;
      this.api_path = config.apiPath;
Severity: Minor
Found in src/trigger_init.js - About 1 hr to fix

Function dispatch has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    dispatch: function( nativeEvent ) {

        // Make a writable jQuery.Event from the native event object
        var event = jQuery.event.fix( nativeEvent );

Severity: Minor
Found in lib/jquery-3.2.1.js - About 1 hr to fix
Severity
Category
Status
Source
Language