Repository Analysis

bazelbuild/bazel

a fast, scalable, multi-language and extensible build system

4.9 Likely human-written View on GitHub
4.9
Adjusted Score
4.9
Raw Score
100%
Time Factor
2026-05-29
Last Push
25,442
Stars
Java
Language
511,571
Lines of Code
2264
Files
1939
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 9HIGH 65MEDIUM 154LOW 1711

Pattern Findings

1939 matches across 18 categories. Click a row to expand file-level details.

Over-Commented Block1255 hits · 1251 pts
SeverityFileLineSnippet
LOWcompile.sh1#!/usr/bin/env bash
LOWcombine_distfiles.py1# pylint: disable=g-bad-file-header
LOWcombine_distfiles_to_tar.sh1#!/bin/sh
LOWtools/upload_bazel_mirror.sh1#!/usr/bin/env bash
LOWtools/aquery_differ/aquery_differ.py1# Copyright 2020 The Bazel Authors. All rights reserved.
LOWtools/aquery_differ/aquery_differ_test.py1# pylint: disable=g-direct-third-party-import
LOWtools/aquery_differ/resolvers/path_fragment_resolver.py1# Copyright 2020 The Bazel Authors. All rights reserved.
LOWtools/aquery_differ/resolvers/dep_set_resolver.py1# Copyright 2018 The Bazel Authors. All rights reserved.
LOWtools/genrule/genrule-setup.sh1#!/usr/bin/env bash
LOWtools/launcher/empty.sh1#!/usr/bin/env bash
LOWtools/test/test-setup.sh1#!/usr/bin/env bash
LOWtools/test/test-setup.sh241start=$(date +%s)
LOWtools/test/collect_coverage.sh1#!/usr/bin/env bash
LOWtools/test/collect_coverage.sh101 # TODO: GCOV_PREFIX_STRIP=3 is incorrect on MacOS in the default setup
LOWtools/test/collect_coverage.sh121# too large (the combined merged jars for several big tests in a run
LOWtools/test/collect_coverage.sh221# --coverage_dir The absolute path of the directory where the
LOWtools/test/dummy.sh1#!/usr/bin/env bash
LOWtools/test/generate-xml.sh1#!/usr/bin/env bash
LOWtools/test/generate-xml.sh21DURATION_IN_SECONDS="$3"
LOWtools/test/generate-xml.sh41 # We can't use sed in UTF-8 mode, because it would fail on the first
LOWtools/test/generate-xml.sh61 # 4. Replace the string ']]>' with ']]>]]<![CDATA[>' to prevent escaping the
LOWtools/test/collect_cc_coverage.sh1#!/usr/bin/env bash
LOWtools/test/collect_cc_coverage.sh21#
LOWtools/test/collect_cc_coverage.sh121 # If the gcda file was not found we skip generating coverage from the gcno
LOWtools/test/collect_cc_coverage.sh141 # Invoke gcov to generate a code coverage report with the flags:
LOW…e/devtools/coverageoutputgenerator/BranchCoverage.java1// Copyright 2025 The Bazel Authors. All rights reserved.
LOW…/devtools/coverageoutputgenerator/LcovMergerFlags.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…om/google/devtools/coverageoutputgenerator/Parser.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…vtools/coverageoutputgenerator/SourceFileCoverage.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…gle/devtools/coverageoutputgenerator/LineCoverage.java1// Copyright 2025 The Bazel Authors. All rights reserved.
LOW…/google/devtools/coverageoutputgenerator/Coverage.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…oogle/devtools/coverageoutputgenerator/LcovParser.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…evtools/coverageoutputgenerator/BranchCoverageKey.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…vtools/coverageoutputgenerator/BranchCoverageItem.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…/com/google/devtools/coverageoutputgenerator/Main.java1// Copyright 2016 The Bazel Authors. All rights reserved.
LOW…oogle/devtools/coverageoutputgenerator/GcovParser.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…e/devtools/coverageoutputgenerator/GcovJsonParser.java1// Copyright 2020 The Bazel Authors. All rights reserved.
LOW…e/devtools/coverageoutputgenerator/build_and_upload.sh1#!/usr/bin/env bash
LOW…ogle/devtools/coverageoutputgenerator/LcovPrinter.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…google/devtools/coverageoutputgenerator/Constants.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…vtools/coverageoutputgenerator/BranchCoverageTest.java1// Copyright 2025 The Bazel Authors. All rights reserved.
LOW…gle/devtools/coverageoutputgenerator/CoverageTest.java1// Copyright 2016 The Bazel Authors. All rights reserved.
LOW…e/devtools/coverageoutputgenerator/GcovParserTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…/devtools/coverageoutputgenerator/LcovPrinterTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…devtools/coverageoutputgenerator/LineCoverageTest.java1// Copyright 2025 The Bazel Authors. All rights reserved.
LOW…tools/coverageoutputgenerator/LcovMergerTestUtils.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…e/devtools/coverageoutputgenerator/LcovParserTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…vtools/coverageoutputgenerator/GcovJsonParserTest.java1// Copyright 2025 The Bazel Authors. All rights reserved.
LOW…tools/coverageoutputgenerator/LcovMergerFlagsTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…/google/devtools/coverageoutputgenerator/MainTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOW…ls/coverageoutputgenerator/SourceFileCoverageTest.java1// Copyright 2018 The Bazel Authors. All rights reserved.
LOWtools/test/windows/tw.h1// Copyright 2018 The Bazel Authors. All rights reserved.
LOWtools/osx/xcode_locator_stub.sh1#!/usr/bin/env bash
LOWtools/osx/xcode_locator.m1// Copyright 2015 Google Inc. All rights reserved.
LOWtools/python/pywrapper_test.py1# pylint: disable=g-bad-file-header
LOWtools/python/pywrapper_template.txt21
LOWtools/python/runfiles/runfiles.py1# Copyright 2018 The Bazel Authors. All rights reserved.
LOWtools/jdk/proguard_allowlister_test.py1# Copyright 2015 The Bazel Authors. All rights reserved.
LOWtools/jdk/proguard_allowlister.py1# Copyright 2015 The Bazel Authors. All rights reserved.
LOWtools/compliance/packages_used_test.py1# Copyright 2023 The Bazel Authors. All rights reserved.
1195 more matches not shown…
Self-Referential Comments115 hits · 300 pts
SeverityFileLineSnippet
MEDIUMcompile.sh42# Create an initial binary so we can host ourself
MEDIUMtools/upload_bazel_mirror.sh48# Create a temp directory to hold the versioned tarball,
MEDIUMtools/test/test-setup.sh98# Create the test temp directory, which may not exist on the remote host when
MEDIUMtools/test/collect_coverage.sh135 # Create a paramsfile for invoking SingleJar.
MEDIUMtools/build_defs/hash/sha256_test.sh37# The following code produces a 120MB file (30*2^22 bytes)
MEDIUMthird_party/py/mock/docs/conf.py6# This file is execfile()d with the current directory set to its containing dir.
MEDIUMthird_party/py/concurrent/futures/_base.py442 # The following methods should only be used by Executors and in tests.
MEDIUMthird_party/py/abseil/absl/flags/argparse_flags.py15"""This module provides argparse integration with absl.flags.
MEDIUMthird_party/py/abseil/absl/flags/_helpers.py39# Define the allowed error rate in an input string to get suggestions.
MEDIUMthird_party/py/abseil/absl/flags/_helpers.py57# This module is explicitly added to this set so that we never consider it to
MEDIUMthird_party/py/abseil/absl/testing/xml_reporter.py54# This function is much more reliable.
MEDIUMthird_party/py/abseil/absl/testing/parameterized.py334 # Create a new dict to avoid modifying the supplied testcase_params.
MEDIUMthird_party/py/abseil/absl/testing/parameterized.py677# This function is kept CamelCase because it's used as a class's base class.
MEDIUMthird_party/py/abseil/absl/logging/__init__.py837 # Create a symlink to the log file with a canonical name.
MEDIUMthird_party/py/dataclasses/dataclasses/__init__.py286# This function is used instead of exposing Field creation directly,
MEDIUMthird_party/py/dataclasses/dataclasses/__init__.py510 # Create a comparison function. If the fields in the object are
MEDIUMthird_party/py/dataclasses/dataclasses/__init__.py820 # Create a class doc-string.
MEDIUMthird_party/py/dataclasses/dataclasses/__init__.py1051 # Create the new object, which calls __init__() and
MEDIUMthird_party/ijar/test/ijar_test.sh325# Create a huge (~2.2Gb) input jar to test "large file" correctness
MEDIUMthird_party/ijar/test/ijar_test.sh334# Create an output jar with upper bound on size > 2GB
MEDIUMscripts/bootstrap/build_windows_jni.sh38# Create a temp directory. It will used for the batch file we generate soon and
MEDIUMscripts/bootstrap/compile.sh199# Create the deploy JAR
MEDIUMscripts/bootstrap/compile.sh303 # Create the bazel_tools repository.
MEDIUMscripts/bootstrap/compile.sh361 # Create the rest of @bazel_tools//tools/...
MEDIUMscripts/bootstrap/buildenv.sh319# Create a link for a directory on the filesystem
MEDIUMscripts/ci/build.sh349# Create a debian package with version in package name and add it to the repo
MEDIUMscripts/release/relnotes.sh124# Create the release notes since commit $1 ($2...${[#]} are the cherry-picks,
MEDIUMscripts/release/relnotes.sh196# Create the revision information given a list of commits. The first
MEDIUMscripts/release/release.sh86# Create the release commit by changing the CHANGELOG file
MEDIUMscripts/release/release.sh132# Create a new release named "$1" with "$2" as the baseline commit.
MEDIUMscripts/packages/dmg/create_bazel_dmg.sh93# Create the dmg file
MEDIUMsrc/create_java_tools_release.sh70# Create a tmp directory to download the artifacts from GCS and compute their
MEDIUMsrc/upload_java_tools.sh79# Create a temp directory and a writable temp zip file to add a README.md file to
MEDIUMsrc/upload_java_tools.sh92# Create the README.md file and add the re-build java tools instructions.
MEDIUMsrc/tools/singlejar/zip64_huge_entry_test.sh67 # Create a single 4GB file
MEDIUMsrc/test/py/bazel/launcher_test.py727 # Create a directory with a path longer than 260
MEDIUMsrc/test/py/bazel/runfiles_test.py201 # Create a copy of the runfiles manifest, replacing
MEDIUMsrc/test/py/bazel/bazel_external_repository_test.py519 # Create a repository rule for bar that symlinks to foo's file.
MEDIUM…est/py/bazel/bzlmod/remote_repo_contents_cache_test.py823 # Create a repo with two BUILD files (one in a subpackage), build a target
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py102 # Create a project with deps on 'sss'
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py148 # Create a project with deps on 'sss'
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py183 # Create a project with deps on 'sss'
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py216 # Create a project with deps on the BCR's 'platforms' module
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py251 # Create a project with deps on the BCR's 'platforms' module
MEDIUMsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py291 # Create a project with an outdated direct dep on aaa
MEDIUMsrc/test/py/bazel/bzlmod/repo_contents_cache_test.py649 # Create the external file outside the workspace so it's not treated as
MEDIUMsrc/test/py/bazel/bzlmod/mod_command_test.py1078 # Create a lockfile and let the extension evaluations emit fixup warnings.
MEDIUMsrc/test/py/bazel/bzlmod/mod_command_test.py1420 # Create a lockfile and let the extension evaluations emit fixup warnings.
MEDIUMsrc/test/shell/unittest.bash61# This file provides utilities for assertions over the output of a
MEDIUMsrc/test/shell/testenv.sh227 # Create a shorter bazel root on Windows to avoid long path issue.
MEDIUMsrc/test/shell/integration/thread_dump_test.sh25 # Create a new workspace to ensure the output_base is clean
MEDIUMsrc/test/shell/integration/exec_group_test.sh673# Define the toolchains.
MEDIUMsrc/test/shell/integration/exec_group_test.sh703# Define the platforms.
MEDIUMsrc/test/shell/integration/exec_group_test.sh752 # Define a simple rule to put the aspect on.
MEDIUMsrc/test/shell/integration/exec_group_test.sh794# Define the toolchains.
MEDIUMsrc/test/shell/integration/exec_group_test.sh837 # Define a simple rule to put the aspect on.
MEDIUMsrc/test/shell/integration/platform_based_flags_test.sh77 # Create a transition on platform.
MEDIUM…test/shell/integration/starlark_configurations_test.sh900 # Define the flags that are used.
MEDIUMsrc/test/shell/integration/toolchain_test.sh176# Define the toolchain.
MEDIUMsrc/test/shell/integration/toolchain_test.sh255# Define the toolchain.
55 more matches not shown…
Hyper-Verbose Identifiers283 hits · 243 pts
SeverityFileLineSnippet
LOWtools/aquery_differ/aquery_differ.py117def _map_action_index_to_output_files(actions, artifacts):
LOWtools/aquery_differ/aquery_differ.py137def _map_output_files_to_input_artifacts(action_graph_container,
LOWtools/aquery_differ/aquery_differ.py172def _map_output_files_to_command_line(actions, action_index_to_output_files):
LOWtools/aquery_differ/aquery_differ_test.py54def make_aquery_output_with_dep_set(action_objs, artifact_objs,
LOWtools/aquery_differ/aquery_differ_test.py120 def test_no_difference_different_output_files_order(self):
LOWtools/aquery_differ/aquery_differ_test.py189 def test_first_has_extra_output_files(self):
LOWtools/aquery_differ/aquery_differ_test.py269 def test_different_command_lines(self):
LOWtools/python/pywrapper_test.py152 def test_no_interpreter_found(self):
LOWtools/python/pywrapper_test.py158 def test_error_getting_version(self):
LOWtools/python/pywrapper_test.py166 def test_interpreter_not_executable(self):
LOWtools/compliance/packages_used_test.py46 def test_found_remote_packages(self):
LOWtools/compliance/write_sbom.py144def maven_install_to_packages(maven_install: dict) -> dict:
LOWtools/android/instrumentation_test_check_test.py51 def test_extract_instrumentation_target_package(self):
LOWtools/android/instrumentation_test_check_test.py56 def test_extract_target_package(self):
LOWtools/android/instrumentation_test_check_test.py60 def test_target_package_check(self):
LOWtools/android/instrumentation_test_check_test.py66 def test_target_package_check_failure(self):
LOWtools/ctexplain/bazel_api.py130def _parse_cquery_result_line(line: str) -> ConfiguredTarget:
LOWtools/ctexplain/ctexplain.py98def _render_analysis_help_text() -> str:
LOWthird_party/py/mock/__init__.py808 def _format_mock_call_signature(self, args, kwargs):
LOWthird_party/py/mock/__init__.py813 def _format_mock_failure_message(self, args, kwargs):
LOWthird_party/py/mock/tests/testcallable.py89 def test_patch_spec_set_instance(self):
LOWthird_party/py/mock/tests/testcallable.py98 def test_patch_spec_callable_class(self):
LOWthird_party/py/mock/tests/testcallable.py151 def test_create_autospec_instance(self):
LOWthird_party/py/mock/tests/testmagicmethods.py22 def test_deleting_magic_methods(self):
LOWthird_party/py/mock/tests/testmagicmethods.py46 def test_magic_method_wrapping(self):
LOWthird_party/py/mock/tests/testmagicmethods.py60 def test_magic_methods_isolated_between_mocks(self):
LOWthird_party/py/mock/tests/testmagicmethods.py338 def test_non_default_magic_methods(self):
LOWthird_party/py/mock/tests/testmagicmethods.py348 def test_magic_methods_and_spec(self):
LOWthird_party/py/mock/tests/testmagicmethods.py373 def test_magic_methods_and_spec_set(self):
LOWthird_party/py/mock/tests/testmagicmethods.py398 def test_setting_unsupported_magic_method(self):
LOWthird_party/py/mock/tests/testmagicmethods.py408 def test_attributes_and_return_value(self):
LOWthird_party/py/mock/tests/testmagicmethods.py421 def test_magic_methods_are_magic_mocks(self):
LOWthird_party/py/mock/tests/testmagicmethods.py429 def test_magic_method_reset_mock(self):
LOWthird_party/py/mock/tests/testmagicmethods.py468 def test_descriptor_from_class(self):
LOWthird_party/py/mock/tests/testmagicmethods.py474 def test_iterable_as_iter_return_value(self):
LOWthird_party/py/mock/tests/testmock.py327 def test_attribute_access_returns_mocks(self):
LOWthird_party/py/mock/tests/testmock.py343 def test_attributes_have_name_and_parent_set(self):
LOWthird_party/py/mock/tests/testmock.py353 def test_method_calls_recorded(self):
LOWthird_party/py/mock/tests/testmock.py471 def test_exceptional_side_effect(self):
LOWthird_party/py/mock/tests/testmock.py479 def test_baseexceptional_side_effect(self):
LOWthird_party/py/mock/tests/testmock.py487 def test_assert_called_with_message(self):
LOWthird_party/py/mock/tests/testmock.py93 def test_return_value_in_constructor(self):
LOWthird_party/py/mock/tests/testmock.py175 def test_java_exception_side_effect(self):
LOWthird_party/py/mock/tests/testmock.py230 def test_reset_mock_recursion(self):
LOWthird_party/py/mock/tests/testmock.py272 def test_call_args_comparison(self):
LOWthird_party/py/mock/tests/testmock.py303 def test_assert_called_once_with(self):
LOWthird_party/py/mock/tests/testmock.py368 def test_method_calls_compare_easily(self):
LOWthird_party/py/mock/tests/testmock.py392 def test_only_allowed_methods_exist(self):
LOWthird_party/py/mock/tests/testmock.py445 def test_wraps_call_with_nondefault_return_value(self):
LOWthird_party/py/mock/tests/testmock.py531 def test_setting_attribute_with_spec_set(self):
LOWthird_party/py/mock/tests/testmock.py557 def test_spec_old_style_classes(self):
LOWthird_party/py/mock/tests/testmock.py571 def test_spec_set_old_style_classes(self):
LOWthird_party/py/mock/tests/testmock.py592 def test_subclass_with_properties(self):
LOWthird_party/py/mock/tests/testmock.py714 def test_assert_called_with_failure_message(self):
LOWthird_party/py/mock/tests/testmock.py916 def test_side_effect_iterator(self):
LOWthird_party/py/mock/tests/testmock.py940 def test_side_effect_setting_iterator(self):
LOWthird_party/py/mock/tests/testmock.py962 def test_side_effect_iterator_exceptions(self):
LOWthird_party/py/mock/tests/testmock.py972 def test_assert_has_calls_any_order(self):
LOWthird_party/py/mock/tests/testmock.py1082 def test_mock_calls_create_autospec(self):
LOWthird_party/py/mock/tests/testmock.py1154 def test_mock_add_spec_magic_methods(self):
223 more matches not shown…
Docstring Block Structure40 hits · 200 pts
SeverityFileLineSnippet
HIGHtools/ctexplain/bazel_api.py95Calls "bazel config" with the given config hash. Args: config_hash: A config hash as reported by "bazel cquer
HIGHtools/ctexplain/bazel_api.py168Strips a fully qualified Java class name to the file scope. Examples: - "A.B.OuterClass" -> "OuterClass" - "A
HIGHtools/ctexplain/lib.py23Gets a build invocation's configured targets. Args: bazel: API for invoking Bazel. labels: The targets to bui
HIGHthird_party/py/concurrent/futures/_base.py180An iterator over the given futures that yields each as it completes. Args: fs: The sequence of Futures (pos
HIGHthird_party/py/concurrent/futures/_base.py379Return the result of the call that the future represents. Args: timeout: The number of seconds to w
HIGHthird_party/py/concurrent/futures/_base.py410Return the exception raised by the call that the future represents. Args: timeout: The number of se
HIGHthird_party/py/concurrent/futures/_base.py524Returns a iterator equivalent to map(fn, iter). Args: fn: A callable that will take take as many ar
HIGHthird_party/py/abseil/absl/app.py189Registers help flags, parses arguments and shows usage if appropriate. This also calls sys.exit(0) if flag --only_che
HIGHthird_party/py/abseil/absl/flags/_validators.py84A function decorator for defining a flag validator. Registers the decorated function as a validator for flag_name, e.
HIGHthird_party/py/abseil/absl/flags/_validators.py160A function decorator for defining a multi-flag validator. Registers the decorated function as a validator for flag_na
HIGHthird_party/py/abseil/absl/flags/_flagvalues.py356Returns value if setting flag |name| to |value| returned True. Args: name: str, name of the flag to set.
HIGHthird_party/py/abseil/absl/flags/_flagvalues.py614Parses flags from argv; stores parsed flags into this FlagValues object. All unparsed arguments are returned.
HIGHthird_party/py/abseil/absl/flags/_flagvalues.py682Helper function to do the main argument parsing. This function goes through args and does the bulk of the flag pars
HIGHthird_party/py/abseil/absl/flags/_flagvalues.py1019Returns filename from a flagfile_str of form -[-]flagfile=filename. The cases of --flagfile foo and -flagfile foo s
HIGHthird_party/py/abseil/absl/flags/_flagvalues.py1109Processes command line args, but also allow args to be read from file. Args: argv: [str], a list of strings,
HIGHthird_party/py/abseil/absl/flags/_defines.py874Defines an alias flag for an existing one. Args: name: str, the flag name. original_name: str, the original f
HIGHthird_party/py/abseil/absl/flags/_helpers.py230Wraps a given text to a maximum line length and returns it. It turns lines that only contain whitespace into empty li
HIGHthird_party/py/abseil/absl/flags/_argument_parser.py112Parses the string argument and returns the native value. By default it returns its argument unmodified. Args:
HIGHthird_party/py/abseil/absl/flags/_argument_parser.py338Determines validity of argument and returns the correct element of enum. Args: argument: str, the supplied fl
HIGHthird_party/py/abseil/absl/flags/_argument_parser.py418Determines validity of argument and returns the correct element of enum. Args: argument: str or Enum class me
HIGHthird_party/py/abseil/absl/testing/absltest.py487Return a context manager for opening the file in text mode. Args: mode: The mode to open the file in. The "t"
HIGHthird_party/py/abseil/absl/testing/absltest.py511Return a context manager for opening the file in binary mode. Args: mode: The mode to open the file in. The "
HIGHthird_party/py/abseil/absl/testing/absltest.py1360Asserts that exception is thrown and predicate(exception) is true. Args: expected_exception: Exception class
HIGHthird_party/py/abseil/absl/testing/absltest.py1405Asserts that the message in a raised exception equals the given string. Unlike assertRaisesRegex, this method takes
HIGHthird_party/py/abseil/absl/testing/parameterized.py405Implementation of the parameterization decorators. Args: naming_type: The naming type. testcases: Testcase pa
HIGHthird_party/py/abseil/absl/testing/parameterized.py446A decorator for creating parameterized tests. See the module docstring for a usage example. Args: *testcases:
HIGHthird_party/py/abseil/absl/testing/parameterized.py465A decorator for creating parameterized tests. See the module docstring for a usage example. For every parameter tuple
HIGHthird_party/py/abseil/absl/testing/parameterized.py487A decorator for running tests over cartesian product of parameters values. See the module docstring for a usage examp
HIGHthird_party/py/abseil/absl/logging/converter.py116Converts an absl log level to a cpp log level. Args: level: int, an absl.logging level. Raises: TypeError:
HIGHthird_party/py/abseil/absl/logging/converter.py137Converts an integer level from the absl value to the standard value. Args: level: int, an absl.logging level.
HIGHthird_party/py/abseil/absl/logging/converter.py172Converts an integer level from the standard value to the absl value. Args: level: int, a Python standard logging
HIGHthird_party/py/abseil/absl/logging/converter.py203Converts an integer level from the standard value to the cpp value. Args: level: int, a Python standard logging l
HIGHthird_party/py/abseil/absl/logging/__init__.py648Computes the directory and filename prefix for log file. Args: program_name: str|None, the filename part of the p
HIGHthird_party/py/abseil/absl/logging/__init__.py761Skips reporting the prefix of a given function or name by :class:`~absl.logging.ABSLLogger`. This is a convenience wr
HIGHsrc/test/py/bazel/test_base.py132Extracts the version of a module from the default MODULE.bazel.lock file. Args: module: string; the name of t
HIGHsrc/test/py/bazel/test_base.py247Returns environment variable `name`. Args: name: string; name of the environment variable default: anyt
HIGHsrc/test/py/bazel/test_base.py301Returns the absolute path of `path` relative to self._test_cwd. Args: path: string; a path, relative to self.
HIGHsrc/test/py/bazel/test_base.py322Creates directories under the test's scratch directory. Args: path: string; a path, relative to the test's sc
HIGHsrc/test/py/bazel/test_base.py344Creates a file under the test's scratch directory. Args: path: string; a path, relative to the test's scratch
HIGHsrc/test/py/bazel/test_base.py377Copy a file to a path under the test's scratch directory. Args: src_path: string; a path, the file to copy
Hallucination Indicators9 hits · 115 pts
SeverityFileLineSnippet
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md56 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md102 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40:42
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md109 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md119 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md127 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md137 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICAL…/proguard/proguard6.2.2/docs/manual/retrace/mapping.md146 3040:3042:java.io.PrintWriter com.example.application.util.PrintWriterUtil.createPrintWriterOut(java.io.File):40
CRITICALsrc/test/shell/bazel/remote/remote_execution_test.sh965 myrunfiles = ctx.runfiles(files=ctx.attr.dir.default_runfiles.files.to_list())
CRITICAL…t/runner/testdata/system_exit_detecting_test_stack.txt5 at com.google.testing.junit.runner.ProgramThatCallsSystemExit.main(ProgramThatCallsSystemExit.java:XXX)
Cross-File Repetition18 hits · 90 pts
SeverityFileLineSnippet
HIGHthird_party/py/mock/__init__.py0add a spec to a mock. `spec` can either be an object or a list of strings. only attributes on the `spec` can be fetched
HIGHthird_party/py/mock/__init__.py0add a spec to a mock. `spec` can either be an object or a list of strings. only attributes on the `spec` can be fetched
HIGHthird_party/py/mock/__init__.py0add a spec to a mock. `spec` can either be an object or a list of strings. only attributes on the `spec` can be fetched
HIGHthird_party/py/abseil/absl/flags/argparse_flags.py0see https://docs.python.org/3/library/argparse.html#action-classes.
HIGHthird_party/py/abseil/absl/flags/argparse_flags.py0see https://docs.python.org/3/library/argparse.html#action-classes.
HIGHthird_party/py/abseil/absl/flags/argparse_flags.py0see https://docs.python.org/3/library/argparse.html#action-classes.
HIGHexamples/py_native/lib.py0a tiny example binary for the native python rules of bazel.
HIGHexamples/py_native/bin.py0a tiny example binary for the native python rules of bazel.
HIGHexamples/py_native/test.py0a tiny example binary for the native python rules of bazel.
HIGHexamples/py_native/fail.py0a tiny example binary for the native python rules of bazel.
HIGHsrc/test/shell/unittest_test.py0function test_abc() { : } function test_def() { echo "running def" } run_suite "tests to filter"
HIGHsrc/test/shell/unittest_test.py0function test_abc() { : } function test_def() { echo "running def" } run_suite "tests to filter"
HIGHsrc/test/shell/unittest_test.py0function test_abc() { : } function test_def() { echo "running def" } run_suite "tests to filter"
HIGHsrc/test/shell/bazel/local_repository_test.sh0genrule( name = "rewrite", cmd = "echo bar > \$@", outs = ["rewrite.out"], )
HIGHsrc/test/shell/bazel/local_repository_test.sh0genrule( name = "rewrite", cmd = "echo bar > \$@", outs = ["rewrite.out"], )
HIGHsrc/test/shell/bazel/local_repository_test.sh0genrule( name = "rewrite", cmd = "echo bar > \$@", outs = ["rewrite.out"], )
HIGHsrc/test/shell/bazel/local_repository_test.sh0genrule( name = "rewrite", cmd = "echo bar > \$@", outs = ["rewrite.out"], )
HIGHsrc/test/shell/bazel/local_repository_test.sh0genrule( name = "rewrite", cmd = "echo bar > \$@", outs = ["rewrite.out"], )
Decorative Section Separators26 hits · 80 pts
SeverityFileLineSnippet
MEDIUMtools/test/collect_coverage.sh93# --------------------------------------
MEDIUMthird_party/py/mock/docs/conf.py24# ---------------------
MEDIUMthird_party/py/mock/docs/conf.py111# -----------------------
MEDIUMthird_party/py/mock/docs/conf.py179# ------------------------
MEDIUMsite/en/external/migration_tool.md156# -------------------
MEDIUMsite/en/external/migration_tool.md165# -------------------
MEDIUMsite/en/external/migration_tool.md174# -------------------
MEDIUMsite/en/external/migration_tool.md181# -------------------
MEDIUMsite/en/external/migration_tool.md217# -------------------
MEDIUMsrc/test/shell/unittest.bash23# ------------------------------------------------------------------------
MEDIUMsrc/test/shell/unittest.bash43# ------------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/jvm_flags_escaping_test.sh47# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/jvm_flags_escaping_test.sh49# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/jvm_flags_escaping_test.sh236# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/jvm_flags_escaping_test.sh238# ----------------------------------------------------------------------
MEDIUM…/shell/integration/starlark_dependency_pruning_test.sh175# ----------------------------------------------------------------------
MEDIUM…/shell/integration/starlark_dependency_pruning_test.sh177# ----------------------------------------------------------------------
MEDIUM…/shell/integration/starlark_dependency_pruning_test.sh200# ----------------------------------------------------------------------
MEDIUM…/shell/integration/starlark_dependency_pruning_test.sh202# ----------------------------------------------------------------------
MEDIUM…test/shell/integration/config_stripped_outputs_test.sh22# -------------------
MEDIUMsrc/test/shell/integration/py_args_escaping_test.sh43# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/py_args_escaping_test.sh45# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/py_args_escaping_test.sh201# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/integration/py_args_escaping_test.sh203# ----------------------------------------------------------------------
MEDIUMsrc/test/shell/bazel/run_test.sh43# ------------------------------------------------------------------------------
MEDIUMsrc/test/shell/bazel/run_test.sh45# ------------------------------------------------------------------------------
Unused Imports67 hits · 60 pts
SeverityFileLineSnippet
LOWtools/python/pywrapper_test.py16
LOWtools/build_defs/hash/sha256.py18
LOWtools/build_defs/hash/sha256.py19
LOWtools/build_defs/hash/sha256.py20
LOWthird_party/py/frozendict/frozendict/__init__.py2
LOWthird_party/py/frozendict/frozendict/__init__.py3
LOWthird_party/py/frozendict/frozendict/__init__.py4
LOWthird_party/py/mock/tests/support.py6
LOWthird_party/py/mock/tests/support.py8
LOWthird_party/py/mock/tests/testmagicmethods.py14
LOWthird_party/py/mock/tests/support_with.py1
LOWthird_party/py/mock/tests/support_with.py9
LOWthird_party/py/mock/tests/testwith.py4
LOWthird_party/py/mock/tests/_testwith.py5
LOWthird_party/py/concurrent/futures/_base.py4
LOWthird_party/py/concurrent/futures/_base.py5
LOWthird_party/py/concurrent/futures/thread.py6
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py8
LOWthird_party/py/concurrent/futures/__init__.py17
LOWthird_party/py/concurrent/futures/__init__.py18
LOWthird_party/py/concurrent/futures/process.py46
LOWthird_party/py/abseil/absl/app.py30
LOWthird_party/py/abseil/absl/flags/__init__.py28
LOWthird_party/py/abseil/absl/flags/__init__.py29
LOWthird_party/py/abseil/absl/flags/__init__.py30
LOWthird_party/py/abseil/absl/flags/__init__.py32
LOWthird_party/py/abseil/absl/flags/__init__.py33
LOWthird_party/py/abseil/absl/flags/_defines.py32
LOWthird_party/py/abseil/absl/flags/_defines.py32
LOWthird_party/py/abseil/absl/flags/_defines.py32
LOWthird_party/py/abseil/absl/flags/_defines.py37
LOWthird_party/py/abseil/absl/testing/absltest.py26
LOWthird_party/py/abseil/absl/testing/absltest.py43
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/testing/absltest.py67
LOWthird_party/py/abseil/absl/logging/__init__.py93
LOWthird_party/py/abseil/absl/logging/__init__.py100
LOWscripts/generate_fish_completion.py16
LOWscripts/generate_fish_completion.py17
LOWscripts/generate_fish_completion.py18
LOWscripts/docs/rewriter_test.py15
7 more matches not shown…
Deep Nesting53 hits · 50 pts
SeverityFileLineSnippet
LOWcombine_distfiles.py28
LOWtools/aquery_differ/aquery_differ.py263
LOWtools/build_defs/pkg/archive_test.py27
LOWtools/build_defs/pkg/build_tar.py56
LOWthird_party/py/mock/__init__.py754
LOWthird_party/py/mock/__init__.py1176
LOWthird_party/py/mock/__init__.py1247
LOWthird_party/py/mock/__init__.py1988
LOWthird_party/py/mock/__init__.py2028
LOWthird_party/py/mock/__init__.py1182
LOWthird_party/py/mock/tests/testmock.py1016
LOWthird_party/py/mock/tests/testmock.py1101
LOWthird_party/py/mock/tests/support_with.py13
LOWthird_party/py/concurrent/futures/_base.py158
LOWthird_party/py/concurrent/futures/_base.py179
LOWthird_party/py/concurrent/futures/_base.py237
LOWthird_party/py/concurrent/futures/thread.py79
LOWthird_party/py/concurrent/futures/process.py192
LOWthird_party/py/abseil/absl/flags/_flagvalues.py516
LOWthird_party/py/abseil/absl/flags/_flagvalues.py681
LOWthird_party/py/abseil/absl/flags/_flagvalues.py1003
LOWthird_party/py/abseil/absl/flags/_flagvalues.py1041
LOWthird_party/py/abseil/absl/flags/_flagvalues.py1108
LOWthird_party/py/abseil/absl/flags/_helpers.py201
LOWthird_party/py/abseil/absl/flags/_helpers.py286
LOWthird_party/py/abseil/absl/flags/_helpers.py205
LOWthird_party/py/abseil/absl/flags/_argument_parser.py206
LOWthird_party/py/abseil/absl/flags/_argument_parser.py247
LOWthird_party/py/abseil/absl/flags/_argument_parser.py268
LOWthird_party/py/abseil/absl/testing/_bazelize_command.py24
LOWthird_party/py/abseil/absl/testing/absltest.py1823
LOWthird_party/py/abseil/absl/testing/absltest.py1896
LOWthird_party/py/abseil/absl/testing/absltest.py2431
LOWthird_party/py/abseil/absl/testing/parameterized.py310
LOWthird_party/py/abseil/absl/testing/parameterized.py314
LOWthird_party/py/abseil/absl/logging/converter.py171
LOWthird_party/py/dataclasses/dataclasses/__init__.py355
LOWthird_party/py/dataclasses/dataclasses/__init__.py427
LOWthird_party/py/dataclasses/dataclasses/__init__.py965
LOWscripts/docs/create_release_docs.py133
LOWscripts/packages/debian/generate_changelog.py22
LOWsrc/create_embedded_tools.py124
LOWsrc/create_embedded_tools_lib.py34
LOWsrc/test/py/bazel/first_time_use_test.py31
LOWsrc/test/py/bazel/test_wrapper_test.py265
LOWsrc/test/py/bazel/test_wrapper_test.py306
LOWsrc/test/py/bazel/test_wrapper_test.py354
LOWsrc/test/py/bazel/test_wrapper_test.py606
LOWsrc/test/py/bazel/test_base.py31
LOWsrc/test/py/bazel/bzlmod/repo_contents_cache_test.py44
LOWsrc/test/py/bazel/bzlmod/mod_command_test.py747
LOWsrc/test/shell/bazel/testing_server.py134
LOWsrc/test/shell/bazel/remote/uds_proxy.py41
AI Slop Vocabulary16 hits · 32 pts
SeverityFileLineSnippet
LOWtools/test/test-setup.sh124 # If the file path is already fully specified, simply return it.
LOWtools/test/test-setup.sh127 # If the file exists in the $TEST_SRCDIR then just use it.
LOWthird_party/py/mock/tests/testmock.py772 # need to do this because MagicMock.mock_calls used to just return
LOWthird_party/py/abseil/absl/flags/_helpers.py165 # Returning an int as default is fine, int(int) just return the int.
LOWthird_party/py/abseil/absl/logging/__init__.py218 # just return a copy.
LOWthird_party/py/dataclasses/dataclasses/__init__.py346 # via object.__setattr__. Otherwise, just use a simple
LOW…est/py/bazel/bzlmod/remote_repo_contents_cache_test.py148 # Deleting the cache fails on Windows, so we just use a different directory.
MEDIUMsrc/test/shell/unittest.bash95 # be absolute to be robust against
LOWsrc/test/shell/unittest.bash248# the stack because they just add noise.) Also prints the contents of
LOWsrc/test/shell/unittest.bash276# the stack because they just add noise.)
MEDIUMsrc/test/shell/integration/execution_phase_tests.sh109 # We cannot make any robust assertions on the first run because of implicit
MEDIUM…est/shell/integration/param_file_flag_per_line_test.sh17# Tests Starlark API pertaining to action inspection via aspect.
MEDIUMsrc/test/shell/integration/action_aspect_test.sh17# Tests Starlark API pertaining to action inspection via aspect.
MEDIUMsrc/test/shell/bazel/coverage_helpers.sh67 # Replace newlines with commas to facilitate the assertion.
LOWsrc/test/shell/bazel/bazel_test_test.sh415 # We don't just use the local PATH, but use the test's PATH, which is more restrictive.
LOWsrc/test/shell/bazel/jdeps_test.sh71 # If jdeps fails with a NPE, just add the class file to the list in
Redundant / Tautological Comments20 hits · 30 pts
SeverityFileLineSnippet
LOWtools/test/test-setup.sh70# Set USER to the current user, unless passed by Bazel via --test_env.
LOW…party/py/abseil/absl/testing/_pretty_print_reporter.py71 # Set this to true at the class or instance level to run tests using a
LOWthird_party/py/abseil/absl/testing/xml_reporter.py151 # Check if it's something like "setUpClass (__main__.TestCase)".
LOWthird_party/py/abseil/absl/testing/parameterized.py586 # Check if the base has _test_params_reprs first, then check if it's a
LOWthird_party/py/dataclasses/dataclasses/__init__.py568 # Check if this is an InitVar.
LOWscripts/bash_completion_test.sh39# Set this to test completion with package path (if enabled)
LOWscripts/bootstrap/build_windows_jni.sh48 # Check if BAZEL_VC points to Visual C++ Build Tools 2019
LOWscripts/bootstrap/build_windows_jni.sh65# Check if Visual Studio 2019 is installed. Look for it at the default
LOWscripts/bootstrap/buildenv.sh21# Check if all necessary tools are available.
LOWsrc/test/py/bazel/bazel_windows_test.py247 # Set BAZEL_VC to a non-existing path,
LOWsrc/test/py/bazel/bazel_windows_test.py304 # Set BAZEL_VC to a non-existing path,
LOWsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py979 # Set version to old
LOWsrc/test/shell/shell_utils.sh47# Print the result to stdout.
LOWsrc/test/shell/unittest.bash170# Check if the script path is absolute, if not prefix the PWD.
LOWsrc/test/shell/unittest_utils.sh30# Print message in "$1" then exit with status "$2"
LOWsrc/test/shell/unittest_utils.sh67# Print message in "$1" then record that a non-fatal error occurred in
LOWsrc/test/shell/integration/java_integration_test.sh293 # Set javabase to an absolute path.
LOWsrc/test/shell/integration/build_event_stream_test.sh1558 # Check if null builds still have build metrics
LOWsrc/test/shell/bazel/cc_integration_test.sh2211 # Check if clang version is less than 17
LOWsrc/test/shell/bazel/bazel_cc_code_coverage_test.sh31# Check if all the tools required by CC coverage are installed.
Cross-Language Confusion6 hits · 25 pts
SeverityFileLineSnippet
HIGHtools/ctexplain/bazel_api.py138 "<label> (null)"
HIGHscripts/generate_fish_completion.py178 params.append("({} query -k '{}' 2>/dev/null)".format(_BAZEL, query))
HIGHsrc/test/py/bazel/bzlmod/bazel_repo_mapping_test.py234source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
HIGHsrc/test/py/bazel/bzlmod/bazel_repo_mapping_test.py235 source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
HIGHsrc/test/py/bazel/bzlmod/bazel_lockfile_test.py656 # resolution doesn't rerun (its event is null), the lockfile is still
HIGHsrc/test/shell/unittest_test.py35if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
Excessive Try-Catch Wrapping12 hits · 21 pts
SeverityFileLineSnippet
LOWthird_party/py/mock/tests/_testwith.py31 except Exception:
MEDIUMthird_party/py/mock/tests/_testwith.py26def test_with_statement_exception(self):
LOWthird_party/py/concurrent/futures/_base.py301 except Exception:
LOWthird_party/py/abseil/absl/app.py328 except Exception as e:
LOWthird_party/py/abseil/absl/app.py376 except Exception: # pylint: disable=broad-except
LOWthird_party/py/abseil/absl/testing/absltest.py2079 except Exception as e: # pylint: disable=broad-except
LOWscripts/release/relnotes.py191 except Exception: # pylint: disable=broad-exception-caught
MEDIUMscripts/release/relnotes.py192 print("Error: Not a release branch.")
MEDIUM.github/scripts/check_ssl.py49 print(f"Error: Config file not found at {self.config_path}")
MEDIUM.github/scripts/check_ssl.py57 print(f"Error parsing YAML config: {exc}")
MEDIUM.github/scripts/check_ssl.py132 print("Error: No domains found in config.")
MEDIUM…n/java/com/google/devtools/common/options/Options.java37 * System.err.print("Error parsing options: " + e.getMessage());
Slop Phrases7 hits · 10 pts
SeverityFileLineSnippet
LOWtools/test/generate-xml.sh35 # make sure to append a whitespace in step #1.
MEDIUMthird_party/py/abseil/absl/flags/argparse_flags.py21Here is a simple example::
MEDIUMscripts/ci/ci.sh35# you can replace origin/master in the COMMIT_RANGE variable initialization
LOW.github/ISSUE_TEMPLATE/feature_request.yml26 description: Help us triage this issue faster and more accurately to the relevant team(s). Check the [team labels
LOW.github/ISSUE_TEMPLATE/bug_report.yml26 description: Help us triage this issue faster and more accurately to the relevant team(s). Check the [team labels
LOW…main/java/net/starlark/java/eval/MethodDescriptor.java446 @CheckReturnValue // don't forget to throw it
LOWsrc/main/java/net/starlark/java/eval/Starlark.java939 @CheckReturnValue // don't forget to throw it
Example Usage Blocks5 hits · 8 pts
SeverityFileLineSnippet
LOWthird_party/py/mock/tests/testmock.py334 # Usage example
LOWscripts/bootstrap/buildenv.sh353# Usage:
LOWsrc/zip_builtins.sh20# Usage:
LOWsrc/test/shell/unittest_utils.sh143# Usage:
LOWsrc/test/shell/unittest_utils.sh174# Usage:
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHthird_party/py/abseil/absl/testing/absltest.py2441 # Set up --failfast as requested in environment
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippet
LOWscripts/docs/testdata/input/markdown_with_html.md6Lorem ipsum [short link](/foo/bar). Or rather a [long link](https://bazel.build/foo/bar)?
LOW…ts/docs/testdata/expected_output/markdown_with_html.md8Lorem ipsum [short link](/versions/6.6.6/foo/bar). Or rather a [long link](https://bazel.build/versions/6.6.6/foo/bar)?
LOWsrc/test/py/bazel/test_wrapper_test.py55 ' "@echo lorem ipsum",',
LOWsrc/test/py/bazel/test_wrapper_test.py277 if line.startswith('lorem ipsum'):
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWthird_party/py/mock/tests/testhelpers.py684 def test_function(self):
LOWthird_party/py/abseil/absl/testing/absltest.py2158 def main_function(argv):