Skip to content

Commit 7344932

Browse files
committed
initial
1 parent d89118d commit 7344932

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1843
-2259
lines changed

Cargo.lock

Lines changed: 948 additions & 1122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,29 @@ rust-version = "1.86.0"
1414

1515
[workspace.dependencies]
1616
# supporting crates unrelated to postgres
17-
anyhow = "1.0.92"
18-
biome_deserialize = "0.6.0"
19-
biome_deserialize_macros = "0.6.0"
20-
biome_js_factory = "0.5.7"
21-
biome_js_formatter = "0.5.7"
22-
biome_js_syntax = "0.5.7"
23-
biome_rowan = "0.5.7"
24-
biome_string_case = "0.5.8"
25-
bpaf = { version = "0.9.15", features = ["derive"] }
26-
criterion = "0.5"
27-
crossbeam = "0.8.4"
28-
enumflags2 = "0.7.11"
29-
ignore = "0.4.23"
30-
indexmap = { version = "2.6.0", features = ["serde"] }
31-
insta = "1.31.0"
32-
json-strip-comments = "3.1.0"
33-
oxc_resolver = "1.12.0"
34-
pg_query = "6.1.0"
35-
proc-macro2 = "1.0.66"
36-
quote = "1.0.33"
37-
rayon = "1.10.0"
38-
regex = "1.11.1"
39-
rustc-hash = "2.0.0"
40-
schemars = { version = "0.8.22", features = ["indexmap2", "smallvec"] }
41-
serde = { version = "1.0.195", features = ["rc"] }
42-
serde_json = "1.0.114"
43-
similar = "2.6.0"
44-
slotmap = "1.0.7"
45-
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
46-
strum = { version = "0.27.1", features = ["derive"] }
17+
anyhow = "1.0.92"
18+
bpaf = { version = "0.9.15", features = ["derive"] }
19+
criterion = "0.5"
20+
crossbeam = "0.8.4"
21+
enumflags2 = "0.7.11"
22+
ignore = "0.4.23"
23+
indexmap = { version = "2.6.0", features = ["serde"] }
24+
insta = "1.31.0"
25+
json-strip-comments = "3.1.0"
26+
oxc_resolver = "1.12.0"
27+
pg_query = "6.1.0"
28+
proc-macro2 = "1.0.66"
29+
quote = "1.0.33"
30+
rayon = "1.10.0"
31+
regex = "1.11.1"
32+
rustc-hash = "2.0.0"
33+
schemars = { version = "0.8.22", features = ["indexmap2", "smallvec"] }
34+
serde = { version = "1.0.195", features = ["rc"] }
35+
serde_json = "1.0.114"
36+
similar = "2.6.0"
37+
slotmap = "1.0.7"
38+
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
39+
strum = { version = "0.27.1", features = ["derive"] }
4740
# this will use tokio if available, otherwise async-std
4841
camino = "1.1.9"
4942
convert_case = "0.6.0"
@@ -69,6 +62,7 @@ pgls_analyser = { path = "./crates/pgls_analyser", version = "0.0.
6962
pgls_cli = { path = "./crates/pgls_cli", version = "0.0.0" }
7063
pgls_completions = { path = "./crates/pgls_completions", version = "0.0.0" }
7164
pgls_configuration = { path = "./crates/pgls_configuration", version = "0.0.0" }
65+
pgls_configuration_macros = { path = "./crates/pgls_configuration_macros" }
7266
pgls_console = { path = "./crates/pgls_console", version = "0.0.0" }
7367
pgls_diagnostics = { path = "./crates/pgls_diagnostics", version = "0.0.0" }
7468
pgls_diagnostics_categories = { path = "./crates/pgls_diagnostics_categories", version = "0.0.0" }

crates/pgls_analyse/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ pgls_query.workspace = true
1919
pgls_schema_cache = { workspace = true, default-features = false }
2020
rustc-hash = { workspace = true }
2121

22-
biome_deserialize = { workspace = true, optional = true }
23-
biome_deserialize_macros = { workspace = true, optional = true }
2422
enumflags2.workspace = true
2523
pgls_text_size.workspace = true
2624
schemars = { workspace = true, optional = true }
2725
serde = { workspace = true, features = ["derive"], optional = true }
2826

2927
[features]
3028
schema = ["dep:schemars"]
31-
serde = ["dep:serde", "dep:biome_deserialize", "dep:biome_deserialize_macros"]
29+
serde = ["dep:serde"]

crates/pgls_cli/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ version = "0.0.0"
1313

1414
[dependencies]
1515
anyhow = { workspace = true }
16-
biome_deserialize = { workspace = true }
17-
biome_deserialize_macros = { workspace = true }
1816
bpaf = { workspace = true, features = ["bright-color"] }
1917
crossbeam = { workspace = true }
2018
dashmap = "5.5.3"

crates/pgls_cli/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//! to parse commands and arguments, redirect the execution of the commands and
55
//! execute the traversal of directory and files, based on the command that was passed.
66
7-
use biome_deserialize::Merge;
87
use cli_options::CliOptions;
98
use commands::check::{self, CheckArgs};
109
use commands::format::{self, FormatArgs};
10+
use pgls_configuration::Merge;
1111
use pgls_configuration::PartialConfiguration;
1212
use pgls_console::{ColorMode, Console, ConsoleExt, markup};
1313
use pgls_fs::{ConfigName, FileSystem, OsFileSystem};

crates/pgls_configuration/Cargo.toml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,22 @@ version = "0.0.0"
1212

1313

1414
[dependencies]
15-
biome_deserialize = { workspace = true, features = ["schema"] }
16-
biome_deserialize_macros = { workspace = true }
17-
bpaf = { workspace = true }
18-
indexmap = { workspace = true }
19-
oxc_resolver = { workspace = true }
20-
pgls_analyse = { workspace = true }
21-
pgls_analyser = { workspace = true }
22-
pgls_console = { workspace = true }
23-
pgls_diagnostics = { workspace = true }
24-
pgls_env = { workspace = true }
25-
pgls_matcher = { workspace = true }
26-
pgls_pretty_print = { workspace = true }
27-
pgls_text_size = { workspace = true }
28-
rustc-hash = { workspace = true }
29-
schemars = { workspace = true, features = ["indexmap1"], optional = true }
30-
serde = { workspace = true, features = ["derive"] }
31-
serde_json = { workspace = true, features = ["raw_value"] }
15+
bpaf = { workspace = true }
16+
indexmap = { workspace = true }
17+
oxc_resolver = { workspace = true }
18+
pgls_analyse = { workspace = true }
19+
pgls_analyser = { workspace = true }
20+
pgls_configuration_macros = { workspace = true }
21+
pgls_console = { workspace = true }
22+
pgls_diagnostics = { workspace = true }
23+
pgls_env = { workspace = true }
24+
pgls_matcher = { workspace = true }
25+
pgls_pretty_print = { workspace = true }
26+
pgls_text_size = { workspace = true }
27+
rustc-hash = { workspace = true }
28+
schemars = { workspace = true, features = ["indexmap1"], optional = true }
29+
serde = { workspace = true, features = ["derive"] }
30+
serde_json = { workspace = true, features = ["raw_value"] }
3231

3332
[lib]
3433
doctest = false

crates/pgls_configuration/src/database.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use biome_deserialize::StringSet;
2-
use biome_deserialize_macros::{Merge, Partial};
1+
use crate::StringSet;
32
use bpaf::Bpaf;
3+
use pgls_configuration_macros::{Merge, Partial};
44
use serde::{Deserialize, Serialize};
55

66
/// The configuration of the database connection.

crates/pgls_configuration/src/files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::num::NonZeroU64;
22

3-
use biome_deserialize::StringSet;
4-
use biome_deserialize_macros::{Merge, Partial};
3+
use crate::StringSet;
54
use bpaf::Bpaf;
5+
use pgls_configuration_macros::{Merge, Partial};
66
use serde::{Deserialize, Serialize};
77

88
/// Limit the size of files to 1.0 MiB by default

crates/pgls_configuration/src/format.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
use biome_deserialize::StringSet;
2-
use biome_deserialize_macros::{Deserializable, Merge, Partial};
1+
use crate::StringSet;
32
use bpaf::Bpaf;
3+
use pgls_configuration_macros::{Merge, Partial};
44
use serde::{Deserialize, Serialize};
55
use std::str::FromStr;
66

77
/// Indentation style for the formatter.
8-
#[derive(
9-
Clone, Copy, Debug, Default, Deserialize, Deserializable, Eq, Merge, PartialEq, Serialize,
10-
)]
8+
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Merge, PartialEq, Serialize)]
119
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
1210
#[serde(rename_all = "camelCase")]
1311
pub enum IndentStyle {
@@ -40,9 +38,7 @@ impl From<IndentStyle> for pgls_pretty_print::renderer::IndentStyle {
4038
}
4139

4240
/// Keyword casing style for the formatter.
43-
#[derive(
44-
Clone, Copy, Debug, Default, Deserialize, Deserializable, Eq, Merge, PartialEq, Serialize,
45-
)]
41+
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Merge, PartialEq, Serialize)]
4642
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
4743
#[serde(rename_all = "camelCase")]
4844
pub enum KeywordCase {

crates/pgls_configuration/src/lib.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
//!
33
//! The configuration is divided by "tool".
44
5+
// Allow the crate to reference itself by name, needed by pgls_configuration_macros
6+
// which generates `pgls_configuration::Merge` paths.
7+
extern crate self as pgls_configuration;
8+
59
pub mod database;
610
pub mod diagnostics;
711
pub mod files;
@@ -13,15 +17,17 @@ pub mod plpgsql_check;
1317
pub mod rules;
1418
pub mod splinter;
1519
pub mod typecheck;
20+
pub mod utils;
1621
pub mod vcs;
1722

23+
pub use utils::merge::Merge;
24+
pub use utils::string_set::StringSet;
25+
1826
pub use crate::diagnostics::ConfigurationDiagnostic;
1927

2028
use std::path::PathBuf;
2129

2230
use crate::vcs::{PartialVcsConfiguration, VcsConfiguration, partial_vcs_configuration};
23-
use biome_deserialize::StringSet;
24-
use biome_deserialize_macros::{Merge, Partial};
2531
use bpaf::Bpaf;
2632
use database::{
2733
DatabaseConfiguration, PartialDatabaseConfiguration, partial_database_configuration,
@@ -41,6 +47,7 @@ use migrations::{
4147
use pglinter::{
4248
PartialPglinterConfiguration, PglinterConfiguration, partial_pglinter_configuration,
4349
};
50+
use pgls_configuration_macros::{Merge, Partial};
4451
use pgls_env::PGLS_WEBSITE;
4552
use plpgsql_check::{
4653
PartialPlPgSqlCheckConfiguration, PlPgSqlCheckConfiguration,

0 commit comments

Comments
 (0)