function main( context ) {
	var functionHash;
	var source;

	source = context.getSourceCode();
	functionHash = {};

	/**
	* Reports the error message.
	*
	* @private
	* @param {ASTNode} node - node to report
	* @param {string} msg - message to report
	*/
	function report( node ) {
		var name = node.id.name;
		context.report({
			'node': node,
			'message': '`'+name+'` is missing a @private annotation'
		});
	}

	/**
	* Registers a function.
	*
	* @private
	* @param {ASTNode} node - node to report
	*/
	function registerFunction( node ) {
		var name = node.id.name;
		if ( name ) {
			if ( !hasOwnProp( functionHash, name ) ) {
				functionHash[ name ] = {
					'node': node,
					'private': true
				};
			}
		}
	}

	/**
	* Registers that a known function has been assigned to a variable.
	*
	* @private
	* @param {ASTNode} node - node to report
	*/
	function registerAssignment( node ) {
		if (
			node.right.type === 'Identifier' &&
			hasOwnProp( functionHash, node.right.name )
		) {
			functionHash[ node.right.name ].private = false;
		}
	}

	/**
	* Registers that a known function has been assigned as a property.
	*
	* @private
	* @param {ASTNode} node - node to report
	*/
	function registerPropertyAssignment( node ) {
		if (
			node.value.type === 'Identifier' &&
			hasOwnProp( functionHash, node.value.name )
		) {
			functionHash[ node.value.name ].private = false;
		}
	}

	/**
	* Checks whether the JSDoc comment for a given node contains a `@private` tag.
	*
	* @private
	* @param {ASTNode} node - node to report
	* @returns {boolean} boolean indicating whether JSDoc comment contains a `private` tag
	*/
	function findPrivateAnnotation( node ) {
		var jsdoc;
		var tags;
		var ast;
		var i;

		jsdoc = findJSDoc( source, node );
		if ( isObject( jsdoc ) ) {
			ast = parseJSDoc( jsdoc.value, DOPTS );
			tags = ast.tags;
			for ( i = 0; i < tags.length; i++ ) {
				if ( tags[ i ].title === 'private' ) {
					return true;
				}
			}
		}
		return false;
	}

	/**
	* Reports any encountered issues and resets the function hash.
	*
	* @private
	*/
	function finish() {
		var fcn;
		var key;
		for ( key in functionHash ) {
			if ( hasOwnProp( functionHash, key ) ) {
				fcn = functionHash[ key ];
				if ( fcn.private === true ) {
					if ( !findPrivateAnnotation( fcn.node ) ) {
						report( fcn.node );
					}
				}
			}
		}
	}

	return {
		'Program:exit': finish,
		'FunctionDeclaration': registerFunction,
		'AssignmentExpression': registerAssignment,
		'Property': registerPropertyAssignment
	};
}
Rule for validating that unassigned function declarations have a `@private` tag.

@param {Object} context - ESLint context
@returns {Object} validators