dubreuia / intellij-plugin-save-actions

Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
MIT License
531 stars 101 forks source link

XML formatting SQL is not properly formatted #377

Open liwei0423 opened 3 years ago

liwei0423 commented 3 years ago

Describe the bug SQL looks weird when formatted DELETE t1 FROM mark_task t1 INNER JOIN ( SELECT t2.mark_task_id FROM mark_task t2 WHERE t2.exam_block_id = #{examBlockId} AND t2.status = '0' GROUP BY t2.exam_number HAVING count( * ) > 1 ) t3 ON t1.mark_task_id = t3.mark_task_id WHERE t1.exam_block_id = #{examBlockId} AND t1.status = '0'

What triggered the plugin CTRL+SHIFT+L, CTRL+S

Versions IntelliJ IDEA 2021.1.2 (Ultimate Edition) Build #IU-211.7442.40, built on June 1, 2021 Licensed to IntelliJ IDEA Evaluator Expiration date: July 21, 2021 Runtime version: 11.0.11+9-b1341.57 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 1774M Cores: 16 Registry: compiler.automake.allow.when.app.running=true Non-Bundled Plugins: de.netnexus.camelcaseplugin (3.0.8), io.zhile.research.ide-eval-resetter (2.1.14), com.failfast (2.0.4), EclipseCodeFormatter (20.8.203.000.0-Eclipse_2020-06-JavaOnly), MyBatisLog (2021.4.1), com.dubreuia (2.2.0), com.alibaba.p3c.smartfox (2.1.0), MavenRunHelper (4.11.203.000.2), JRebelPlugin (2021.2.0), com.baomidou.plugin.idea.mybatisx (1.4.13) Kotlin: 211-1.4.32-release-IJ7442.2