---
title: "#코드 자동-포매터 - 린터 문법 구문 오류 검사 - apheleia"
url: "https://notes.junghanacs.com/notes/20230525T175300"
author: "Junghan Kim"
date: "2023-05-25T17:53:00+09:00"
lastmod: "2024-12-01T06:30:00+09:00"
tags: ["code","linter"]
description: "코드 포매터와 린터의 역할을 구분하며 Apheleia를 개발 흐름 속에 어떻게 배치할지 살핀 자료."
---

> [!abstract] 이 노트에 대하여
> 
> 코드 포매터와 린터, 구문 오류 검사의 역할을 나누어 보며 Apheleia를 개발 흐름 속에 배치한다. 자동 정리와 정적 분석을 헷갈리지 않고 쓰기 위한 기준을 세우려는 자료이다.

## BIBLIOGRAPHY

## 관련노트

-   [#이맥스통합개발환경: #클로저 #리스프](https://notes.junghanacs.com/notes/20240117T121614)

## Lint (software)

Lint is the computer science term for 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. A program which performs this function is also known as a "linter".

린트는 프로그래밍 오류, 버그, 문체 오류 및 의심스러운 구성을 표시하는 데 사용되는 정적 코드 분석 도구를 뜻하는 컴퓨터 과학 용어입니다. 이 용어는 C 언어 소스 코드를 검사하는 유닉스 유틸리티에서 유래했습니다. 이 기능을 수행하는 프로그램을 "린터"라고도 합니다.

## `format-all`

[2023-09-16 Sat 07:46] [GitHub - lassik/emacs-format-all-the-code: Auto-format source code in many la...](https://github.com/lassik/emacs-format-all-the-code)

Lets you auto-format source code in many languages using the same command for all languages, instead of learning a different Emacs package and formatting command for each language. Just do M-x format-all-region-or-buffer and it will try its best to do the right thing. To auto-format code on save, use the minor mode format-all-mode. Please see the documentation for that function for instructions.

각 언어마다 다른 Emacs 패키지와 서식 지정 명령을 배우는 대신 모든 언어에 대해 동일한 명령을 사용하여 여러 언어로 된 소스 코드를 자동으로 서식 지정할 수 있습니다. M-x format-all-region-or-buffer 를 실행하기만 하면 올바른 작업을 수행하기 위해 최선을 다할 것입니다. 저장 시 코드 서식을 자동으로 지정하려면 부 모드 format-all-mode 를 사용하세요. 자세한 내용은 해당 기능의 설명서를 참조하세요.

언어별로 설정 가능.

-   Clojure/ClojureScript (zprint, node-cljfmt) --&gt; 제외하라!
-   Markdown (prettier, prettierd, deno)
-   ...

## Prettier

<https://prettier.io/docs/en/install>

```text
npm install -g prettier
```

## In Spacemacs

아주 포멧팅에 애먹는다. vscode 를 보면 prettier 를 기본 포멧터로 사용 하여 개발을 많이 한다. 이거 이맥스에도 있는 건데 확인해보자.

|             |                                   |
|-------------|-----------------------------------|
| `SPC m = =` | format buffer in supported layers |

<https://github.com/jscheid/prettier.el>
