A freelancing blogs and e-books writer who keeps you up with the trending technologies and user guides. A blogger who is currently a post-graduate living in United Kingdom and trying to make her niche as a Data Scientist. Before taking a deep dive into the "Data-World", she got a Bachelor's Technology degree in Computer Science and has always dreamed of writing as a kid which inspired her to write wonderful content with the right amount of technical terms to make it easy for the beginners and as well full-fledged developers to grasp a hold onto the computer technologies.
ROKU Developers introduced “Static Analysis Tool” which scan’s a channel’s source code for common ROKU development errors. ROKU development team introduces a standalone version of the feature. This simple tool helps developers to regularly analyze their channel during the process of development and identify channel certification violations before submitting a channel for publication.
In this article, we have discussed the static analysis tool and command line utility of ROKU in detail.
The channel’s publishing flow includes the “Static Analysis Tool”. ROKU Developers developed this to analyze the channel’s BrightScript source code and detect common issues without having to submit for certification. The ARM developers work with the information they need to optimize their channels and ensure the channel passes certification quickly.
Additionally, the ROKU Developers updated the UI of the Static Analysis Tool’s results within the “Developer Dashboard”. The output is now categorized according to the severity and nature of the issues, making results easier to interpret and act upon. ARM developers can also export the output as a JSON file for their own analysis or record keeping.
So, let us further understand for more clarity on ROKU’s static analysis and command line utility.
The ARM developer can access the “Static Analysis Tool” from the “Developer Dashboard”.
Clicking on the “Refresh” button will check whether the analysis results are ready and if yes, will render them.
Alternatively, the developer can wait for a notification email sent by the service to the email address associated with their developer account. The sent email will contain a link to the results of the Static Analysis for the channel. The results are available for download as a plain text JSON file as well.
The ROKU Development team specifies some tests that Static Analysis performs on the channel package. These may be expanded over time.
Read Also :-A Complete Guide To Roku’s New IDK
This utility performs BrightScript code static analysis. It provides information about common channel issues and checks for compliance with a variety of channel certification requirements, deprecated components and API usage etc.
This utility supports Windows, Linux, MAC operating system and Java installation is required.
Structure of The Utility
The Static Analysis Utility is distributed as a ZIP file.
Tool Usage from Command Line
Unzip the sca-cmd.zip file to your computer. Note that the usage examples below assume usage on Linux or Mac. There is a corresponding Windows .bat file for Windows users.
Severity level choice
You can specify analysis results output verbosity level using –severity command line parameter. This parameter is optional. The shorthand version -s can be used instead of –severity.
Available SEVERITY_LEVEL values are: info, warning and error :
If the severity level is not specified, warning is used.
You can filter output logs by categories using –filter-categories command line parameter. Short version is -c. This parameter is optional.
List of categories:
If categories are not specified output logs are not filtered.
Output format choice
You can generate a local report file by specifying the file path in –output and file format in –format command line parameters. Destination folder for report file should be a directory that already exists in your file system. It is possible to use short versions -o and -f instead of –output and –format accordingly.
Supported format values are: console and junit:
If the format is not specified console is used. If specified any file format but not specified output file path a default file path value is used. For junit, this is reports/SCA_Report.xml. For json, this is reports/SCA_Report.json.
We hope you will find this article helpful as it will help you in understanding some impeccable facts about ROKU’s static analysis tool and it’s command line utility in an outstanding way. For more information or software solutions related to ROKU, contact 4 Way Technologies to get the most robust and feature-rich IT solutions.