Repository Analysis

google/googletest

GoogleTest - Google Testing and Mocking Framework

9.8 Low AI signal View on GitHub
9.8
Adjusted Score
9.8
Raw Score
100%
Time Factor
2026-05-26
Last Push
38,655
Stars
C++
Language
53,444
Lines of Code
123
Files
530
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 11MEDIUM 2LOW 517

Pattern Findings

530 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block506 hits · 450 pts
SeverityFileLineSnippet
LOWci/macos-presubmit.sh1#!/bin/bash
LOWci/macos-presubmit.sh21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LOWci/linux-presubmit.sh1#!/bin/bash
LOWci/linux-presubmit.sh21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LOWgoogletest/CMakeLists.txt1########################################################################
LOWgoogletest/CMakeLists.txt181#
LOWgoogletest/test/gtest_xml_output_unittest.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-param-test-test.h1// Copyright 2008, Google Inc.
LOWgoogletest/test/googletest-param-test-test.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
LOWgoogletest/test/googletest-output-test.py1#!/usr/bin/env python
LOW…etest/test/googletest-param-test-invalid-name1-test.py1#!/usr/bin/env python
LOWgoogletest/test/gtest_help_test.py1#!/usr/bin/env python
LOWgoogletest/test/gtest_help_test.py21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LOW…gletest/test/googletest-global-environment-unittest.py1# Copyright 2021 Google Inc. All Rights Reserved.
LOWgoogletest/test/gtest_test_utils.py1# Copyright 2006, Google Inc.
LOWgoogletest/test/gtest_json_test_utils.py1# Copyright 2018, Google Inc.
LOW…etest/test/googletest-param-test-invalid-name2-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-json-output-unittest.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-break-on-failure-unittest.py1#!/usr/bin/env python
LOW…etest/test/googletest-fail-if-no-test-selected-test.py1#!/usr/bin/env python3 # pylint: disable=g-interpreter-mismatch
LOW…etest/test/googletest-fail-if-no-test-selected-test.py21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LOWgoogletest/test/googletest-setuptestsuite-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-list-tests-unittest.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-env-var-test.py1#!/usr/bin/env python
LOW…gletest/test/googletest-fail-if-no-test-linked-test.py1#!/usr/bin/env python3 # pylint: disable=g-interpreter-mismatch
LOW…gletest/test/googletest-fail-if-no-test-linked-test.py21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LOWgoogletest/test/gtest_xml_outfiles_test.py1#!/usr/bin/env python
LOWgoogletest/test/gtest-typed-test_test.h1// Copyright 2008 Google Inc.
LOWgoogletest/test/gtest-typed-test_test.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
LOWgoogletest/test/gtest_list_output_unittest.py1#!/usr/bin/env python
LOWgoogletest/test/gtest_xml_test_utils.py1# Copyright 2006, Google Inc.
LOWgoogletest/test/production.h1// Copyright 2006, Google Inc.
LOWgoogletest/test/production.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
LOWgoogletest/test/googletest-color-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-filter-unittest.py1#!/usr/bin/env python
LOWgoogletest/test/gtest_skip_check_output_test.py1#!/usr/bin/env python
LOWgoogletest/test/gtest_testbridge_test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-throw-on-failure-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-shuffle-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-shuffle-test.py21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
LOWgoogletest/test/googletest-uninitialized-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-catch-exceptions-test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-json-outfiles-test.py1#!/usr/bin/env python
LOW…etest/test/gtest_skip_environment_check_output_test.py1#!/usr/bin/env python
LOWgoogletest/test/googletest-failfast-unittest.py1#!/usr/bin/env python
LOWgoogletest/include/gtest/gtest-matchers.h1// Copyright 2007, Google Inc.
LOWgoogletest/include/gtest/gtest-matchers.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
LOWgoogletest/include/gtest/gtest-matchers.h41
LOWgoogletest/include/gtest/gtest-matchers.h141class [[nodiscard]] MatcherInterface : public MatcherDescriberInterface {
LOWgoogletest/include/gtest/gtest-matchers.h161 // as it is useful information to the reader; on the other hand, an
LOWgoogletest/include/gtest/gtest-matchers.h681//
LOWgoogletest/include/gtest/gtest-matchers.h921}
LOWgoogletest/include/gtest/gtest-death-test.h1// Copyright 2005, Google Inc.
LOWgoogletest/include/gtest/gtest-death-test.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
LOWgoogletest/include/gtest/gtest-death-test.h41#define GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
LOWgoogletest/include/gtest/gtest-death-test.h61// tests. IMPORTANT: This is an internal utility. Using it may break the
LOWgoogletest/include/gtest/gtest-death-test.h81//
LOWgoogletest/include/gtest/gtest-death-test.h101//
LOWgoogletest/include/gtest/gtest-death-test.h121// learn wherever you come from. In the following: 'A' denotes a
LOWgoogletest/include/gtest/gtest-death-test.h141// A* matches 0 or many occurrences of A
446 more matches not shown…
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippet
HIGH…etest/test/googletest-param-test-invalid-name1-test.py0verifies that google test warns the user when not initialized properly.
HIGH…etest/test/googletest-param-test-invalid-name2-test.py0verifies that google test warns the user when not initialized properly.
HIGHgoogletest/test/googletest-uninitialized-test.py0verifies that google test warns the user when not initialized properly.
HIGH…etest/test/googletest-param-test-invalid-name1-test.py0runs the given command and verifies its exit code and output.
HIGH…etest/test/googletest-param-test-invalid-name2-test.py0runs the given command and verifies its exit code and output.
HIGHgoogletest/test/googletest-uninitialized-test.py0runs the given command and verifies its exit code and output.
HIGHgoogletest/test/googletest-env-var-test.py0sets the env variable to 'value'; unsets it when 'value' is none.
HIGHgoogletest/test/googletest-color-test.py0sets the env variable to 'value'; unsets it when 'value' is none.
HIGHgoogletest/test/googletest-filter-unittest.py0sets the env variable to 'value'; unsets it when 'value' is none.
HIGHgoogletest/test/googletest-failfast-unittest.py0sets the env variable to 'value'; unsets it when 'value' is none.
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMgoogletest/include/gtest/gtest-death-test.h152// This implementation is *not* meant to be as highly tuned or robust
MEDIUMgoogletest/include/gtest/gtest-death-test.h224// In practice, this can be used to test functions that utilize the
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHgoogletest/test/gtest_test_utils.py200Changes into a specified directory, if provided, and executes a command. Restores the old directory afterwards.
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippet
LOWgoogletest/test/gtest_json_test_utils.py35
LOWgoogletest/test/gtest_json_test_utils.py46
LOWgoogletest/test/gtest_xml_test_utils.py131
LOWgoogletest/test/gtest_xml_test_utils.py186
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippet
LOWgoogletest/test/gtest_help_test.py130 def test_prints_help_with_full_flag(self):
LOWgoogletest/test/gtest_help_test.py157 def test_runs_tests_without_help_flag(self):
LOWgoogletest/test/gtest_help_test.py168 def test_runs_tests_with_gtest_internal_flag(self):
Unused Imports2 hits · 2 pts
SeverityFileLineSnippet
LOWgoogletest/test/gtest_xml_outfiles_test.py35
LOWgoogletest/test/gtest_xml_test_utils.py33
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWgoogletest/test/googletest-filter-unittest.py69# Check if this platform can unset environment variables in child processes.
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippet
LOWdocs/reference/mocking.md278 .WillRepeatedly(Return("John Doe")); // Return "John Doe" on all calls