codeforamerica/ohana-web-search

View on GitHub

Showing 9 of 2,141 total issues

Function FeedbackForm has a Cognitive Complexity of 16 (exceeds 6 allowed). Consider refactoring.
Open

function FeedbackForm() {
var _instance = this;
 
// The events this instance broadcasts.
var _events = {
Severity: Minor
Found in app/javascript/app/FeedbackForm.js - About 1 hr to fix

Function DefaultPopup has a Cognitive Complexity of 14 (exceeds 6 allowed). Consider refactoring.
Open

function DefaultPopup() {
var _instance = this;
 
// The events this instance broadcasts.
var _events = {
Severity: Minor
Found in app/javascript/app/popup/DefaultPopup.js - About 1 hr to fix

Function _checkIfFloating has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring.
Open

function _checkIfFloating() {
var c;
if (window.scrollY >= _offsetY) {
// Make the header float.
_header.classList.add('floating');
Severity: Minor
Found in app/javascript/app/search/header.js - About 1 hr to fix

Function EventObserver has a Cognitive Complexity of 11 (exceeds 6 allowed). Consider refactoring.
Open

function EventObserver() {
 
// The events registered on this instance.
var _events = {};
 
 
Severity: Minor
Found in app/javascript/app/util/EventObserver.js - About 1 hr to fix

Function CharacterLimited has a Cognitive Complexity of 8 (exceeds 6 allowed). Consider refactoring.
Open

function CharacterLimited(elm, defaults) {
 
// The full, unlimited text.
var _fulltext;
 
 
Severity: Minor
Found in app/javascript/app/detail/character-limited/CharacterLimited.js - About 35 mins to fix

Function getOffset has a Cognitive Complexity of 8 (exceeds 6 allowed). Consider refactoring.
Open

function getOffset(element) {
var body = document.body,
win = document.defaultView,
docElem = document.documentElement,
box = document.createElement('div');
Severity: Minor
Found in app/javascript/app/util/util.js - About 35 mins to fix

Function TextInput has a Cognitive Complexity of 8 (exceeds 6 allowed). Consider refactoring.
Open

function TextInput(id) {
var _instance = this;
 
// The events this instance broadcasts.
var _events = { CHANGE: 'change' };
Severity: Minor
Found in app/javascript/app/search/filter/TextInput.js - About 35 mins to fix

Function updateInfoBoxState has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring.
Open

function updateInfoBoxState(overMarker, delay) {
// Clear any transitions in progress.
if (_infoBoxDelay) clearTimeout(_infoBoxDelay);
 
// If delay is not set use the default delay value.
Severity: Minor
Found in app/javascript/app/util/map/google/infobox-manager.js - About 25 mins to fix

Function getWindowRect has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring.
Open

function getWindowRect() {
var myWidth = 0, myHeight = 0;
if ( typeof( window.innerWidth ) === 'number' ) {
//Non-IE
myWidth = window.innerWidth;
Severity: Minor
Found in app/javascript/app/util/util.js - About 25 mins to fix
Severity
Category
Status
Source
Language