Formatting - CI/CD用語集の定義
Formatting は一貫したコードスタイルを自動適用し、問題を報告するだけでなくコードを書き換えます。
Formatting とは、ツールによって一貫したコードスタイル(インデント、スペース、改行)を自動的に適用することです。linting とは異なり、formatter は問題を報告するだけでなくコードを書き換えます。
check モードと write モード
CI では formatter は check モードで実行され、未整形のコードがあれば build を失敗させます。pre-commit hook では write モードで実行され、commit される前にファイルを修正します。
関連ガイド
Linting - CI/CD Glossary DefinitionLinting: Linting is automated static checking that flags programming errors, bugs, stylistic issues, and susp…
Pre-Commit Hook - CI/CD Glossary DefinitionPre-Commit Hook: A pre-commit hook is a script Git runs before a commit is recorded. It can lint, format, or…
Git Hook - CI/CD Glossary DefinitionGit Hook: A Git hook is a script Git runs automatically at points in its workflow, such as before a commit, b…