Jasonette/JASONETTE-iOS

View on GitHub

Showing 198 of 403 total issues

Function checkIEEE754 has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function checkIEEE754 (buf, value, offset, ext, max, min) {
Severity: Minor
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          } else if (Object.keys(el['@']).length === 0) { // RSS
            if (!meta.link) meta.link = utils.get(el);
          }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if ((_category = utils.safeTrim(utils.get(el['@'], 'term')))) {
              meta.categories.push(_category);
            }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            } else if (Object.keys(link['@']).length === 0) { // RSS
              if (!item.link) item.link = utils.get(link);
            }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

              if (category['@'] && utils.get(category['@'], 'term')) item.categories.push(utils.get(category['@'], 'term'));
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          if (Helper.is_template(key)) {
            fun = TRANSFORM.tokenize(key);
            if (fun) {
              if (fun.name === '#include') {
                // this was handled above (before the for loop) so just ignore
Severity: Major
Found in app/Jasonette/st.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                if (full_re.test(template)) {
                  return evaluated;
                } else {
                  return template.replace(variable, '');
                }
Severity: Major
Found in app/Jasonette/st.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            } else if (Object.keys(link['@']).length === 0) { // RSS
              meta.link = utils.get(link);
            }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            else if ('category' == name && 'rss' == type){
              if ((_categoryValue = utils.safeTrim(utils.get(category)))) {
                meta.categories.push(_categoryValue);
              }
            }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            } else if ('category' == name && utils.get(category) && 'rss' == type) {
              item.categories.push(utils.get(category).trim());
            } else if ('dc:subject' == name && utils.get(category)) {
              _categories = utils.get(category).split(' ').map(function (cat){ return cat.trim(); });
              if (_categories.length) item.categories = item.categories.concat(_categories);
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          else if ('category' == name && 'rss' == type) {
            if ((_category = utils.safeTrim(utils.get(el)))) {
              meta.categories.push(_category);
            }
          }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Function doWrite has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function doWrite(stream, state, len, chunk, encoding, cb) {
Severity: Minor
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

              if (utils.get(link['@'], 'rel')) {
                if (link['@']['rel'] == 'alternate') {
                  if (!meta.link) meta.link = link['@']['href'];
                }
                else if (link['@']['rel'] == 'self') {
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

              if (category['@'] && (_categoryValue = utils.safeTrim(utils.get(category['@'], 'term')))) {
                meta.categories.push(_categoryValue);
              }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (utils.get(el['@'], 'rel')) {
              if (el['@']['rel'] == 'canonical') item.origlink = el['@']['href'];
              if (el['@']['rel'] == 'alternate' && (!el['@']['type'] || el['@']['type'] == 'text/html') && !item.link) item.link = el['@']['href'];
              if (el['@']['rel'] == 'self' && (!el['@']['type'] || el['@']['type'] == 'text/html') && !item.link) item.link = el['@']['href'];
              if (el['@']['rel'] == 'replies') item.comments = el['@']['href'];
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (utils.get(el['@'], 'term')) item.categories.push(utils.get(el['@'], 'term'));
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          } else if (Object.keys(el['@']).length === 0) { // RSS
            if (!item.link) item.link = utils.get(el);
          }
Severity: Major
Found in app/Jasonette/rss.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (item) {
              // only push when the result is not null
              // null could mean #if clauses where nothing matched => In this case instead of rendering 'null', should just skip it completely
              // Todo : Distinguish between #if arrays and ordinary arrays, and return null for ordinary arrays
              result.push(item);
Severity: Major
Found in app/Jasonette/st.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          if (fun.expression) {
            // if #include has arguments, evaluate it before attaching
            result = TRANSFORM.fillout(template[include_keys[0]], '{{' + fun.expression + '}}', true);
          } else {
            // no argument, simply attach the child
Severity: Major
Found in app/Jasonette/st.js - About 45 mins to fix

Function formatProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
Severity: Minor
Found in app/Jasonette/rss.js - About 45 mins to fix
Severity
Category
Status
Source
Language