요약
린트(lint) 또는 린터(linter) 라고 불리는 Tool은
다양한 프로그래밍 언어에서 source code를 분석하여
- 프로그램밍 오류,
- 버그,
- 스타일 오류 또는 불일치,
- 잠재적인 문제점(issue)
등을 식별하고 표시(flag)를 달아놓는 tool (or software)임.
이름의 유래

Lint 는 보풀 이라는 뜻으로 건조기의 보풀 제거장치처럼, 문제가 될 소지가 있는 코드를 걸러낸다는 의미에서 이름이 지어짐.
Lint는 1978년 bell lab에서 C언어의 소스코드를 검사하는 UNIX Utility로 개발됨.
Linter는 source code (이후 code) 검사를 자동화하여,
- 코드의 가독성과 유지보수성을 향상시키며,
- 개발 초기 단계에서 문제를 발견하고 이를 해결하도록 도와주어
- 개발 시간과 비용을 절감하는데 효과적임.
Pylint - Python에서 사용되는 Linter
Python의 경우, pylint 와 pyflkes, flake8 과 같은 여러 linter tools가 존재함.
code style를 체크해주는 pep8 도 있으나
linter라고 보기엔 조금 기능이 약함.
Pylint - code analysis for Python | www.pylint.org
Fully customizable Modify your pylintrc to customize which errors or conventions are important to you. The big advantage with Pylint is that it is highly configurable, customizable, and you can easily write a small plugin to add a personal feature. More ab
www.pylint.org
https://pypi.org/project/pyflakes/
pyflakes
passive checker of Python programs
pypi.org
조금 더 구체적으로 pylint로 한정하여 살펴보면 다음과 같은 기능을 제공함.
- source code 오류 검사: 정의되지 않은 variable 사용이나, function 호출 오류 등의 기본적인 프로그래밍 오류(=실수)를 찾아냄.
- style guide check: PEP8 과 같은 Python 스타일 가이드를 따르는지 검사하여 code 의 일관성과 가독성을 높임.
- code complexity check: 지나치게 복잡한 function 또는 module을 식별하여 좀 더 간단하고 효율적인 구현 방법을 제시.
- refactoring 제안: code structure를 개선할 수 있는 방법을 제안하여 보다 나은 code design을 유도.
대부분의 Python 개발 환경에서는
- linter를 IDE나 code editor와 연동하여
- coding 중에 code analysis를 수행하고
- 자동 수정 제안과 같은 feedback을 실시간으로 제공하여 개발 효율성을 극대화함.
같이보면 좋은 자료들
2024.02.05 - [개발환경] - [vscode] vscode 설치하기 (on Windows) + extensions
[vscode] vscode 설치하기 (on Windows) + extensions
0. 시작하기 앞서서0.0 vscode와 visual studio 비교.https://ds31x.blogspot.com/2023/07/env-visual-studio-code-and-visual-studio.html?view=classic [Env] Visual Studio Code and Visual StudioVisual Studio Code (vscode)는 IDE임을 강조하는 Visual
ds31x.tistory.com
'개발환경' 카테고리의 다른 글
| [vscode] 기초 사용법과 단축키 (0) | 2024.03.11 |
|---|---|
| [vscode] vscode 설치하기 (on Windows) + extensions (1) | 2024.02.05 |
| [vscode] neovim extension : vscode에서 vi 로 편집하기. (1) | 2024.01.01 |
| [vscode] Markdown+Math : vscode의 markdown에서 LaTeX수식 보기. (2) | 2024.01.01 |
| [vscode] Markdown All in One : vscode를 markdown editor로. (0) | 2024.01.01 |