From bb695a354ddf22a05684628c3606b824c3eb2bba Mon Sep 17 00:00:00 2001 From: tibetiroka Date: Mon, 26 Feb 2024 12:27:45 +0100 Subject: [PATCH] Fix stupid IDE formatting --- .../java/com/tibetiroka/deblint/Linters.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/tibetiroka/deblint/Linters.java b/src/main/java/com/tibetiroka/deblint/Linters.java index a3ec656..bfec9a7 100644 --- a/src/main/java/com/tibetiroka/deblint/Linters.java +++ b/src/main/java/com/tibetiroka/deblint/Linters.java @@ -105,23 +105,6 @@ class Linters { } } }; - protected static final BiConsumer SHA1_LINTER = (s, config) -> { - String[] lines = s.split("\\n"); - if(!lines[0].isBlank()) { - Main.error("The first line of checksums should be empty"); - } - Arrays.stream(lines).filter(s1 -> !s1.isBlank()).map(String::strip).forEachOrdered(l -> { - String[] parts = l.split(" ", 3); - if(parts.length < 3) { - Main.error("Missing parameter; 3 values required: " + l); - return; - } - if(!Pattern.matches("^[a-fA-F0-9]{40}$", parts[0])) { - Main.error("Invalid SHA hash: " + parts[0]); - } - SIZE_LINTER.accept(parts[1], config); - }); - }; protected static final BiConsumer BINARY_LIST_LINTER = (s, config) -> { HashSet files = new HashSet<>(); if(config.checkedType == ControlType.SOURCE_CONTROL) { @@ -409,6 +392,23 @@ class Linters { Main.error("Invalid size: " + s); } }; + protected static final BiConsumer SHA1_LINTER = (s, config) -> { + String[] lines = s.split("\\n"); + if(!lines[0].isBlank()) { + Main.error("The first line of checksums should be empty"); + } + Arrays.stream(lines).filter(s1 -> !s1.isBlank()).map(String::strip).forEachOrdered(l -> { + String[] parts = l.split(" ", 3); + if(parts.length < 3) { + Main.error("Missing parameter; 3 values required: " + l); + return; + } + if(!Pattern.matches("^[a-fA-F0-9]{40}$", parts[0])) { + Main.error("Invalid SHA hash: " + parts[0]); + } + SIZE_LINTER.accept(parts[1], config); + }); + }; protected static final BiConsumer SHA256_LINTER = (s, config) -> { String[] lines = s.split("\n"); if(!lines[0].isBlank()) {