code: function checkLastSegment (node) {
        if (funcInfo.shouldCheck &&
          funcInfo.codePath.currentSegments.some(isReachable)
        ) {
          context.report({
            node: node,
            loc: getLocation(node, context.getSourceCode()).loc.start,
            message: funcInfo.hasReturn
              ? 'Expected to return a value at the end of this function'
              : 'Expected to return a value in this function'
          })
        }
      }
docs: Checks whether or not the last code path segment is reachable.
  Then reports this function if the segment is reachable.
  
  If the last code path segment is reachable, there are paths which are not
  returned or thrown.
  
  @param {ASTNode} node - A node to check.
  @returns {void}