onlyurei/knockout-spa

View on GitHub
widget/form/form-input-location.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function constructor has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor: function (
      name, value, required, validations, useCurrentPosition, submitOnChange, initFromQueryString, autocomplete) {
      FormInputLocation.$super.call(this, name, value, required, validations, submitOnChange, initFromQueryString);

      this.currentPosition = ko.observable(null);
Severity: Major
Found in widget/form/form-input-location.js - About 2 hrs to fix

    Function getCurrentPosition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getCurrentPosition: function (successCallback, errCallback) {
          if (this.geolocationAvailable) {
            this.gettingCurrentPosition(true);
            this.currentPosition(null);
            navigator.geolocation.getCurrentPosition(
    Severity: Minor
    Found in widget/form/form-input-location.js - About 1 hr to fix

      Function constructor has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            name, value, required, validations, useCurrentPosition, submitOnChange, initFromQueryString, autocomplete) {
      Severity: Major
      Found in widget/form/form-input-location.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status