summaryrefslogtreecommitdiff
path: root/cli/args
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2024-03-26 15:52:20 +0000
committerGitHub <noreply@github.com>2024-03-26 15:52:20 +0000
commit3b61104e2a8984255f74827b0f1c23476ccd8209 (patch)
tree43228946e39342e6c71f87ae720f93e7f8c63901 /cli/args
parentd6452b39460ee46ade1ed9a5c95e469fd23a812c (diff)
refactor(lsp): unify config file data into ConfigTree (#23032)
Diffstat (limited to 'cli/args')
-rw-r--r--cli/args/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index cb4473ca2..de889c654 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -260,6 +260,12 @@ pub struct FmtOptions {
pub files: FilePatterns,
}
+impl Default for FmtOptions {
+ fn default() -> Self {
+ Self::new_with_base(PathBuf::from("/"))
+ }
+}
+
impl FmtOptions {
pub fn new_with_base(base: PathBuf) -> Self {
Self {
@@ -394,6 +400,12 @@ pub struct LintOptions {
pub fix: bool,
}
+impl Default for LintOptions {
+ fn default() -> Self {
+ Self::new_with_base(PathBuf::from("/"))
+ }
+}
+
impl LintOptions {
pub fn new_with_base(base: PathBuf) -> Self {
Self {