Repository Analysis

google/libphonenumber

Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.

1.9 Likely human-written View on GitHub
1.9
Adjusted Score
1.9
Raw Score
100%
Time Factor
2026-05-22
Last Push
18,045
Stars
C++
Language
311,461
Lines of Code
850
Files
593
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 17LOW 576

Pattern Findings

593 matches across 6 categories. Click a row to expand file-level details.

Over-Commented Block494 hits · 488 pts
SeverityFileLineSnippet
LOWtools/script/continuous-integration.sh1#! /bin/sh
LOWtools/cpp/CMakeLists.txt1# Copyright (C) 2012 The Libphonenumber Authors
LOWtools/cpp/src/cpp-build/generate_geocoding_data.h1// Copyright (C) 2012 The Libphonenumber Authors
LOWtools/cpp/src/base/basictypes.h1// Copyright (c) 2010 The Chromium Authors. All rights reserved.
LOWtools/cpp/src/base/basictypes.h61#endif
LOWtools/cpp/src/base/basictypes.h81#else
LOWtools/cpp/src/base/basictypes.h101#endif
LOWtools/cpp/src/base/basictypes.h121 DISALLOW_COPY_AND_ASSIGN(TypeName)
LOWtools/cpp/src/base/basictypes.h141// That gcc wants both of these prototypes seems mysterious. VC, for
LOWtools/cpp/src/base/basictypes.h161//
LOWtools/cpp/src/base/basictypes.h181// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
LOWtools/cpp/src/base/basictypes.h201// Such explicit implicit_casts are necessary in surprisingly many
LOWtools/cpp/src/base/basictypes.h221//
LOWtools/cpp/src/base/basictypes.h241struct CompileAssert {
LOWtools/cpp/src/base/basictypes.h261// elements (and thus is invalid) when the expression is false.
LOWtools/cpp/src/base/basictypes.h281// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
LOWtools/cpp/src/base/basictypes.h301// Used to explicitly mark the return value of a function as unused. If you are
LOWtools/cpp/src/base/basictypes.h321// does nothing to the storage, AND there are no virtual methods, then a
LOWresources/test/geocoding/de/1.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/test/geocoding/en/54.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/test/carrier/sv/44.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/test/carrier/en/44.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/test/carrier/en/1.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/test/carrier/en/244.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/timezones/map_data.txt1# Copyright (C) 2012 The Libphonenumber Authors
LOWresources/geocoding/pl/48.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/vi/84.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/sq/383.txt1# Copyright (C) 2017 The Libphonenumber Authors
LOWresources/geocoding/sv/358.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/sv/46.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/hy/374.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/geocoding/be/375.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/geocoding/kk/7.txt1# Copyright (C) 2026 The Libphonenumber Authors
LOWresources/geocoding/ja/81.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/el/30.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/it/39.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/it/41.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/ru/375.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/geocoding/ru/374.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/geocoding/ru/373.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/ru/7.txt1# Copyright (C) 2012 The Libphonenumber Authors
LOWresources/geocoding/zh_Hant/886.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/ro/373.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/ro/40.txt1# Copyright (C) 2012 The Libphonenumber Authors
LOWresources/geocoding/pt/258.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/238.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/239.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/55.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/351.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/245.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/pt/244.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/zh/886.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/uk/380.txt1# Copyright (C) 2018 The Libphonenumber Authors
LOWresources/geocoding/sr/383.txt1# Copyright (C) 2017 The Libphonenumber Authors
LOWresources/geocoding/sr/381.txt1# Copyright (C) 2011 The Libphonenumber Authors
LOWresources/geocoding/sr/387.txt1# Copyright (C) 2017 The Libphonenumber Authors
LOWresources/geocoding/bs/387.txt1# Copyright (C) 2017 The Libphonenumber Authors
LOWresources/geocoding/ar/966.txt1# Copyright (C) 2013 The Libphonenumber Authors
LOWresources/geocoding/hr/387.txt1# Copyright (C) 2017 The Libphonenumber Authors
LOWresources/geocoding/hu/36.txt1# Copyright (C) 2011 The Libphonenumber Authors
434 more matches not shown…
Hyper-Verbose Identifiers78 hits · 57 pts
SeverityFileLineSnippet
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js269function testGetInstanceLoadUSMetadata() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js293function testGetInstanceLoadDEMetadata() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js315function testGetInstanceLoadARMetadata() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js334function testGetInstanceLoadInternationalTollFreeMetadata() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js363function testGetLengthOfGeographicalAreaCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js398function testGetLengthOfNationalDestinationCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js440function testGetCountryMobileToken() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js460function testGetSupportedGlobalNetworkCallingCodes() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js472function testGetSupportedCallingCodes() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js488function testGetSupportedTypesForRegion() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js509function testGetSupportedTypesForNonGeoEntity() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js523function testGetNationalSignificantNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js580function testGetExampleNumberForNonGeoEntity() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js587function testConvertAlphaCharactersInNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js598function testNormaliseRemovePunctuation() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js608function testNormaliseReplaceAlphaCharacters() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js634function testNormaliseStripAlphaCharacters() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js644function testNormaliseStripNonDiallableCharacters() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js811function testFormatOutOfCountryCallingNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js879function testFormatOutOfCountryWithInvalidRegion() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js892function testFormatOutOfCountryWithPreferredIntlPrefix() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js907function testFormatOutOfCountryKeepingAlphaChars() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1030function testFormatWithCarrierCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1060function testFormatWithPreferredCarrierCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1107function testFormatNumberForMobileDialing() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1363function testFormatNumberWithExtension() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1383function testFormatInOriginalFormat() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1811function testGetRegionCodeForCountryCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1819function testGetRegionCodeForNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1831function testGetRegionCodesForCountryCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1846function testGetCountryCodeForRegion() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js1856function testGetNationalDiallingPrefixForRegion() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2006function testIsPossibleNumberWithReason() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2331function testTruncateTooLongNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2414function testIsViablePhoneNumberNonAscii() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2426function testExtractPossibleNumber() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2450function testMaybeStripNationalPrefix() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2518function testMaybeStripInternationalPrefix() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2599function testMaybeExtractCountryCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2861function testParseNumberWithAlphaCharacters() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2925function testParseWithInternationalPrefixes() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js2985function testParseNationalNumberArgentina() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3071function testFailedParseOnInvalidNumbers() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3349function testParseNumbersWithPlusWithNoRegion() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3387function testParseNumberTooShortIfNationalPrefixStripped() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3555function testParseHandlesLongExtensionsWithExplicitLabels() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3613function testParseHandlesLongExtensionsWithAutoDiallingLabels() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3644function testParseHandlesShortExtensionsWithAmbiguousChar() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3674function testParseHandlesShortExtensionsWhenNotSureOfLabel() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3752function testParseItalianLeadingZeros() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3789function testParseWithPhoneContext() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3843function assertThrowsForInvalidPhoneContext(numberToParse) {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3851function testCountryWithNoNumberDesc() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3872function testUnknownCountryCallingCode() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3951function testIsNumberMatchShortMatchIfDiffNumLeadingZeros() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js3981function testIsNumberMatchAcceptsProtoDefaultsAsMatch() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js4003function testIsNumberMatchMatchesDiffLeadingZerosIfItalianLeadingZeroFalse() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js4029function testIsNumberMatchIgnoresSomeFields() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js4052function testIsNumberMatchNonMatches() {
LOWjavascript/i18n/phonenumbers/phonenumberutil_test.js4097function testIsNumberMatchNsnMatches() {
18 more matches not shown…
Decorative Section Separators14 hits · 42 pts
SeverityFileLineSnippet
MEDIUMcpp/CMakeLists.txt426#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt428#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt453#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt455#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt510#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt512#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt600#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt602#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt627#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt629#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt696#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt698#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt715#----------------------------------------------------------------
MEDIUMcpp/CMakeLists.txt717#----------------------------------------------------------------
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMjavascript/i18n/phonenumbers/phonenumber.pb.js544// Export getDescriptor static function robust to minification.
MEDIUM…8n/phonenumbers/metadata/regex/RegexGeneratorTest.java56 // Essentially create a "thin" wedge of specific non-determinism with the shorter (5-digit)
MEDIUM…oogle/i18n/phonenumbers/metadata/table/RangeTable.java717 // to avoid creating conflicting assignments for different values. Essentially we're trying to
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippet
LOW…oogle/i18n/phonenumbers/metadata/table/RangeTable.java701 // Step 1: Determine overlapping ranges from the index table, retaining minimum prefix length.
LOW…oogle/i18n/phonenumbers/metadata/table/RangeTable.java713 // Step 2: Determine the "prefix disjoint" ranges in a new table and simplify it.
LOW…oogle/i18n/phonenumbers/metadata/table/RangeTable.java780 // Step 3: Copy remaining overlapping ranges from the original table back into the result.
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOW…oogle/i18n/phonenumbers/metadata/regex/EdgeWriter.java113 // If the last thing we saw in this sequence was an "any" edge, don't forget to emit it.