Repository Analysis

uutils/coreutils

Cross-platform Rust rewrite of the GNU coreutils

2.6 Likely human-written View on GitHub
2.6
Adjusted Score
2.6
Raw Score
100%
Time Factor
2026-05-30
Last Push
23,306
Stars
Rust
Language
269,919
Lines of Code
877
Files
671
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 8LOW 663

Pattern Findings

671 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block621 hits · 618 pts
SeverityFileLineSnippet
LOWCargo.toml41## Optional feature for stdbuf
LOWutil/dwr.sh1#!/usr/bin/env bash
LOWutil/update-version.sh1#!/bin/sh
LOWutil/build-run-test-coverage-linux.sh1#!/usr/bin/env bash
LOWutil/android-commands.sh1#!/usr/bin/env bash
LOWutil/android-commands.sh201# finishes a command run with a summary. It returns with the exit code of the probe if specified as
LOWutil/build-gnu.sh341# don't need to replicate that behavior.
LOWutil/GHA-delete-GNU-workflow-logs.sh1#!/bin/sh
LOWtests/test_uudoc.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_env.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_env.rs1101 ///
LOWtests/by-util/test_uptime.rs101
LOWtests/by-util/test_mv.rs1881
LOWtests/by-util/test_tee.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_ls.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_ls.rs1161#[test]
LOWtests/by-util/test_ls.rs1221/// This test does not really test anything provided by `-l` but the file names and symlinks.
LOWtests/by-util/test_ls.rs1241
LOWtests/by-util/test_ls.rs1261 // The contents of each tuple are the expected colors and names for the link and target.
LOWtests/by-util/test_stdbuf.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_cp.rs2801 let dst_path: &str = &[MOUNTPOINT, USERDIR, "dst"].concat();
LOWtests/by-util/test_tail.rs341 .stderr_is("tail: error reading 'standard input': Is a directory\n");
LOWtests/by-util/test_tail.rs461
LOWtests/by-util/test_tail.rs2421 not(target_os = "windows"),
LOWtests/by-util/test_tail.rs4521
LOWtests/by-util/test_tail.rs4541// file data
LOWtests/by-util/test_tail.rs4601 .stdout_only(expected_stdout);
LOWtests/by-util/test_touch.rs641 assert!(at.file_exists(file));
LOWtests/by-util/test_sleep.rs281 .fails()
LOWtests/by-util/test_eintr_handling.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_mkdir.rs321 // posix_acl entries are in the form of
LOWtests/by-util/test_cat.rs821 child.pipe_in("content");
LOWtests/by-util/test_id.rs421 // for now, we print clap's standard response for "conflicts_with" instead of:
LOWtests/by-util/test_split.rs781}
LOWtests/by-util/test_dd.rs641 //
LOWtests/by-util/test_dd.rs861 .args(&["conv=ebcdic,lcase"])
LOWtests/by-util/test_cksum.rs21#[case::crc("crc")]
LOWtests/by-util/test_chown.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_chown.rs261 .fails()
LOWtests/by-util/test_chown.rs501 .stderr_contains("invalid spec");
LOWtests/by-util/test_tac.rs161// FIXME: See https://github.com/uutils/coreutils/issues/4204
LOWtests/by-util/test_tac.rs181 // "xx".
LOWtests/by-util/test_tac.rs201 // separator, since there are no more characters preceding it.
LOWtests/by-util/test_tac.rs361 new_ucmd!()
LOWtests/by-util/test_seq.rs1001 .stdout_only("0\n1\n");
LOWtests/by-util/test_seq.rs1021 // 2. GNU seq uses the %Lg format specifier for printing (see the "get_default_format" function
LOWtests/by-util/test_seq.rs1041//
LOWtests/by-util/test_seq.rs1081fn test_equalize_widths_corner_cases() {
LOWtests/by-util/test_seq.rs1101 .stdout_is("01.0\n06.2\n");
LOWtests/by-util/test_mktemp.rs541/// Decide whether a string matches a given template.
LOWtests/by-util/test_more.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_nice.rs1// This file is part of the uutils coreutils package.
LOWtests/by-util/test_head.rs561)]
LOWtests/by-util/test_head.rs661#[test]
LOWtests/uutests/src/lib/random.rs1// This file is part of the uutils coreutils package.
LOWtests/uutests/src/lib/random.rs21/// .sample_iter(AlphanumericNewline)
LOWtests/uutests/src/lib/random.rs61/// use crate::common::random::{AlphanumericNewline, RandomizedString};
LOWtests/uutests/src/lib/random.rs101 /// * `dist`: A `u8` [`Distribution`]
LOWtests/uutests/src/lib/util.rs1// This file is part of the uutils coreutils package.
LOWtests/uutests/src/lib/util.rs301 }
561 more matches not shown…
Hyper-Verbose Identifiers19 hits · 20 pts
SeverityFileLineSnippet
LOWutil/test_compare_size_results.py28 def test_load_sizes_date_keyed(self):
LOWutil/test_compare_size_results.py48 def test_load_sizes_flat_fallback(self):
LOWutil/test_compare_size_results.py74 def test_compare_threshold_boundaries(self):
LOWutil/test_compare_size_results.py99 def test_compare_added_removed_and_totals(self):
LOWutil/test_compare_size_results.py109 def test_compare_sort_and_zero_reference(self):
LOWutil/test_compare_size_results.py116 def test_format_report_renders_changes(self):
LOWutil/test_compare_size_results.py137 def test_main_writes_only_when_significant(self):
LOWutil/test_compare_size_results.py156 def test_main_missing_reference_is_not_fatal(self):
LOWutil/test_compare_test_results.py53 def test_log_extension_removal(self):
LOWutil/test_compare_test_results.py93 def test_with_comments_and_blanks(self):
LOWutil/test_compare_test_results.py213 def test_new_and_removed_tests(self):
LOWutil/test_compare_test_results.py249 def test_skip_to_fail_not_regression(self):
LOWutil/test_compare_test_results.py315 def test_main_exit_code_with_real_regressions(self):
LOWutil/test_compare_test_results.py351 def test_filter_intermittent_fixes(self):
LOWutil/test_compare_test_results.py425 def test_console_output_formatting(self, mock_stderr, mock_stdout):
LOWutil/test_compare_test_results.py468 def test_file_output_generation(self):
LOWutil/test_compare_test_results.py506 def test_exit_code_with_no_regressions(self):
LOWutil/test_compare_test_results.py523 def test_exit_code_with_regressions(self):
LOWutil/test_compare_test_results.py547 def test_github_actions_formatting(self):
AI Slop Vocabulary6 hits · 16 pts
SeverityFileLineSnippet
LOWutil/test_compare_test_results.py518 # Instead of assertRaises, just call main() and check its return value
MEDIUMtests/by-util/test_ls.rs3549// Essentially the same test as above, but only test symlinks and directories,
MEDIUMsrc/uu/md5sum/Cargo.toml42# harness = false
MEDIUMsrc/uu/checksum_common/Cargo.toml32# harness = false
MEDIUMsrc/uucore/src/lib/features/buf_copy.rs6//! This module provides several buffer-based copy/write functions that leverage
MEDIUMsrc/uucore/src/lib/mods/clap_localization.rs11//! instead of parsing error strings, providing a more robust solution.
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippet
LOWutil/compare_gnu_result.py42 # Check if all failing tests are intermittent based on the environment variable
LOWutil/analyze-gnu-results.py135 # Check if file arguments were provided
LOWutil/analyze-gnu-results.py145 # Check if the first argument is an output file (starts with -)
LOWutil/run-gnu-test.sh80 # Check if the file exists with .sh, .pl extension or without any extension in the $path_GNU directory
LOWutil/build-gnu.sh81# Check if all patches are already applied
LOW.github/workflows/l10n.yml549 # Check if symlinks exist
LOW.github/workflows/manpage-lint.yml66 # Check if manpages were generated
LOW.github/workflows/manpage-lint.yml89 # Check if mandoc produced any output (errors only, not style warnings)
Excessive Try-Catch Wrapping4 hits · 6 pts
SeverityFileLineSnippet
LOWutil/remaining-gnu-error.py22except Exception as e:
MEDIUMutil/analyze-gnu-results.py158 print(f"Error: File '{json_files[0]}' not found.", file=sys.stderr)
LOWutil/gnu-json-result.py37 except Exception as e:
MEDIUMutil/gnu-json-result.py38 print(f"Error processing file {path}: {e}", file=sys.stderr)
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippet
LOWsrc/uu/touch/src/touch.rs490 // we need to check if the path is the path to a directory (ends with a separator)
LOWsrc/uu/dirname/src/dirname.rs48 // Step 1: Strip trailing slashes (but not if the entire path is slashes)
LOWsrc/uu/dirname/src/dirname.rs58 // Step 2: Check if it ends with `/.` and strip the `/+.` pattern
LOWsrc/uu/dirname/src/dirname.rs80 // Step 3: Normal dirname - find last / and remove everything after it
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMutil/test_compare_test_results.py409 # Create an ignore file
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippet
LOWutil/analyze-gnu-results.py49
LOWutil/compare_test_results.py44
LOWutil/run-clippy.py34
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWsrc/uucore/src/lib/features/update_control.rs22//! # Usage example
LOWsrc/uucore/src/lib/features/backup_control.rs35//! # Usage example
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWtests/by-util/test_basenc.rs289 let input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(50);
LOWtests/by-util/test_basenc.rs289 let input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(50);
Unused Imports1 hit · 1 pts
SeverityFileLineSnippet
LOWutil/run-clippy.py6