“力”是什么意思在 Uncrustify 中做什么?
许多选项都包含 Force
值选项:
添加或删除嵌套括号之间的空格
sp_paren_paren
{忽略
、添加
、删除
、强制
}
这是什么意思?它与Add
有何不同?
Many of the options include the Force
value option:
Add or remove space between nested parens
sp_paren_paren
{Ignore
,Add
,Remove
,Force
}
What does it mean? How is it different than Add
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
添加的意思是“如果尚不存在则添加”,这意味着如果某些内容已经存在,则保留它(以及单独的格式)。 Force 意味着如果不存在则添加,如果存在则重新格式化:
或者另一个示例:
Add means "add if not already present", meaning that if something's already there, leave it (and the formatting alone). Force means add if not present, and reformat if it is present:
Or another example:
Add
如果不存在则添加。Remove
删除(如果存在)。Force
执行remove
,然后执行add
。Add
adds if it is not there.Remove
removes if it is there.Force
does aremove
then anadd
.如“在A和B之间添加或删除X”
Add
:当没有X出现时,只添加a XRemove
:删除所有出现的X强制
:正如edwinc所说删除
然后添加
->首先删除所有(任何)X 并最后添加a X
但有时“添加X”可能被定义为在其他地方添加一些数字X,因此
Force
会像Chris所说的那样“重新格式化”。As "Add or remove X between A and B"
Add
: only adds a X when there is no X appearedRemove
: removes all appeared XForce
: as edwinc saidRemove
thenAdd
-> Removes all (any) X first andadds a X finally
But sometimes 'add X' may be defined as add some number X elsewhere, so
Force
will like a "reformat" as Chris said.