Prechádzať zdrojové kódy

have linter check the link text even if it doesn't contain ->

Ruduki2 6 rokov pred
rodič
commit
6b48a32450
1 zmenil súbory, kde vykonal 2 pridanie a 3 odobranie
  1. 2 3
      Rakefile

+ 2 - 3
Rakefile

@@ -90,14 +90,14 @@ task :lint do
         case link.scan('->').length
         when 0
           #puts("link contains no ->, probably not a problem")
-          next
+          text = link
         when 1
           # no problem
+          text, dest = link.split('->')
         else
           puts("link contains multiple -> definitely a problem")
           next
         end
-        text, dest = link.split('->')
         if text.start_with?('\'')
           if !text.end_with?('\'')
             puts("#{filename}:#{lineno} link text (#{text.inspect}) does not end with single quote despite starting with one")
@@ -129,7 +129,6 @@ task :lint do
         elsif text =~ /\A[\[\]'"\\]*\Z/
           puts "#{filename}:#{lineno} link text (#{text.inspect}) contains special characters but is not quoted with single or double quotes"
         end
-        #puts(dest)
       end
     end
   end