Correl Roush
2386113895
git-svn-id: file:///srv/svn/scanner/trunk@5 a0501263-5b7a-4423-a8ba-1edf086583e7
27 lines
685 B
PHP
27 lines
685 B
PHP
<?php
|
|
class TextOutput extends OutputModule {
|
|
function write( $filename ) {
|
|
global $faults;
|
|
$output = fopen( $filename, 'w' );
|
|
if( $output === false ) {
|
|
err( "Cannot write to $filename\n" );
|
|
return false;
|
|
}
|
|
foreach( $faults as $fault ) {
|
|
$svn = serialize( $fault['svn'] );
|
|
fprintf( $output, "%s\t%d\t%s\t%d\t%s\t%d\t%s\n",
|
|
$fault['module'],
|
|
$fault['level'],
|
|
$fault['object']['file'],
|
|
$fault['object']['line'],
|
|
isset( $fault['svn']['author'] ) ? $fault['svn']['author'] : '?',
|
|
isset( $fault['svn']['revision'] ) ? $fault['svn']['revision'] : '0',
|
|
$fault['reason']
|
|
);
|
|
}
|
|
fclose( $output );
|
|
}
|
|
}
|
|
|
|
addModule( new TextOutput() );
|
|
?>
|