Repository Analysis

sharkdp/bat

A cat(1) clone with wings.

2.7 Likely human-written View on GitHub
2.7
Adjusted Score
2.7
Raw Score
100%
Time Factor
2026-05-20
Last Push
59,080
Stars
Rust
Language
60,931
Lines of Code
449
Files
174
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 14LOW 159

Pattern Findings

174 matches across 12 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers115 hits · 78 pts
SeverityFileLineSnippet
LOWtests/snapshots/generate_snapshots.py52def undo_sample_file_modification():
LOWtests/syntax-tests/compare_highlighted_versions.py10def compare_highlighted_versions(root_old, root_new):
LOWtests/syntax-tests/create_highlighted_versions.py43def create_highlighted_version(args):
LOWtests/syntax-tests/create_highlighted_versions.py81def create_highlighted_versions(output_basepath):
LOWtests/syntax-tests/source/Ruby/output.rb53 def find_repeated_substring_file(file_path)
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py635 def test_ellipsis_subscript_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py642 def test_empty_subscript_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py649 def test_invalid_subscript_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7317 def test_multiarray_writable_attributes_deletion(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7326 def test_multiarray_not_writable_attributes_deletion(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7334 def test_multiarray_flags_writable_attribute_deletion(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7340 def test_multiarray_flags_not_writable_attribute_deletion(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7450def test_flat_element_deletion():
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7461def test_scalar_element_deletion():
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7918 def test_empty_bstring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7921 def test_whitespace_bstring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7926 def test_all_null_bstring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7931 def test_null_inside_bstring_array_is_truthy(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7967 def test_empty_ustring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7970 def test_whitespace_ustring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7975 def test_all_null_ustring_array_is_falsey(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7980 def test_null_inside_ustring_array_is_truthy(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py121 def test_writeable_from_readonly(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py132 def test_writeable_from_buffer(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py161 def test_writeable_from_c_data(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py472 def test_assignment_broadcasting(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py532 def test_stringlike_empty_list(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py547 def test_longdouble_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py733 def test_invalid_subscript_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py761 def test_overlapping_assignment(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py899 def test_zeros_like_like_zeros(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py939 def test_sequence_non_homogenous(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py948 def test_non_sequence_sequence(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1080 def test_array_of_ragged_array(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1093 def test_deep_nonragged_object(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1100 def test_subarray_field_access(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1378 def test_structuredscalar_indexing(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1440 def test_count_nonzero_unaligned(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1555 def test_pickle_with_buffercallback(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1792 def test_sort_complex_byte_swapping(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2248 def test_searchsorted_unicode(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2275 def test_searchsorted_with_invalid_sorter(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2289 def test_searchsorted_with_sorter(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2366 def test_searchsorted_return_type(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2378 def test_argpartition_out_of_range(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2389 def test_partition_out_of_range(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2400 def test_argpartition_integer(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2418 def test_partition_empty_array(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2428 def test_argpartition_empty_array(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2749 def test_partition_unicode_kind(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2956 def test_dot_matmul_inner_array_casting_fails(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3002 def test_diagonal_view_notwriteable(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3297 def test__complex__should_not_work(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3362 def test_ufunc_binop_interaction(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3546 def test_ufunc_override_normalize_signature(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3631 def test_pow_override_with_errors(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3652 def test_pow_array_object_dtype(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3685 def test_pos_array_ufunc_override(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3698 def test_extension_incref_elide(self):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3713 def test_extension_incref_elide_stack(self):
55 more matches not shown…
Decorative Section Separators8 hits · 24 pts
SeverityFileLineSnippet
MEDIUMtests/syntax-tests/source/Bash/batgrep.sh2# -----------------------------------------------------------------------------
MEDIUMtests/syntax-tests/source/Bash/batgrep.sh7# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh24# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh26# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh143# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh145# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh224# -----------------------------------------------------------------------------
MEDIUMdiagnostics/info.sh226# -----------------------------------------------------------------------------
Over-Commented Block24 hits · 23 pts
SeverityFileLineSnippet
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3701 #
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py5441 # this needs definition as there are lots places along the line
LOWtests/benchmarks/highlighting-speed-src/jquery.js1241 // Regex strategy adopted from Diego Perini
LOWtests/benchmarks/highlighting-speed-src/jquery.js4081 // 1. The entire cache object
LOWtests/benchmarks/highlighting-speed-src/jquery.js10301
LOWtests/scripts/find-slow-to-highlight-files.py1#!/usr/bin/env python3
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt41# ^^^^^ constant.other
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt61# ^^^^^^^^^^^^^^^ - comment.line
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt81#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.underline.link.url
LOWsrc/error.rs21 #[error("unable to detect syntax for {0}")]
LOWsrc/terminal.rs21 0x04 => Color::Blue,
LOWsrc/lib.rs1//! `bat` is a library to print syntax highlighted content.
LOWsrc/theme.rs41
LOWsrc/theme.rs61/// ```
LOWsrc/style.rs181 ///
LOWsrc/syntax_mapping.rs41
LOWsrc/syntax_mapping.rs121 ///
LOWsrc/vscreen.rs61
LOWsrc/assets.rs121 file_name: impl AsRef<Path>,
LOWsrc/nonprintable_notation.rs1/// How to print non-printable characters with
LOWsrc/bin/bat/config.rs61
LOWsrc/syntax_mapping/builtin.rs21//
LOWsrc/syntax_mapping/builtin.rs41// `GlobMatcher` for rules that they have previously visited.
LOWsrc/assets/assets_metadata.rs41 ///
Excessive Try-Catch Wrapping6 hits · 10 pts
SeverityFileLineSnippet
MEDIUMtests/syntax-tests/compare_highlighted_versions.py74 print("Error: files with changes have been found")
MEDIUMtests/syntax-tests/source/Swift/test.swift161 print("Error creating a file \(destinationFileUrl) : \(writeError)")
MEDIUMtests/syntax-tests/source/Swift/test.swift165 print("Error took place while downloading a file. Error description: %@", error?.localizedDescription);
MEDIUM…hmarks/highlighting-speed-src/numpy_test_multiarray.py328def make_array(size, offset, strides):
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7457 except Exception:
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py332 except Exception as e:
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALtests/benchmarks/highlighting-speed-src/jquery.js7622jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippet
LOWtests/integration_tests.rs3197 .write_stdin("Lorem Ipsum")
LOWtests/integration_tests.rs3200 .stdout("\x1B[48;2;208;218;231mLorem Ipsum\x1B[0m")
LOWtests/integration_tests.rs3217 .write_stdin("Lorem Ipsum")
LOWtests/integration_tests.rs3220 .stdout("\x1B[48;2;33;48;67mLorem Ipsum\x1B[0m")
LOWtests/integration_tests.rs4074 .args(["config", "user.email", "test@test.com"])
LOWtests/syntax-tests/highlighted/HTML/test.html19 Lorem <strong>[38;2;
LOWtests/syntax-tests/source/HTML/test.html19 Lorem <strong>ipsum</strong> dolor sit amet consectetur adipisicing
LOWtests/syntax-tests/source/PHP/test.php103$doe->setName('John Doe');
Unused Imports3 hits · 3 pts
SeverityFileLineSnippet
LOWtests/syntax-tests/source/Python/battest.py1
LOWtests/syntax-tests/source/Python/battest.py3
LOWtests/syntax-tests/source/Python/battest.py4
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM…hmarks/highlighting-speed-src/numpy_test_multiarray.py3406 # Create an object with the given base, in the given module, with a
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMtests/benchmarks/highlighting-speed-src/jquery.js10313// understands anonymous AMD modules. A named AMD is safest and most robust
Deep Nesting5 hits · 2 pts
SeverityFileLineSnippet
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3210
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3362
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py4477
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py8413
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3433
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/syntax-tests/create_highlighted_versions.py56 env["COLORTERM"] = "truecolor" # make sure to output 24bit colors
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/benchmarks/highlighting-speed-src/jquery.js4173function getData( data ) {