EmmyLuaCodeStyle icon indicating copy to clipboard operation
EmmyLuaCodeStyle copied to clipboard

将格式化与风格诊断分离

Open sumneko opened this issue 3 years ago • 0 comments
trafficstars

实践中我们通常希望格式化总是输出出稳定的格式,但是手写代码允许有多种可用的格式,例如:

if 1
or 2 then
elseif 3 then
end
if     1
or     2 then
elseif 3 then
end

格式化的时候我希望总是可以输出成下面的格式,但是我手写时上面的格式也是允许的。 因此希望可以增加诊断专用的 allow 系列设置,这些设置仅仅是用于抑制风格诊断。

  • 格式化时:根据设置进行格式化,不管 allow 系列设置
  • 诊断时:先根据设置进行诊断,然后根据 allow 系列设置排除掉部分诊断

sumneko avatar Feb 17 '22 07:02 sumneko