Audit Application Code
Use the Audits pane to check and verify your application's code as you develop it.
When you open application artifacts, VB Studio automatically scans its code and displays errors and warnings (if any) in the Audits pane. You can view details of each issue and take action to resolve it. In addition to JET component errors, the Audits pane displays syntax errors, translation issues, and warnings for missing dependencies.
If an artifact contains errors, it is also badged in the Navigator to indicate that action must be taken to resolve the issue. For example, page errors are indicated by a red dot on the Web Applications icon in the Navigator toolbar as well as against the particular artifact in the Web Apps pane. The badge persists until the error is fixed or until the session ends.
Here's how you can audit your application's code:
Edit Audit Rules
The Audits feature in the Designer includes built-in rules from the Oracle JET Audit Framework (JAF) by referencing the rule pack and the JAF utility (ojaf) hosted on the Content Delivery Network (CDN) at https://static.oracle.com/cdn/jet/
.
Every JET release includes the JAF utility and JAF metadata, plus the JAF metadata for previous releases of JET. You can configure the built-in JAF rules to include disabled rules. Custom JAF configurations that deal with the file system, custom rule plug-ins, and so on will not be evaluated because JAF does not execute on the VB Studio backend; it runs on the client.
- In the Audits pane, click Menu (
) and select Edit Settings.
- Edit the
audit.json
file in the Source editor, for example, here's the syntax to reference JAF from the CDN and enable a disabled built-in rule:{ "paths": { "exclude": [ "build/**", "docs/**", "scripts/**", "tests/**", "**/private", "+webApps/**/resources/components/**/lib/*" ] }, "rules": {}, "auditors": { "jaf": { "cdnPath": "https://static.oracle.com/cdn/jet/", "version": "9.0.0", "jafOptions": { "ruleMods": { "JET": { "oj-css-style-override": { "enabled": true } } } } } } }
To revert the built-in rules to their default settings, click Reset Settings in the Menu ().
For more information about JAF, including the built-in rules that it includes, see About Auditing Oracle JET Applications in Using and Extending the Oracle JET Audit Framework.