nowarp / misti

TON Static Analyzer
https://nowarp.io/tools/misti
Apache License 2.0
29 stars 1 forks source link

Single-Letter Identifier #134

Open jubnzv opened 2 months ago

jubnzv commented 2 months ago

Summary An optional detector that reports all the single-letter identifiers defined within the project.

Context Single-letter names are usually less readable and make code harder to understand.

Example

fun calculateFee(a: Int): Int {
  let f: Int = (a * 2) / 100;
  return f;
}

Use instead:

fun calculateFee(amount: Int): Int {
  let fee: Int = (amount * 2) / 100;
  return fee;
}
jubnzv commented 1 month ago

Blocked with #142. Without it implemented, the detector will be too noisy.