Technical Debt - ChoDragon9/posts GitHub Wiki
Code Climate κΈ°μ μ λΆμ± λΆμ ν¬μΈνΈ 10κ°μ§
μλ³Έ
- Argument count - Methods or functions defined with a high number of arguments
- Complex boolean logic - Boolean logic that may be hard to understand
- File length - Excessive lines of code within a single file
- Identical blocks of code - Duplicate code which is syntactically identical (but may be formatted differently)
- Method count - Classes defined with a high number of functions or methods
- Method length - Excessive lines of code within a single function or method
- Nested control flow - Deeply nested control structures like if or case
- Return statements - Functions or methods with a high number of return statements
- Similar blocks of code - Duplicate code which is not identical but shares the same structure (e.g. variable names may differ)
- Method complexity - Functions or methods that may be hard to understand
λ²μ
- μΈμ κ°―μ - λ§μ μμ μΈμλ‘ μ μλ λ©μλ λλ ν¨μ
- 볡μ‘ν λΆλ¦¬μΈ λ‘μ§ - μ΄ν΄νκΈ° νλ λΆλ¦¬μΈ λ‘μ§
- νμΌ κΈΈμ΄ - ννμΌμ κ³Όλν λΌμΈμ μ½λ
- λμΌν μ½λ λΈλ‘ - ꡬ문 μ μΌλ‘ λμΌν μ€λ³΅ μ½λ (κ·Έλ¬λ νμμ΄ λ€λ₯Ό μ μμ)
- λ©μλ μ - λ§μ μμ ν¨μ λλ λ©μλλ‘ μ μ λ ν΄λμ€
- λ©μλ κΈΈμ΄ - λ¨μΌ ν¨μ λλ λ©μλ λ΄μμ μ½λκ° μ§λμΉκ² λ§μ
- μ€μ²© μ μ΄ νλ¦ - if λλ caseμ κ°μ΄ μ€μ²© λ μ μ΄ κ΅¬μ‘°
- return λ¬Έ - λ§μ μμ return λ¬Έμ μ¬μ©νλ ν¨μ λλ λ©μλ
- μ μ¬ν μ½λ λΈλ‘ - λμΌνμ§λ μμ§λ§ λμΌν ꡬ쑰λ₯Ό 곡μ νλ μ€λ³΅ μ½λ (μ : λ³μ μ΄λ¦μ΄ λ€λ₯Ό μ μμ)
- λ©μλ 볡μ‘μ± - μ΄ν΄νκΈ° μ΄λ €μΈ μμλ ν¨μ λλ λ©μλ