Define Code File Attributes

 

CodeMRI® Sys Admin Training Videos:

Define Code File Attributes

A common command in CodeMRI® is to attach file attributes to particular files that are being scanned. A few of the attributes that can be attached, we can flag a file as being test code. We can flag a file as being a third-party file, or we can just tag a file as being excluded, meaning it gets excluded from the metrics that are generated.

Uh, these commands are all relatively similar. To execute these commands, you would first select the system where the file resides, and then if you wanted to tag it as either test code or third party. You would enter our system, file-property add-n, and then either FP_test or fp_ThirdParty, depending upon what you're doing, and then a -v true, and then a -e.

The E is for expression, and the expression is the relative path to the directory where the files live that you want tagged. This does it on a directory basis, which is pretty common. Test codes usually all gonna live in a directory of its own as well as third-party plugins. And as I said, this is a relative path, so it doesn't start with a slash, and it starts after wherever the system directory is that was defined when the system was created in the vault. You tag a directory is excluded. It's similar. You select the project and the system, and then you type in system files, -exclusion, add, and then there's no need for a -N or -V, and we go straight to -E. And then again, we give it a relative path through the directory. In all of these, we can use wild cards, so when you enter the relative path, you can end it with a / and then a *, and that tells it to include everything in the directory.