Skip to content

Commit

Permalink
Land #9398, allow UTF-8 module names and authors
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed Jan 22, 2018
2 parents 65781ef + 6aebc1f commit c35eb0d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions tools/dev/msftidy.rb
Expand Up @@ -34,10 +34,6 @@ def green
def cyan
"\e[1;36;40m#{self}\e[0m"
end

def ascii_only?
self =~ Regexp.new('[\x00-\x08\x0b\x0c\x0e-\x19\x7f-\xff]', nil, 'n') ? false : true
end
end

class Msftidy
Expand Down Expand Up @@ -318,10 +314,6 @@ def check_badchars
end
end

if not mod_title.ascii_only?
error("Please avoid unicode or non-printable characters in module title.")
end

# Since we're looking at the module title, this line clearly cannot be
# the author block, so no point to run more code below.
next
Expand Down Expand Up @@ -355,10 +347,6 @@ def check_badchars
error("No Twitter handles, please. Try leaving it in a comment instead.")
end

if not author_name.ascii_only?
error("Please avoid unicode or non-printable characters in Author")
end

unless author_name.empty?
author_open_brackets = author_name.scan('<').size
author_close_brackets = author_name.scan('>').size
Expand Down Expand Up @@ -541,10 +529,6 @@ def check_lines
src_ended = true if ln =~ /^__END__$/
next if src_ended

if ln =~ /[\x00-\x08\x0b\x0c\x0e-\x19\x7f-\xff]/
error("Unicode detected: #{ln.inspect}", idx)
end

if ln =~ /[ \t]$/
warn("Spaces at EOL", idx)
end
Expand Down

0 comments on commit c35eb0d

Please sign in to comment.