Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Linting"?

Tags:

lint

gjslint

PHPLint, JSLint, and I recently came across "you can lint your JS code on the fly" while reading something about some IDE.

So, what is "linting"?

like image 243
Ashkan Kh. Nazary Avatar asked Dec 14 '11 11:12

Ashkan Kh. Nazary


People also ask

What is meant by linting?

Linting is the automated checking of your source code for programmatic and stylistic errors. This is done by using a lint tool (otherwise known as linter). A lint tool is a basic static code analyzer. The term linting originally comes from a Unix utility for C.

What does linting mean in Python?

Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or unconventional coding practices that can lead to errors.

Why is it called code linting?

The answer is: by analyzing your source code looking for problems. The term linter comes from a tool originally called “lint” that analyzed C source code. The computer scientist Stephen C. Johnson developed this utility in 1978 when he worked at Bell Labs.

What is linting in Devops?

Lint, or a linter, is a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs. The term originates from a Unix utility that examined C language source code.


2 Answers

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

See lint on wikipedia:

lint was the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely to be bugs) in C language source code. The term is now applied generically to tools that flag suspicious usage in software written in any computer language.

like image 64
Oded Avatar answered Sep 19 '22 06:09

Oded


Lint was the name of a program that would go through your C code and identify problems before you compiled, linked, and ran it. It was a static checker, much like FindBugs today for Java.

Like Google, "lint" became a verb that meant static checking your source code.

like image 23
duffymo Avatar answered Sep 20 '22 06:09

duffymo