-** lint : A program that checks the source code more strictly than a compiler or interpreter - linter : Something that points out the bad part of writing code that gets stuck in lint on the editor - Code formatter **: The one that automatically formats the code according to lint
In software development projects with multiple people, coding standards may be set in order to improve quality and reduce review costs by writing in a unified manner. Since it is difficult to share by considering the specification of too detailed writing style, it is better to use linter published by language developers and large companies for the part that you want to unify at least. For example, the source code can be made at least unified by simply specifying the code format before committing so that there is no linter error display, so the review cost is concentrated on the processing content rather than the writing method. be able to.
Even in small-scale development at the individual level, you can easily arrange the indentation and line breaks from different states depending on the file or method, and even if the source code inherited from others is different from your own writing method, you can format it. At a minimum, you can bring it to a state that is easy to read.
Most major languages have linter and code formatter, and IDEs and text editors have formatting features by default, and you can easily extend the formatting features, so if you haven't set it up yet, set it up. Let's try.
The following describes how to use Python's linter / formatter with atom.
$ python3 -V
Python 3.6.1
$ pip3 install pep8
$ pip3 install autopep8
apm install atom-beautify
apm install linter
apm install linter-python-pep8
Recommended Posts