Skip to content

Commit

Permalink
unused local variable detection ignore "Self", "Super", "__st"
Browse files Browse the repository at this point in the history
  • Loading branch information
lalawue committed Jul 29, 2023
1 parent 43c8026 commit 79b514e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func (a *Analysis) checkLocVarCall() {

// 扫描当前scope,判断哪些局部变量定义了未使用
for varName, varInfoList := range scope.LocVarMap {
// _ 局部变量忽略, _G也忽略
if varName == "_" || varName == "_G" {
// _ 局部变量忽略, _G也忽略,moocscript 独有的 Self、Super、__st 也忽略
if varName == "_" || varName == "_G" || varName == "Self" || varName == "Super" || varName == "__st" {
continue
}

Expand Down

0 comments on commit 79b514e

Please sign in to comment.