[SCM] ci-tooling packaging branch, master, updated. 061cabe9325b47cfecc73da996b16d73530c975a

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Dec 7 13:31:37 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=061cabe

The following commit has been merged in the master branch:
commit 061cabe9325b47cfecc73da996b16d73530c975a
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Dec 7 14:26:49 2015 +0100

    reduce abc complexity by refactoring the patch skipping into its own method
---
 lib/lint/series.rb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/lint/series.rb b/lib/lint/series.rb
index 2aa8696..22c1129 100644
--- a/lib/lint/series.rb
+++ b/lib/lint/series.rb
@@ -21,12 +21,12 @@ module Lint
 
     # @return [Result]
     def lint
-      result = Result.new.tap { |r| r.valid = true }
+      result = Result.new
+      result.valid = true
       Dir.glob("#{@patch_directory}/**/*").each do |patch|
         next if EXCLUDES.include?(File.basename(patch))
         patch = relative(patch, @patch_directory)
-        next if series.patches.include?(patch)
-        next if ignore.patches.include?(patch)
+        next if skip?(patch)
         result.warnings << "Patch #{File.basename(patch)} in VCS but not" \
                            ' listed in debian/series file.'
       end
@@ -35,6 +35,10 @@ module Lint
 
     private
 
+    def skip?(patch)
+      series.patches.include?(patch) || ignore.patches.include?(patch)
+    end
+
     def relative(path, path_base)
       Pathname.new(path).relative_path_from(Pathname.new(path_base)).to_s
     end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list