File: dont_check_whitespace_for_debian_dir.patch

package info (click to toggle)
ruby-rspec-rails 8.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,804 kB
  • sloc: ruby: 10,881; sh: 198; makefile: 6
file content (24 lines) | stat: -rw-r--r-- 800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Fri, 7 Feb 2020 18:19:24 +0100
Subject: fix whitespace check

Last-Update: 2016-03-02
Forwarded: not-needed

 - do not use git to list all the files
 - exclude files in the debian directory
---
 spec/rspec/rails_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/spec/rspec/rails_spec.rb
+++ b/spec/rspec/rails_spec.rb
@@ -17,7 +17,7 @@ RSpec.describe "RSpec::Rails" do
 
   it "has no malformed whitespace", :slow do
     error_messages = []
-    `git ls-files -z`.split("\x0").each do |filename|
+    Dir.glob("**/*").select { |f| !(f =~ /^debian/) && File.file?(f)}.each do |filename|
       error_messages << check_for_tab_characters(filename)
       error_messages << check_for_extra_spaces(filename)
     end