![]() ![]() Node.js Node.js is an asynchronous event-driven JavaScript runtime and is the most effective when building scalable network applications. ![]() In this blog post, we will cover general clean coding principles for naming and using variables & functions, as well as some JavaScript specific clean coding best practices. ![]() But if the code isn’t clean, it can bring a development organization to its knees.” - Robert C. Install it from here: github.Writing clean code is what you must know and do in order to call yourself a professional developer. There is no reasonable excuse for doing anything less than your best. New reviewer that checks for size of function argument names If the developer feels the need to use these words in a comment block, it’s most of the time a sign that the code he’s trying to explain does more than one thing. It does this reading comments and checking occurrences of “if”, “but”, “or”, “and”. New review that tries to check if a file has more than one responsibilities. This reviewer tries to report useless stuff like: New reviewer that checks for similarities between comment lines that immediately precede code lines. New reviewer that checks for variable length based on their “scope” (if a variable is used only on 2 consecutive lines, it might be OK for it to have a very short name (var i type of things)) Thanks for Sublime and the plugin API, and tell me what you think! This will open a panel with the list of info, warning and error messages, as well as highlight the corresponding lines in the code.īy the way, I wasn’t able to find an API that allowed me to add tooltips to the regions and/or info bubbles in the line number gutter. Since I just discovered Sublime Text 2 (AMAZING by the way), I thought I would write a plugin for cleanjs as well.Īfter install, press ctrl+shift+c to start the review of any currently opened JS file. The tool was originally designed to be run from the command line using python, and since about a week also online at Indeed, it checks for variables and functions size and naming, complexity, number of lines of code, formatting, comments, syntax, etc … There are still many things I want to review, but it’s a start I was working recently on cleanjs, a python tool that performs code style reviews on javascript code.Ĭleanjs is very much code quality oriented. Get it from here: /captainbrosset/cleanjs (with package control) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |