From f37cb40ad8a369cd1e4ffeac0bffa7ee91f7e55a Mon Sep 17 00:00:00 2001 From: Junjie Peng <657240269@qq.com> Date: Sat, 3 Mar 2018 15:22:51 +0800 Subject: [PATCH] Fix "Reindent" option for sqlformat. For sqlparse-0.2.3 and sqlparse-0.2.4, beautifying sql will throw "sqlformat: error: argument -r/--reindent: ignored explicit argument". --- CHANGELOG.md | 2 +- src/beautifiers/sqlformat.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86f39a6..79e4e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Next -- ... +- Fix "Reindent" option for sqlformat. # v0.32.0 (2018-03-02) - See [#2026](https://github.com/Glavin001/atom-beautify/issues/2026) Add Vue support to ESLint Fixer beautifier. Should be used with [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue). diff --git a/src/beautifiers/sqlformat.coffee b/src/beautifiers/sqlformat.coffee index 02c5333..6f7ce19 100644 --- a/src/beautifiers/sqlformat.coffee +++ b/src/beautifiers/sqlformat.coffee @@ -17,7 +17,7 @@ module.exports = class Sqlformat extends Beautifier beautify: (text, language, options) -> @run("sqlformat", [ @tempFile("input", text) - "--reindent=#{options.reindent}" if options.reindent? + "--reindent" if (options.reindent? && options.reindent == true) "--indent_width=#{options.indent_size}" if options.indent_size? "--keywords=#{options.keywords}" if (options.keywords? && options.keywords != 'unchanged') "--identifiers=#{options.identifiers}" if (options.identifiers? && options.identifiers != 'unchanged')