adobe/brackets

View on GitHub
src/extensions/default/PrefsCodeHints/main.js

Summary

Maintainability
C
1 day
Test Coverage

Function getHints has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    PrefsCodeHints.prototype.getHints = function (implicitChar) {
        var hints = [], ctxInfo, query, keys, values, option = {type: null, description: null, values: null};

        ctxInfo = this.ctxInfo = JSONUtils.getContextInfo(this.editor, this.editor.getCursorPos(), true);

Severity: Major
Found in src/extensions/default/PrefsCodeHints/main.js - About 2 hrs to fix

    File main.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2015 - present Adobe Systems Incorporated. All rights reserved.
     *
     * Permission is hereby granted, free of charge, to any person obtaining a
     * copy of this software and associated documentation files (the "Software"),
    Severity: Minor
    Found in src/extensions/default/PrefsCodeHints/main.js - About 2 hrs to fix

      Function insertHint has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          PrefsCodeHints.prototype.insertHint = function (completion) {
              var ctxInfo = JSONUtils.getContextInfo(this.editor, this.editor.getCursorPos(), false, true),
                  pos     = this.editor.getCursorPos(),
                  start   = {line: -1, ch: -1},
                  end     = {line: -1, ch: -1},
      Severity: Major
      Found in src/extensions/default/PrefsCodeHints/main.js - About 2 hrs to fix

        Function formatHints has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function formatHints(hints, query) {
        
                var hasMetadata = hints.some(function (token) {
                    return token.type || token.description;
                });
        Severity: Minor
        Found in src/extensions/default/PrefsCodeHints/main.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status