function main( context ) {
	var source = context.getSourceCode();

	/**
	* Reports the error message.
	*
	* @private
	* @param {string} msg - message to report
	* @param {Object} loc - lines of code (object with `start` and `end` properties)
	*/
	function report( msg, loc ) {
		context.report({
			'node': null,
			'message': msg,
			'loc': loc
		});
	}

	/**
	* Checks section header comments.
	*
	* @private
	*/
	function validate() {
		var comments;
		var current;
		var i;

		comments = source.getAllComments();
		for ( i = 0; i < comments.length; i++ ) {
			current = comments[ i ];
			if ( isSectionHeader( current ) ) {
				validateHeader( current );
			}
		}
	}

	/**
	* Checks whether a section header comment is properly formatted.
	*
	* @private
	* @param {string} comment - literal value of comment
	* @returns {void}
	*/
	function validateHeader( comment ) {
		var val = comment.value;

		if ( isUppercase( val ) ) {
			if ( endsWith( val, '//' ) ) {
				if ( val[ 0 ] !== ' ' || val[ val.length-3 ] !== ' ' ) {
					return report( 'Header title must be padded by exactly one space after and before comment slashes', comment.loc );
				}
				val = val.substring( 1, val.length-3 );
				if ( contains( val, ' ' ) ) {
					return report( 'Header title must be padded by exactly one space after and before comment slashes and should not contain any other spaces', comment.loc );
				}
				if ( !contains( HEADERS, val ) ) {
					report( 'Invalid header comment type (must be any one of '+HEADERS.join( ', ' )+'). Value: "'+val+'"', comment.loc );
				}
			} else {
				report( 'Header comment must end with two trailing slashes', comment.loc );
			}
		} else {
			report( 'Header comment must be in capital letters', comment.loc );
		}
	}

	return {
		'Program': validate
	};
}
Rule for validating that section header comments are properly formatted.

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