Repository Analysis

fish-shell/fish-shell

The user-friendly command line shell.

2.8 Likely human-written View on GitHub
2.8
Adjusted Score
2.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
33,552
Stars
Rust
Language
117,088
Lines of Code
347
Files
202
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 17MEDIUM 20LOW 165

Pattern Findings

202 matches across 13 categories. Click a row to expand file-level details.

Over-Commented Block111 hits · 111 pts
SeverityFileLineSnippet
LOWcrates/gettext-mo-file-parser/src/lib.rs21 }
LOWcrates/gettext-extraction/src/lib.rs81/// the message ID is written into a new file in this directory,
LOWcrates/wgetopt/src/lib.rs41/// regardless of [Ordering].
LOWcrates/wgetopt/src/lib.rs61/// Indicates whether an option takes an argument, and whether that argument
LOWcrates/wgetopt/src/lib.rs121 shortopts: &'opts wstr,
LOWcrates/util/src/lib.rs21/// file12.txt
LOWcrates/color/src/lib.rs141 } else {
LOWcrates/printf/src/lib.rs21/// let s = sprintf!("%0.5g", 123456.0);
LOWcrates/printf/src/lib.rs61 };
LOWcrates/printf/src/lib.rs81/// let mut output = String::new();
LOWcrates/printf/src/printf_impl.rs321/// Formats a string using the provided format specifiers, arguments, and locale,
LOWcrates/printf/src/locale.rs1/// The numeric locale. Note this is a pure value type.
LOWcrates/printf/src/fmt_fp/decimal.rs241 // which is given by remainder (that is, remainder = self[digit_idx] % mod_base).
LOWcrates/printf/src/fmt_fp/mod.rs101
LOWcrates/common/src/lib.rs1201impl<T: Copy> ScopedCell<T> {
LOWcrates/common/src/lib.rs1261 ///
LOWcrates/common/src/lib.rs1301 ///
LOWcrates/common/src/lib.rs1321/// A RAII cleanup object. Unlike in C++ where there is no borrow checker, we can't just provide a
LOWcrates/common/src/lib.rs1381
LOWcrates/common/src/lib.rs1401/// ];
LOWcrates/widestring/src/lib.rs41//
LOWcrates/widestring/src/lib.rs121
LOWcrates/widestring/src/lib.rs341 /// PUA-encoded chars into a char iterator where each encoded non-UTF-8 byte is replaced by the
LOWcrates/widestring/src/lib.rs361 /// non-empty. In the [`Self::next`] and [`Self::next_back`] implementations, this logic is
LOWcrates/widestring/src/lib.rs581
LOWcrates/xtask/src/gettext.rs21
LOWcrates/xtask/src/main.rs41/// [`clap_complete`] is not built to account for the situation we have here, where the CLI does not
LOWdoc_src/conf.py141
LOWdoc_src/conf.py161# -- Options for HTML output -------------------------------------------------
LOWdoc_src/conf.py281
LOWtests/fish_test_helper.c1// fish_test_helper is a little program with no fish dependencies that acts like certain other
LOWtests/pexpects/commandline.py121# send(control("u") * 6)
LOWtests/pexpects/bind.py141# Delay needed to allow fish to transition to vi "normal" mode.
LOWtests/pexpects/history.py1#!/usr/bin/env python3
LOWsrc/job_group.rs61pub struct JobGroup {
LOWsrc/timer.rs1//! This module houses `TimerSnapshot` which can be used to calculate the elapsed time (system CPU
LOWsrc/exec.rs121 return false;
LOWsrc/exec.rs361 false
LOWsrc/exec.rs461// To avoid the race between the caller calling tcsetpgrp() and the client checking the
LOWsrc/exec.rs1241 j: &Job,
LOWsrc/exec.rs1261 // echo alpha | cat < beta.txt
LOWsrc/tty_handoff.rs341
LOWsrc/tty_handoff.rs441 // Check who own the tty now. There's four cases of interest:
LOWsrc/tty_handoff.rs461 }
LOWsrc/parse_util.rs121/// \param str the string to search for subshells
LOWsrc/parse_util.rs161
LOWsrc/parse_util.rs981 // Here's a hack. Consider:
LOWsrc/fds.rs161
LOWsrc/terminal.rs341 }
LOWsrc/proc.rs341impl fish_printf::ToArg<'static> for Pid {
LOWsrc/proc.rs361/// array and `actual_cmd` is the absolute path of the command to execute.
LOWsrc/proc.rs1141
LOWsrc/screen.rs221
LOWsrc/screen.rs1281 }
LOWsrc/screen.rs1881 commandline_before_suggestion,
LOWsrc/topic_monitor.rs281}
LOWsrc/topic_monitor.rs321
LOWsrc/expand.rs41 /// Set of flags controlling expansions.
LOWsrc/expand.rs61 /// Allow fuzzy matching.
LOWsrc/expand.rs101}
51 more matches not shown…
Cross-Language Confusion15 hits · 74 pts
SeverityFileLineSnippet
HIGHtests/pexpects/wildcard_tab.py67sendline(r"mkdir benchmarks && mkdir benchmarks/somedir && touch benchmarks/somefile")
HIGHtests/pexpects/pipeline.py28# 'not' because we expect to have no jobs, in which case `jobs` will return false
HIGHtests/pexpects/isatty.py20test -t 0 && echo stdin
HIGHtests/pexpects/isatty.py21test -t 1 && echo stdout
HIGHtests/pexpects/isatty.py22test -t 2 && echo stderr
HIGHtests/pexpects/isatty.py60sendline("isatty stdin && echo yes")
HIGHtests/pexpects/isatty.py64sendline("cat </dev/null | isatty stdin || echo no")
HIGHtests/pexpects/autosuggest.py77run("touch configure && chmod +x configure")
HIGHtests/pexpects/status.py28sendline("true 7 && status current-commandline")
HIGHtests/pexpects/status.py29expect_prompt("\r\n.*true 7 && status current-commandline\r\n")
HIGHtests/pexpects/read.py58sendline(r"read -c init_text somevar && echo $somevar")
HIGHtests/pexpects/read.py63sendline(r"read --command='some other text' somevar && echo $somevar")
HIGHshare/tools/web_config/webconfig.py807 + "if set -q __fish_initialized && test $__fish_initialized -lt 4300\n"
HIGHshare/tools/web_config/webconfig.py999 + "funcsave fish_prompt && funcsave fish_right_prompt 2>/dev/null"
HIGHshare/tools/web_config/webconfig.py1019 + '" \n false \n functions -q fish_right_prompt && fish_right_prompt\n'
Decorative Section Separators13 hits · 54 pts
SeverityFileLineSnippet
MEDIUMtests/pexpects/read.py126# ==========
MEDIUMtests/pexpects/history.py32# ==========
MEDIUMtests/pexpects/history.py37# ==========
MEDIUMtests/pexpects/history.py39# ==========
MEDIUMtests/pexpects/history.py41# ==========
MEDIUMtests/pexpects/history.py50# ==========
MEDIUMtests/pexpects/history.py52# ==========
MEDIUMtests/pexpects/history.py54# ==========
MEDIUMtests/pexpects/history.py60# ==========
MEDIUMtests/pexpects/history.py65# ==========
MEDIUMtests/pexpects/history.py72# ==========
MEDIUMtests/pexpects/history.py99# ==========
MEDIUMtests/pexpects/history.py106# ==========
Deep Nesting25 hits · 25 pts
SeverityFileLineSnippet
LOWdoc_src/fish_synopsis.py85
LOWdoc_src/conf.py219
LOWtests/test_driver.py111
LOWtests/test_driver.py306
LOWtests/pexpect_helper.py75
LOWtests/littlecheck.py796
LOWtests/littlecheck.py207
LOWshare/tools/create_manpage_completions.py1251
LOWshare/tools/create_manpage_completions.py1872
LOWshare/tools/create_manpage_completions.py2088
LOWshare/tools/create_manpage_completions.py468
LOWshare/tools/create_manpage_completions.py517
LOWshare/tools/create_manpage_completions.py588
LOWshare/tools/create_manpage_completions.py655
LOWshare/tools/create_manpage_completions.py680
LOWshare/tools/create_manpage_completions.py885
LOWshare/tools/create_manpage_completions.py930
LOWshare/tools/create_manpage_completions.py1092
LOWshare/tools/create_manpage_completions.py1708
LOWshare/tools/web_config/webconfig.py229
LOWshare/tools/web_config/webconfig.py1429
LOWshare/tools/web_config/webconfig.py1125
LOWshare/tools/web_config/webconfig.py1146
LOWshare/tools/web_config/webconfig.py1183
LOWshare/tools/web_config/webconfig.py267
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGHsrc/ast.rs2362 // exhausted the stream as requested.
HIGHsrc/builtins/read.rs306/// Read from the fd in chunks until we see newline or null, as requested, is seen. This is only
Hyper-Verbose Identifiers14 hits · 12 pts
SeverityFileLineSnippet
LOWtests/pexpect_helper.py197 def send_cursor_position_report(self, *, y: int, x: int):
LOWtests/pexpect_helper.py202 def send_primary_device_attribute(self):
LOWtests/pexpect_helper.py285 def report_exception_and_exit(self, pat, unmatched, err):
LOWshare/tools/create_manpage_completions.py1851def cleanup_autogenerated_completions_in_directory(dir):
LOWshare/tools/create_manpage_completions.py1864def cleanup_autogenerated_file(path):
LOWshare/tools/create_manpage_completions.py2018def parse_and_output_man_pages(paths, output_directory, show_progress):
LOWshare/tools/create_manpage_completions.py2088def get_paths_from_man_locations():
LOWshare/tools/web_config/webconfig.py356def html_color_for_ansi_color_index(val):
LOWshare/tools/web_config/webconfig.py625def append_html_for_ansi_escape(full_val, result, span_open):
LOWshare/tools/web_config/webconfig.py800class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
LOWshare/tools/web_config/webconfig.py963 def do_set_color_for_variable(self, name, color):
LOWshare/tools/web_config/webconfig.py1053 def parse_one_sample_prompt_hash(self, line, result_dict):
LOWshare/tools/web_config/webconfig.py1094 def do_get_sample_prompts_list(self):
LOWshare/tools/web_config/webconfig.py1125 def font_size_for_ansi_prompt(self, prompt_demo_ansi):
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippet
MEDIUMtests/littlecheck.py838 # To facilitate integration with testing frameworks, use exit code 125 to indicate that all
MEDIUMtests/pexpects/history.py8# meant to be a comprehensive test of the history subsystem. Those types of
LOWbuild_tools/make_linux_packages.sh72# just use dpkg-buildpackage directly
LOWshare/tools/create_manpage_completions.py2104 # If we can't have the OS interpret $MANPATH, just use it as-is (gulp).
Self-Referential Comments4 hits · 8 pts
SeverityFileLineSnippet
MEDIUMsrc/env_universal_common.rs631const SAVE_MSG: &[u8] = b"# This file contains fish universal variable definitions.\n";
MEDIUMsrc/env_universal_common.rs932 "# This file contains fish universal variable definitions.\n",
MEDIUMsrc/env_universal_common.rs950 "# This file contains fish universal variable definitions.\n",
MEDIUMsrc/env_universal_common.rs1002 "# This file contains fish universal variable definitions.\n",
Slop Phrases4 hits · 8 pts
SeverityFileLineSnippet
LOWCargo.toml10# don't forget to update COPYING and debian/copyright too
LOWCargo.toml10# don't forget to update COPYING and debian/copyright too
LOWsrc/parser_keywords.rs40// Don't forget to add any new reserved keywords to the documentation
MEDIUMsrc/builtins/string/shorten.rs155 // This should work for most cases considering the combiners typically have width 0.
Unused Imports7 hits · 7 pts
SeverityFileLineSnippet
LOWdoc_src/fish_indent_lexer.py7
LOWdoc_src/conf.py19
LOWtests/test_driver.py21
LOWtests/pexpect_helper.py16
LOWtests/littlecheck.py5
LOWtests/littlecheck.py6
LOWshare/tools/web_config/webconfig.py4
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWdoc_src/fish_synopsis.py3# Example usage:
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/fs.rs281/// # Return value
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/test_driver.py233 except Exception as e: