From d8482d7619cfdcd49e50015de25e8ef867f31465 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Wed, 16 Feb 2022 18:30:11 -0500 Subject: [PATCH 1/2] feat: remove unnecesary newlines --- src/rules/pat_bind.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rules/pat_bind.rs b/src/rules/pat_bind.rs index 1ffa43f..c317071 100644 --- a/src/rules/pat_bind.rs +++ b/src/rules/pat_bind.rs @@ -25,19 +25,18 @@ pub fn rule( } // /**/ + let mut comment = false; children.drain_comments_and_newlines(|element| match element { crate::children::DrainCommentOrNewline::Comment(text) => { steps.push_back(crate::builder::Step::NewLine); steps.push_back(crate::builder::Step::Pad); steps.push_back(crate::builder::Step::Comment(text)); + comment = true; } crate::children::DrainCommentOrNewline::Newline(_) => {} }); - if let rnix::SyntaxKind::TOKEN_COMMENT - | rnix::SyntaxKind::TOKEN_WHITESPACE = - children.peek_prev().unwrap().element.kind() - { + if comment { steps.push_back(crate::builder::Step::NewLine); steps.push_back(crate::builder::Step::Pad); } else { From 1f6f2cb1c5732174c17cdf5502d693373023bbd1 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Wed, 16 Feb 2022 18:53:34 -0500 Subject: [PATCH 2/2] feat: reduce tarbal ttl --- buildkite.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/buildkite.yaml b/buildkite.yaml index d1c2d80..f676d2d 100644 --- a/buildkite.yaml +++ b/buildkite.yaml @@ -9,12 +9,9 @@ steps: queue: private artifacts: # Builds on: aarch64-darwin - # - aarch64-apple-darwin + # - alejandra-aarch64-apple-darwin - # Builds on: aarch64-linux - # - aarch64-unknown-linux-musl - - # Builds on: x86_64-linux + # Builds on: aarch64-linux, x86_64-linux - alejandra-aarch64-unknown-linux-musl # Builds on: x86_64-darwin @@ -68,7 +65,7 @@ steps: - git clone --branch=master --depth 1 --origin=upstream file:///data/nixpkgs - echo --- Formatting - before - - nix run github:kamadorueda/alejandra -- nixpkgs 2>/dev/null + - nix --tarball-ttl 1 run github:kamadorueda/alejandra -- nixpkgs 2>/dev/null - git -C nixpkgs add . - git -C nixpkgs commit -m formatting-before -q - git -C nixpkgs branch formatting-before