mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 21:17:45 +00:00
refactor: remove noisy logging
This commit is contained in:
parent
45ad71e6ee
commit
aa3d4ccfd8
2 changed files with 1 additions and 20 deletions
|
@ -180,14 +180,6 @@ fn format(
|
||||||
}
|
}
|
||||||
// ${a} (interpolation but for NODE_SELECT)
|
// ${a} (interpolation but for NODE_SELECT)
|
||||||
rnix::SyntaxKind::NODE_DYNAMIC => crate::rules::dynamic::rule,
|
rnix::SyntaxKind::NODE_DYNAMIC => crate::rules::dynamic::rule,
|
||||||
// implementation detail of rnix-parser
|
|
||||||
rnix::SyntaxKind::NODE_ERROR => {
|
|
||||||
eprintln!(
|
|
||||||
"Warning: found an error node at: {}",
|
|
||||||
build_ctx.path
|
|
||||||
);
|
|
||||||
crate::rules::default
|
|
||||||
}
|
|
||||||
// $identifier
|
// $identifier
|
||||||
rnix::SyntaxKind::NODE_IDENT => crate::rules::default,
|
rnix::SyntaxKind::NODE_IDENT => crate::rules::default,
|
||||||
// if a then b else c
|
// if a then b else c
|
||||||
|
@ -212,13 +204,7 @@ fn format(
|
||||||
// 1 | true | null
|
// 1 | true | null
|
||||||
rnix::SyntaxKind::NODE_LITERAL => crate::rules::default,
|
rnix::SyntaxKind::NODE_LITERAL => crate::rules::default,
|
||||||
// let { }
|
// let { }
|
||||||
rnix::SyntaxKind::NODE_LEGACY_LET => {
|
rnix::SyntaxKind::NODE_LEGACY_LET => crate::rules::default,
|
||||||
eprintln!(
|
|
||||||
"Warning: found a `legacy let` expression at: {}",
|
|
||||||
build_ctx.path
|
|
||||||
);
|
|
||||||
crate::rules::default
|
|
||||||
}
|
|
||||||
// a or b
|
// a or b
|
||||||
rnix::SyntaxKind::NODE_OR_DEFAULT => {
|
rnix::SyntaxKind::NODE_OR_DEFAULT => {
|
||||||
crate::rules::bin_op_and_or_default::rule
|
crate::rules::bin_op_and_or_default::rule
|
||||||
|
|
|
@ -66,8 +66,6 @@ pub fn rule(
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// eprintln!("0: {:?}", lines);
|
|
||||||
|
|
||||||
let mut indentation: usize = usize::MAX;
|
let mut indentation: usize = usize::MAX;
|
||||||
for line in lines.iter() {
|
for line in lines.iter() {
|
||||||
let line = line.trim_end();
|
let line = line.trim_end();
|
||||||
|
@ -111,9 +109,6 @@ pub fn rule(
|
||||||
.collect();
|
.collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// eprintln!("1: ''{}''", lines.join("\n"));
|
|
||||||
// eprintln!("indentation={}, placeholder={}", indentation, placeholder);
|
|
||||||
|
|
||||||
for (index, line) in lines.iter().enumerate() {
|
for (index, line) in lines.iter().enumerate() {
|
||||||
let portions: Vec<String> = line
|
let portions: Vec<String> = line
|
||||||
.split(&placeholder)
|
.split(&placeholder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue