Searching in Klocwork Static Code Analysis
Searching in Klocwork Static Code AnalysisThis article explains how to search for detected issues in Klocwork Static Code Analysis. It also provides a list of supported search keywords. First, you need to access the issue list:
The issue list appears, showing the current search query: Your view affects your search resultsThe current view affects search results. Use the *default* view to include issues of all severities, categories and modules. The Searches listThe Searches list is pre-populated with useful searches. Klocwork Static Code Analysis keeps a history of your text-search activity, so you can save your complex search queries. Any text you type in the text field is saved in the search history, but the name is grayed out in the list until you save it permanently. Unsuccessful queries and queries longer than 255 symbols are not saved. You can click the Use keywords or full-text searchesUse keywords, full-text search, or a combination. Full-text searches are applied to entity names, file paths, issue comments, issue codes, issue messages, owner names and bug IDs from a bug tracking system integrated with Klocwork Static Code Analysis. Searching, whether by keyword or full text, is not case sensitive. Tips:
Here's a list of the keywords you can use for:
If you enter an unrecognized keyword when searching for issues or creating a view, you'll see a warning.
Items you want to exclude (-)Preceding your search criteria (either keyword or text) with a minus sign indicates that you want to exclude issues by your specified criteria, for example: -code:abr -ANTLRParser This query excludes from the results all issues that have the code 'ABR' and "ANTLRParser" in the entity name, path, comment, code or owner. Klocwork does not support using the minus sign with either the comment keyword or the state keyword. Note: You can precede a keyword with a minus sign, but not a plus-sign. Example: -code:abr is permitted, but +code:abr is not. This allows you to exclude items that are an exact match. Example:-code:+NPD.UTIL
Phrase search ("")Use double quotes to indicate a phrase or expression that contains spaces or punctuation. For example: comment:"needs more research" Exact match (+)Use the plus-sign to indicate an exact match is required for your full-text search. Example: file:+htmlparser Note: You can precede a keyword with a minus sign, but not a plus-sign. Example: -code:abr is permitted, but +code:abr is not.
Clearing your search resultsTo clear your search results, clear the text field and click Search. The OR operatorThe default search behavior is to consider all keywords or text and list those issues that match all criteria. Use OR or "|" to override this behavior. This keyword is only supported for Klocwork Code Review. For example: PR2777 OR PR2778 The above query will return items related to PR2777 and PR2778. If you don't see the results that you're expecting to seeCheck the selected view. Try switching to the default view. |