Showing 13 of 33 total issues
File uistate.js
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
msc {
hscale="1.2";
html [label="index.html", textbgcolor="#ddf"]
Function _setupEvents
has 47 lines of code (exceeds 30 allowed). Consider refactoring. Open
function _setupEvents () {
window.__btn_anim_home.addEventListener('click',
function () {
home()
gaga.g('send', 'event', 'anim_home', 'button')
Function render
has 39 lines of code (exceeds 30 allowed). Consider refactoring. Open
function render (pSource, pLanguage) {
preRenderReset()
try {
var lAST = getASTBare(pSource, pLanguage)
if (state.getDebug()) {
Function save
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function save (pState, pSourceToo) {
var lSourceToo = typeof pSourceToo === 'undefined' ? true : pSourceToo
var lState = {
autorender: pState.getAutoRender(),
mirrorEntities: pState.getMirrorEntities(),
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function load (pState, pSourceToo) {
var lState = getState()
var lSourceToo = typeof pSourceToo === 'undefined' ? true : pSourceToo
if (lState) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function g
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
g: function (pCommand, pEvent, pCategory, pAction, pLabel, pValue) {
Function _g
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _g (pCommand, pEvent, pCategory, pAction, pLabel, pValue) {
Function processParams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function processParams () {
var lParams = queryString.parse(window.location.search)
setupGA(maps.sanitizeBooleanesque(lParams.donottrack))
uistate.setDebug(maps.sanitizeBooleanesque(lParams.debug))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function toLocationString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
toLocationString: function (pLocation, pSource, pLanguage, pMirrorEntities, pNamedStyle) {
Function sourceIsURLable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function sourceIsURLable (pLocation, pSource, pLanguage, pMirrorEntities, pNamedStyle) {
Function source2LocationString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function source2LocationString (pLocation, pSource, pLanguage, pMirrorEntities, pNamedStyle) {
Function ajax
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
ajax: function (pURL, pSuccessFunction, pErrorFunction) {
var lHttpRequest = new XMLHttpRequest()
lHttpRequest.onreadystatechange = function (pEvent) {
if (pEvent.target.readyState === XMLHttpRequest.DONE) {
if (lHttpRequest.status === 200) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function render (pSource, pLanguage) {
preRenderReset()
try {
var lAST = getASTBare(pSource, pLanguage)
if (state.getDebug()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"