Executing Code Search Searches

Code Search is project related. It executes a search over all verified files in the project. All categories, criteria, and lists with results are global options for all repository projects displaying the results for the current search. After completing the search, the result is saved in the List view. The last executed search can be used as a starting point for the next search and can be accumulated with the new one by checking Accumulate Search Results in the Search dialog box. Otherwise the previous content from the list will be lost.

Use a Code Search to generate Code Search lists. You can modify the predefined search criteria or create your own criteria as needed. You can use a construct list itself to narrow the search. To select a list:

  1. In the Interactive Analysis dialog box, if the Code Search pane is not visible then click View > Code Search. This displays the Code Search pane.
  2. Click Advanced Search on the tool bar menu. This opens the Search dialog box.
  3. In the Search In list, select:
    • All Sources to execute the search against all the sources of the specified type in the project.
    • A list if you want to execute the search only against sources of the specified type with non-zero counts in the selected list. If you select Rule Finder.File Writes, for example, the search will be executed against sources of the specified type with non-zero counts in the File Writes list in the Rule Finder folder.
  4. Choose the criterion to use in the search from the list in the Criterion pane. Modify the predefined criteria or create your own criteria as required.
  5. Select Accumulate Search Results if you want the results of the search to be added to the results of the previous search. Otherwise, the new results will overwrite the previous results.
  6. Click:
    • Find All Constructs if you want Interactive Analysis to create, for each searched file, a list of all the constructs found by the search.
    • List Sources Only if you want Interactive Analysis to indicate, for each searched file (with the notation >0), whether the construct of interest exists in the file.
    Interactive Analysis displays a dialog box with the results of the search operation. Click OK to continue. The Search dialog box is closed and the results of the search are displayed in the List view.