adobe/brackets

View on GitHub
src/widgets/Dialogs.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function showModalDialogUsingTemplate has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function showModalDialogUsingTemplate(template, autoDismiss) {
        if (autoDismiss === undefined) {
            autoDismiss = true;
        }

Severity: Major
Found in src/widgets/Dialogs.js - About 2 hrs to fix

    Function _keydownHook has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var _keydownHook = function (e, autoDismiss) {
            var $primaryBtn     = this.find(".primary"),
                buttonId        = null,
                which           = String.fromCharCode(e.which),
                $focusedElement = this.find(".dialog-button:focus, a:focus");
    Severity: Minor
    Found in src/widgets/Dialogs.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                      if (_hasButton(this, DIALOG_BTN_DONTSAVE)) {
                          buttonId = DIALOG_BTN_DONTSAVE;
                      }
      Severity: Major
      Found in src/widgets/Dialogs.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        if (_hasButton(this, DIALOG_BTN_DONTSAVE)) {
                            buttonId = DIALOG_BTN_DONTSAVE;
                        }
        Severity: Major
        Found in src/widgets/Dialogs.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      } else if (e.metaKey && (e.which === KeyEvent.DOM_VK_PERIOD)) {
                          buttonId = DIALOG_BTN_CANCEL;
                      }
          Severity: Major
          Found in src/widgets/Dialogs.js - About 45 mins to fix

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

                function showModalDialog(dlgClass, title, message, buttons, autoDismiss) {
            Severity: Minor
            Found in src/widgets/Dialogs.js - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status