Python programming: Our new tool can help clean up your buggy code, says AWS

Amazon Web Services will automatically catch Python coding bugs and quirks - for a monthly a fee.
Written by Liam Tung, Contributing Writer

Amazon Web Services (AWS) has said that its automated code review tool, which aims to improve source code quality by detecting hard-to-find defects, now has updated support for the Python programming language.

AWS launched Python support for Amazon CodeGuru Reviewer in December and has now moved support for the language to general availability. 

As most developers and people working in data science know, Python is one of the most popular languages thanks to its gentle learning curve and the abundance of add-on packages for specific scientific computing applications, like like NumPy and SciPy.  

SEE: Virtual hiring tips for job seekers and recruiters (free PDF) (TechRepublic)

Amazon CodeGuru Reviewer uses AWS' machine-learning algorithms to find bugs during application development. The cost of code can add up, particularly when a developer who wrote the code has left an organization and current developers, who might not understand the structure of the original code, have troubles maintaining or updating the code. 

The AWS code reviewer supports code written in Python and Java – the two most popular languages among developers. 

The move to general availability means extends the coverage of CodeGuru Reviewer "to increase the number of recommendations for the existing detectors and include the new detectors that have been validated internally," the Amazon CodeGuru team said in a blogpost

With this release, AWS has added detectors for code maintainability and input validation, while improving the detector for resource leaks.  

AWS' code review tool is not the only code reviewer available. Microsoft-owned code-sharing site GitHub has lots of code and security review tools available and there are plenty of code linters in code editors, but AWS's tool for Python reviewer could be useful for developers already invested in its infrastructure. 

AWS's code maintainability detector offers metrics to illustrate code structure that could be useful for downstream testing, maintenance and refactoring. This is meant to improve the readability of code, which in turn impacts how easy it is to maintain in the future. 

SEE: What is Agile software development? Everything you need to know about delivering better code, faster

The input validation detector tackles the reliability and security of software by catching unexpected inputs.

"CodeGuru Reviewer performs careful analysis of the codebase, taking broad context into account, to determine code locations where input validation is insufficient or missing altogether," AWS notes. 

The resource leak detector targets open file descriptors, as well as leaks on connections, sessions, open sockets, and multiprocessing thread pools. 

Pricing for the AWS code review service is based on the size of repositories by lines of code. The first 100,000 lines of code costs $10 a month. Every additional 100,000 lines of code costs $30 a month.   

Editorial standards