Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents |
---|
How to Set Source Code Filters with Kiuwan Local Analyzer (KLA)
Table of Contents |
---|
The source code filter mechanism
If there are files and directories you do not want to analyze, you can set a filter for them. KLA has a source code filter mechanism based on Ant-style include and exclude patterns. Here are some example patterns (find more here):
Image Modified
Set source code filters
- Specify the root directory (SOURCE_DIR) where the source code files are located in Folder to analyze.
(By default, KLA
- analyzes every file in this folder).
Image Modified- Click on
- Advanced
Image Modified - A new window
- displays
Image ModifiedInclude patterns specify what subset(s) of files will be analyzed.
Exclude patterns specify what subset(s) of file will not be analyzed.
- If you want to add patterns, click
- the + button. A new window will appear:
Image Modified - If you want to remove a pattern, select it and click
- the - button.
- If you want to edit an existing pattern or copy the text, double click on it.
Image Modified
Info |
---|
Exclude patterns take precedence over include patterns. If you define the patterns below, the analysis will not process any js file:
The exclude pattern defines: exclude all .js files in any directory and with any name. Therefore, the include pattern has no effect. |
The table below explains how the whole mechanism works and what fileset will be analyzed by Kiuwan:
Include pattern |
---|
NO | YES | ||
Exclude pattern | NO | The whole SOURCE_DIR will be analyzed | Only the resulting fileset after inclusion of matched files will be analyzed |
YES | Only the resulting fileset after exclusion of matched files will be analyzed | First, the exclusion pattern reduces the SOURCE_DIR Second, over the above fileset, only those files |
matching the include pattern will be processed |