Browse Source

Check whether non-test JS files are ASCII-safe during CI (#2249)

pull/2253/head
Mathias Bynens 7 years ago
committed by penmetsaa
parent
commit
9adf0b3291
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      .travis.yml
  2. +2
    -2
      javascript/i18n/phonenumbers/phonenumberutil.js

+ 2
- 0
.travis.yml View File

@ -4,6 +4,7 @@ before_install:
# ant-optional is needed for ant junit. This used to be part of the default
# Travis image.
- sudo apt-get install ant-optional
- npm install -g is-ascii-safe-cli
install:
# Invoke the "travis" profile during Maven steps; see <profile> in pom.xml
# files. This is configured not to build the "cpp-build" module.
@ -16,3 +17,4 @@ script:
- mvn -P travis test
- ant clean -f java/build.xml && ant jar -f java/build.xml
- ant junit -f java/build.xml
- find . -name '*.js' ! -name '*_test.js' | xargs is-ascii-safe

+ 2
- 2
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -3502,7 +3502,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberForTypeWithReason =
// getRegionCodeForNumber will not work if the number is possible but not
// valid. There is in fact one country calling code (290) where the possible
// number pattern differs between various regions (Saint Helena and Tristan
// da Cuñha), but this is handled by putting all possible lengths for any
// da Cunha), but this is handled by putting all possible lengths for any
// country with this country calling code in the metadata for the default
// region in this case.
if (!this.hasValidCountryCallingCode_(countryCode)) {
@ -3996,7 +3996,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.checkRegionForParsing_ = function(
* method is quite lenient and looks for a number in the input text (raw input)
* and does not check whether the string is definitely only a phone number. To
* do this, it ignores punctuation and white-space, as well as any text before
* the number (e.g. a leading Tel: ) and trims the non-number bits. It will
* the number (e.g. a leading "Tel: ") and trims the non-number bits. It will
* accept a number in any format (E164, national, international etc), assuming
* it can be interpreted with the defaultRegion supplied. It also attempts to
* convert any alpha characters into digits if it thinks this is a vanity number


Loading…
Cancel
Save