function analyze( src ) {
	var alias;
	var opts;
	var pkgs;
	var ast;
	var out;
	var id;
	var i;

	out = [];

	opts = {
		'ecmaVersion': 6,
		'sourceType': 'module',
		'allowedReserved': 'never',
		'allowReturnOutsideFunction': true,
		'allowHashBang': true,
		'allowImportExportEverywhere': true
	};
	debug( 'AST options: %s', JSON.stringify( opts ) );

	debug( 'Generating an AST...' );
	ast = parse( src, opts );
	debug( 'Finished generating AST.' );

	debug( 'Walking AST...' );
	pkgs = walk( src, ast );
	debug( 'Finished walking AST.' );

	debug( 'Found %d namespace assignments', pkgs.length );
	if ( pkgs.length ) {
		debug( 'Namespace assignments: %s', JSON.stringify( pkgs ) );
	}
	for ( i = 0; i < pkgs.length; i++ ) {
		id = pkgs[ i ].id;
		if ( hasOwnProp( ALIASES, id ) ) {
			alias = ALIASES[ id ];
			if ( pkgs[ i ].alias !== alias ) {
				debug( 'Found a namespace alias discrepancy. Actual: %s. Expected: %s.', alias, pkgs[ i ].alias );
				out.push({
					'pkg': id,
					'expected': alias,
					'actual': pkgs[ i ].alias
				});
			}
		}
	}
	return ( out.length ) ? out : null;
}
Analyzes a namespace for alias discrepancies.

@private
@param {string} src - file contents
@returns {(ObjectArray|null)} list of alias discrepancies or `null`