public static void processCommandLine ( TextUICommandLine commandLine , String [ ] argv , IFindBugsEngine findBugs ) throws IOException , FilterException { // Expand option files in command line. // An argument beginning with "@" is treated as specifying // the name of an option file. // Each line of option files are treated as a single argument. // Blank lines and comment lines (beginning with "#") // are ignored. try { argv = commandLine . expandOptionFiles ( argv , true , true ) ; } catch ( HelpRequestedException e ) { showHelp ( commandLine ) ; } int argCount = 0 ; try { argCount = commandLine . parse ( argv ) ; } catch ( IllegalArgumentException e ) { LOG . severe ( e . getMessage ( ) ) ; showHelp ( commandLine ) ; } catch ( HelpRequestedException e ) { showHelp ( commandLine ) ; } Project project = commandLine . getProject ( ) ; for ( int i = argCount ; i < argv . length ; ++ i ) { project . addFile ( argv [ i ] ) ; } commandLine . handleXArgs ( ) ; commandLine . configureEngine ( findBugs ) ; if ( commandLine . getProject ( ) . getFileCount ( ) == 0 && ! commandLine . justPrintConfiguration ( ) && ! commandLine . justPrintVersion ( ) ) { LOG . warning ( "No files to be analyzed" ) ; showHelp ( commandLine ) ; } }
Process the command line .