redbrick/static-site

View on GitHub

Showing 2 of 4 total issues

Function emailNewPosts has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function emailNewPosts (callback) {
  logger.info('Sending email update(s) for any new posts...');
  readFileAsArray(mailingListFilename, (err, addresses) => {
    if (err) {
      return bail(`Unable to read file: ${mailingListFilename}`, callback);
Severity: Major
Found in lib/emailNewPosts.js - About 2 hrs to fix

Function getLatestPosts has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getLatestPosts = (options) => {
  return new Promise((resolve, reject) => {
    options.offset = options.offset || 0;
    options.limit = options.limit || 10;
    options.include = options.include || [];
Severity: Minor
Found in lib/getLatestPosts.js - About 1 hr to fix
Severity
Category
Status
Source
Language