代码仓库中有一个名为db.changelog-master.xml
的文件,里面包含如下内容:
<changeSet id="2021-08-25-001" author="Jason Law-current_feature">
<sql>
alter table shop_dish_revenue
add dish_specification varchar(50) not null comment '菜品规格' after dish_code;
</sql>
</changeSet>
但在我同事的电脑上格式化代码的话,会变成下面这样,为什么呢?怎么可以格式化成上面那样?
<changeSet id="2021-08-25-001" author="Jason Law-current_feature">
<sql>
alter table shop_dish_revenue
add dish_specification varchar(50) not null comment '菜品规格' after dish_code;
</sql>
</changeSet>
1
skai0dev 2021-08-31 15:32:24 +08:00 1
File | Settings | Editor | Code Style | SQL | General => DDL => ALTER TABLE => 取消勾选"Indent altering instructions"
|
2
JasonLaw OP @skai0dev #1 谢谢,不过弄反了,想要变成上面那样,需要勾选"Indent altering instructions"才对。
|
3
Flicker 2021-09-01 15:27:58 +08:00 1
建议导出一个.editorconfig,大家统一
|