From 9ebc9efe420cfe13037fe970332fd14d001a7010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Fri, 27 May 2022 11:22:19 +0200 Subject: [PATCH 1/3] Update formula to version 0.10.0 --- Formula/anylint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/anylint.rb b/Formula/anylint.rb index 304f16b..485079b 100644 --- a/Formula/anylint.rb +++ b/Formula/anylint.rb @@ -1,7 +1,7 @@ class Anylint < Formula desc "Lint anything by combining the power of Swift & regular expressions" homepage "https://github.com/FlineDev/AnyLint" - url "https://github.com/FlineDev/AnyLint.git", :tag => "0.9.2", :revision => "a696a4d40a3ede9daa07d7a381101a1e4e6efc46" + url "https://github.com/FlineDev/AnyLint.git", :tag => "0.10.0", :revision => "5a9c6d2289e1fc4e4f453c04d8a1ec891ea0797d" head "https://github.com/FlineDev/AnyLint.git" depends_on :xcode => ["12.5", :build] From f5735156781fe2d0e4571c659630b9d1dd34d630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Fri, 27 May 2022 11:34:09 +0200 Subject: [PATCH 2/3] Improve execution time output & also enable output on no warnings --- CHANGELOG.md | 6 ++++-- Sources/AnyLint/Statistics.swift | 8 ++++++-- Sources/Utility/Logger.swift | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c82ba6e..7abe057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,13 +21,15 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se ### Added - None. ### Changed -- None. +- Improved output color & formatting of new `--measure` option for printing execution time per check. + Author: [Cihat Gündüz](https://github.com/Jeehut) ### Deprecated - None. ### Removed - None. ### Fixed -- None. +- New `--measure` option did not work when no violations were found, now also prints when all checks succeed. + Author: [Cihat Gündüz](https://github.com/Jeehut) ### Security - None. diff --git a/Sources/AnyLint/Statistics.swift b/Sources/AnyLint/Statistics.swift index 4462a0f..c2f4c05 100644 --- a/Sources/AnyLint/Statistics.swift +++ b/Sources/AnyLint/Statistics.swift @@ -75,6 +75,10 @@ final class Statistics { showViolationsInXcode() } } else { + if printExecutionTime { + self.logExecutionTimes() + } + log.message( "Performed \(executedChecks.count) check(s) in \(filesChecked.count) file(s) without any violations.", level: .success @@ -83,11 +87,11 @@ final class Statistics { } func logExecutionTimes() { - log.message("Executed checks sorted by their execution time:", level: .info) + log.message("⏱ Executed checks sorted by their execution time:", level: .info) for (check, executionTime) in self.executionTimePerCheck.sorted(by: { $0.value > $1.value }) { let milliseconds = Int(executionTime * 1000) - log.message("\(check.id) took \(milliseconds)ms", level: .info) + log.message("\(milliseconds)ms\t\t\(check.id)", level: .info) } } diff --git a/Sources/Utility/Logger.swift b/Sources/Utility/Logger.swift index 260afc3..877c120 100644 --- a/Sources/Utility/Logger.swift +++ b/Sources/Utility/Logger.swift @@ -123,7 +123,7 @@ public final class Logger { print(formattedCurrentTime(), "✅", message.green) case .info: - print(formattedCurrentTime(), "ℹ️ ", message.lightBlue) + print(formattedCurrentTime(), "ℹ️ ", message.lightCyan) case .warning: print(formattedCurrentTime(), "⚠️ ", message.yellow) From fa5343f57c28fa96b908dfdc3f61db74076f9a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Fri, 27 May 2022 11:37:12 +0200 Subject: [PATCH 3/3] Bump version num & finalize new changelog section --- CHANGELOG.md | 14 ++++++++++---- README.md | 4 ++-- Sources/Utility/Constants.swift | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abe057..6b21eb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,18 +21,24 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se ### Added - None. ### Changed -- Improved output color & formatting of new `--measure` option for printing execution time per check. - Author: [Cihat Gündüz](https://github.com/Jeehut) +- None. ### Deprecated - None. ### Removed - None. ### Fixed -- New `--measure` option did not work when no violations were found, now also prints when all checks succeed. - Author: [Cihat Gündüz](https://github.com/Jeehut) +- None. ### Security - None. +## [0.10.1] - 2022-05-27 +### Changed +- Improved output color & formatting of new `--measure` option for printing execution time per check. + Author: [Cihat Gündüz](https://github.com/Jeehut) +### Fixed +- New `--measure` option did not work when no violations were found, now also prints when all checks succeed. + Author: [Cihat Gündüz](https://github.com/Jeehut) + ## [0.10.0] - 2022-05-27 ### Added - New `--measure` / `-m` option to print execution times per check to find slow checks easily. diff --git a/README.md b/README.md index 0715403..c90c6e1 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ alt="Coverage"/> - Version: 0.10.0 + Version: 0.10.1