diff options
author | João Baptista <15786310+M4RC3L05@users.noreply.github.com> | 2024-11-19 21:01:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 21:01:16 +0000 |
commit | c55e936be03a3a023330789f903e2fbd12f4a308 (patch) | |
tree | 0dc406b0cfb82a6c0683edb9152c6450aa3abf52 /cli/args/mod.rs | |
parent | 628816448ea45807762fd8eb0c59302c9f2aac9a (diff) |
feat(fmt): support SQL (#26750)
This commit adds support for .sql files in "deno fmt" subcommand.
Closes: https://github.com/denoland/deno/issues/25024
---------
Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index ec75d7a10..61e1443a7 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -289,6 +289,7 @@ impl BenchOptions { #[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct UnstableFmtOptions { pub component: bool, + pub sql: bool, } #[derive(Clone, Debug)] @@ -322,6 +323,7 @@ impl FmtOptions { options: resolve_fmt_options(fmt_flags, fmt_config.options), unstable: UnstableFmtOptions { component: unstable.component || fmt_flags.unstable_component, + sql: unstable.sql || fmt_flags.unstable_sql, }, files: fmt_config.files, } @@ -1319,6 +1321,7 @@ impl CliOptions { let workspace = self.workspace(); UnstableFmtOptions { component: workspace.has_unstable("fmt-component"), + sql: workspace.has_unstable("fmt-sql"), } } @@ -1667,6 +1670,7 @@ impl CliOptions { "byonm", "bare-node-builtins", "fmt-component", + "fmt-sql", ]) .collect(); |