mpeterv / luacheck

A tool for linting and static analysis of Lua code.
MIT License
1.91k stars 318 forks source link

Print only warnings with specified numbers #234

Open CertHaramas opened 1 hour ago

CertHaramas commented 1 hour ago

Hello, is there a way luacheck to print just "accessing undefined variable" and similar by-user-in-advance-specified warnings, nothing more? My output is like: " Abutment.lua:923:85: accessing undefined variable 'pln_70_L' Abutment.lua:928:85: accessing undefined variable 'pln_70_R' Abutment.lua:1226:1: line contains only whitespace Abutment.lua:1228:1: line contains only whitespace Abutment.lua:1709:9: empty if branch Abutment.lua:2059:6: accessing undefined variable 'z0' " In my situation, only lines: " Abutment.lua:923:85: accessing undefined variable 'pln_70_L' Abutment.lua:928:85: accessing undefined variable 'pln_70_R' Abutment.lua:2059:6: accessing undefined variable 'z0' " should be printed, i.e. lines of warning number 111, 112 and 113: " 111 Setting an undefined global variable. 112 Mutating an undefined global variable. 113 Accessing an undefined global variable. " TIA. Best regards, Lukas

carrywang05 commented 1 hour ago

  您好,您的邮件我已经收到,谢谢!