-
Notifications
You must be signed in to change notification settings - Fork 25
Analyzer
This pre-installed plugin is designed to run static analysis on a project. It currently only supports a line by line string matching of various targets.
It is possible to define a special config in the project root (.roku_builder_analyze.json) to define any third party libraries that will skipped by default. You can see an example config in the roku_builder files.
If there are warnings that you wish to ignore then you can add a comment on that line that contains 'ignore-warning' and the line will not be checked.
There are three main checks that are performed. The first is the manifest analysis. The check will test each key-value pair in the manifest. It test that there are no null or repeat keys. It can also check several validations for specific keys. Including type, non-negative, equals, not equals, and starts with.
The second check is the Roku Ad Framework integration check. This will ensure that all three parts of the RAF integration are present (manifest value, library include, and client initialization).
The last check is a line check. This will check each line of brightscript code for a number of tests. It tests for deprecated objects, stop commands, various roku scene graph components, and potential performance improvements.
Requires Device and Source
This command will stage your channel to a temporary file and run some basic static analysis on it. It will run all of the checks that the Roku static analysis tool runs as well as some additional performance improvement checks.
$ roku --analyze --stage production
This option will cause the analyze command to be run on the libraries defined in the config file as well as the rest of the project.
$roku --analyze --include-libraries --stage production