Subscribe

New open source linting tool from Microsoft

By Marilyn de Villiers
Johannesburg, 06 Dec 2017

Linting is the process of running a program that will analyse code for potential errors.

Ant'on Molleda, senior program manager of Microsoft Edge, described the new tool, called sonar, as "the next evolution of the static scan tool".

"Web development is more than HTML, JavaScript, and CSS: developers are expected to have a grasp of accessibility, performance, security, emerging standards, and more, all while refreshing this knowledge every few months as the Web evolves," Molleda said.

According to Molleda, sonar brings many improvements compared to previous scanners: execution of Web site code instead of static analysis, a more flexible and modernised set of rules, parallel test execution, integration with other services, and - because Microsoft believes the Web "belongs to everyone" - has a completely open source code base.

In addition, sonar can be used as a command line tool (CLI) that you can integrate directly into local Web development workflows.

Apart from being fully open source, Microsoft "wanted to go even further and make it easier for the Web community to get involved, and remove any possible doubt that this project has the community's best interest in mind," he said. For that reason, Microsoft has donated the project to the JS Foundation whose mission is to drive broad adoption and ongoing development of key JavaScript solutions and related technologies.

Sonar represents an update to Microsoft's modern.IE scanner used to detect optimisations for old versions of Internet Explorer, outdated libraries, and missing prefixes.

Microsoft created a set of guiding principles for sonar before creating the tool. These include being easy to use, configure, and expand, and putting the user at the centre - sonar not only tells developers when it spots an error, it also tells them why.

"It is important to know the reason for an issue so that developers can decide if that really applies to their work," Molleda said. "The requirements from Web site to Web site can change a lot - for example, an intranet Web site and an online shopping experience will have vastly different needs."

Sonar, which integrates with aXe, Core, AMP Core, AMP validator, synk.io, SSL Labs and Cloudinary, is now available as an open source online service, deployed on top of Azure using Docker containers that can scan any publicly available Web site.

Future releases will include features such as a plug-in for Visual Studio Code, configuration options for sonar, and new rules for areas such as performance, accessibility, security, and Progressive Web Apps.

Share