The user-friendly command line shell.
This report presents the forensic synthetic code analysis of fish-shell/fish-shell, a Rust project with 33,847 GitHub stars. SynthScan v2.0 examined 118,602 lines of code across 356 source files, recording 215 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.9 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 215 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/gettext-mo-file-parser/src/lib.rs | 21 | } | COMMENT |
| LOW | crates/gettext-extraction/src/lib.rs | 81 | /// the message ID is written into a new file in this directory, | COMMENT |
| LOW | crates/wgetopt/src/lib.rs | 41 | /// regardless of [Ordering]. | COMMENT |
| LOW | crates/wgetopt/src/lib.rs | 61 | /// Indicates whether an option takes an argument, and whether that argument | COMMENT |
| LOW | crates/wgetopt/src/lib.rs | 121 | shortopts: &'opts wstr, | COMMENT |
| LOW | crates/util/src/lib.rs | 21 | /// file12.txt | COMMENT |
| LOW | crates/color/src/lib.rs | 141 | } else { | COMMENT |
| LOW | crates/fluent/src/lib.rs | 181 | } | COMMENT |
| LOW | crates/fluent/src/lib.rs | 201 | /// | COMMENT |
| LOW | crates/fluent/src/lib.rs | 221 | $( | COMMENT |
| LOW | crates/printf/src/lib.rs | 21 | /// let s = sprintf!("%0.5g", 123456.0); | COMMENT |
| LOW | crates/printf/src/lib.rs | 61 | }; | COMMENT |
| LOW | crates/printf/src/lib.rs | 81 | /// let mut output = String::new(); | COMMENT |
| LOW | crates/printf/src/printf_impl.rs | 321 | /// Formats a string using the provided format specifiers, arguments, and locale, | COMMENT |
| LOW | crates/printf/src/locale.rs | 1 | /// The numeric locale. Note this is a pure value type. | COMMENT |
| LOW | crates/printf/src/fmt_fp/decimal.rs | 241 | // which is given by remainder (that is, remainder = self[digit_idx] % mod_base). | COMMENT |
| LOW | crates/printf/src/fmt_fp/mod.rs | 101 | COMMENT | |
| LOW | crates/common/src/lib.rs | 1201 | impl<T: Copy> ScopedCell<T> { | COMMENT |
| LOW | crates/common/src/lib.rs | 1261 | /// | COMMENT |
| LOW | crates/common/src/lib.rs | 1301 | /// | COMMENT |
| LOW | crates/common/src/lib.rs | 1321 | /// A RAII cleanup object. Unlike in C++ where there is no borrow checker, we can't just provide a | COMMENT |
| LOW | crates/common/src/lib.rs | 1381 | COMMENT | |
| LOW | crates/common/src/lib.rs | 1401 | /// ]; | COMMENT |
| LOW | crates/widestring/src/lib.rs | 41 | // | COMMENT |
| LOW | crates/widestring/src/lib.rs | 121 | COMMENT | |
| LOW | crates/widestring/src/lib.rs | 341 | /// PUA-encoded chars into a char iterator where each encoded non-UTF-8 byte is replaced by the | COMMENT |
| LOW | crates/widestring/src/lib.rs | 361 | /// non-empty. In the [`Self::next`] and [`Self::next_back`] implementations, this logic is | COMMENT |
| LOW | crates/widestring/src/lib.rs | 581 | COMMENT | |
| LOW | crates/xtask/src/gettext.rs | 21 | COMMENT | |
| LOW | crates/xtask/src/fluent.rs | 41 | from_source: Option<Option<PathBuf>>, | COMMENT |
| LOW | crates/xtask/src/fluent.rs | 61 | /// If a Fluent variable is renamed or removed, the translations of the message will be deleted. | COMMENT |
| LOW | crates/xtask/src/fluent.rs | 81 | /// The message ID. | COMMENT |
| LOW | crates/xtask/src/fluent.rs | 101 | /// indicate that translators should have a look at it. | COMMENT |
| LOW | crates/xtask/src/main.rs | 41 | /// Run ShellCheck on non-fish shell scripts | COMMENT |
| LOW | doc_src/conf.py | 141 | COMMENT | |
| LOW | doc_src/conf.py | 161 | # -- Options for HTML output ------------------------------------------------- | COMMENT |
| LOW | doc_src/conf.py | 281 | COMMENT | |
| LOW | tests/fish_test_helper.c | 1 | // fish_test_helper is a little program with no fish dependencies that acts like certain other | COMMENT |
| LOW | tests/pexpects/commandline.py | 121 | # send(control("u") * 6) | COMMENT |
| LOW | tests/pexpects/bind.py | 141 | # Delay needed to allow fish to transition to vi "normal" mode. | COMMENT |
| LOW | tests/pexpects/history.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | src/job_group.rs | 61 | pub struct JobGroup { | COMMENT |
| LOW | src/timer.rs | 1 | //! This module houses `TimerSnapshot` which can be used to calculate the elapsed time (system CPU | COMMENT |
| LOW | src/exec.rs | 121 | } | COMMENT |
| LOW | src/exec.rs | 361 | } | COMMENT |
| LOW | src/exec.rs | 461 | // | COMMENT |
| LOW | src/exec.rs | 1241 | /// is the first or last process). | COMMENT |
| LOW | src/exec.rs | 1261 | // what we want to happen is this: | COMMENT |
| LOW | src/tty_handoff.rs | 341 | COMMENT | |
| LOW | src/tty_handoff.rs | 441 | // Check who own the tty now. There's four cases of interest: | COMMENT |
| LOW | src/tty_handoff.rs | 461 | } | COMMENT |
| LOW | src/parse_util.rs | 961 | // This is a bit of a hack - it indents cases like: | COMMENT |
| LOW | src/parse_util.rs | 981 | // cas | COMMENT |
| LOW | src/terminal.rs | 341 | COMMENT | |
| LOW | src/proc.rs | 341 | impl fish_printf::ToArg<'static> for Pid { | COMMENT |
| LOW | src/proc.rs | 361 | /// array and `actual_cmd` is the absolute path of the command to execute. | COMMENT |
| LOW | src/proc.rs | 1141 | COMMENT | |
| LOW | src/screen.rs | 221 | COMMENT | |
| LOW | src/screen.rs | 1281 | } | COMMENT |
| LOW | src/screen.rs | 1881 | commandline_before_suggestion, | COMMENT |
| 62 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/pexpects/wildcard_tab.py | 67 | sendline(r"mkdir benchmarks && mkdir benchmarks/somedir && touch benchmarks/somefile") | CODE |
| HIGH | tests/pexpects/pipeline.py | 28 | # 'not' because we expect to have no jobs, in which case `jobs` will return false | COMMENT |
| HIGH⚡ | tests/pexpects/isatty.py | 20 | test -t 0 && echo stdin | STRING |
| HIGH⚡ | tests/pexpects/isatty.py | 21 | test -t 1 && echo stdout | STRING |
| HIGH⚡ | tests/pexpects/isatty.py | 22 | test -t 2 && echo stderr | STRING |
| HIGH | tests/pexpects/isatty.py | 60 | sendline("isatty stdin && echo yes") | CODE |
| HIGH | tests/pexpects/isatty.py | 64 | sendline("cat </dev/null | isatty stdin || echo no") | CODE |
| HIGH | tests/pexpects/autosuggest.py | 77 | run("touch configure && chmod +x configure") | CODE |
| HIGH | tests/pexpects/status.py | 28 | sendline("true 7 && status current-commandline") | CODE |
| HIGH | tests/pexpects/status.py | 29 | expect_prompt("\r\n.*true 7 && status current-commandline\r\n") | CODE |
| HIGH | tests/pexpects/read.py | 58 | sendline(r"read -c init_text somevar && echo $somevar") | CODE |
| HIGH | tests/pexpects/read.py | 63 | sendline(r"read --command='some other text' somevar && echo $somevar") | CODE |
| HIGH | share/tools/web_config/webconfig.py | 807 | + "if set -q __fish_initialized && test $__fish_initialized -lt 4300\n" | CODE |
| HIGH | share/tools/web_config/webconfig.py | 999 | + "funcsave fish_prompt && funcsave fish_right_prompt 2>/dev/null" | CODE |
| HIGH | share/tools/web_config/webconfig.py | 1019 | + '" \n false \n functions -q fish_right_prompt && fish_right_prompt\n' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/pexpects/read.py | 126 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 32 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 37 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 39 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 41 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 50 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 52 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 54 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 60 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 65 | # ========== | COMMENT |
| MEDIUM⚡ | tests/pexpects/history.py | 72 | # ========== | COMMENT |
| MEDIUM | tests/pexpects/history.py | 99 | # ========== | COMMENT |
| MEDIUM | tests/pexpects/history.py | 106 | # ========== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc_src/fish_synopsis.py | 85 | CODE | |
| LOW | doc_src/conf.py | 219 | CODE | |
| LOW | tests/test_driver.py | 111 | CODE | |
| LOW | tests/test_driver.py | 306 | CODE | |
| LOW | tests/pexpect_helper.py | 75 | CODE | |
| LOW | tests/littlecheck.py | 796 | CODE | |
| LOW | tests/littlecheck.py | 207 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 1251 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 1872 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 2088 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 468 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 517 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 588 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 655 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 680 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 885 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 930 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 1092 | CODE | |
| LOW | share/tools/create_manpage_completions.py | 1708 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 229 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 1429 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 1125 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 1146 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 1183 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 267 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/ast.rs | 2362 | // exhausted the stream as requested. | COMMENT |
| HIGH | src/builtins/read.rs | 306 | /// Read from the fd in chunks until we see newline or null, as requested, is seen. This is only | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pexpect_helper.py | 197 | def send_cursor_position_report(self, *, y: int, x: int): | CODE |
| LOW | tests/pexpect_helper.py | 202 | def send_primary_device_attribute(self): | CODE |
| LOW | tests/pexpect_helper.py | 285 | def report_exception_and_exit(self, pat, unmatched, err): | CODE |
| LOW | share/tools/create_manpage_completions.py | 1851 | def cleanup_autogenerated_completions_in_directory(dir): | STRING |
| LOW | share/tools/create_manpage_completions.py | 1864 | def cleanup_autogenerated_file(path): | STRING |
| LOW | share/tools/create_manpage_completions.py | 2018 | def parse_and_output_man_pages(paths, output_directory, show_progress): | STRING |
| LOW | share/tools/create_manpage_completions.py | 2088 | def get_paths_from_man_locations(): | STRING |
| LOW | share/tools/web_config/webconfig.py | 356 | def html_color_for_ansi_color_index(val): | CODE |
| LOW | share/tools/web_config/webconfig.py | 625 | def append_html_for_ansi_escape(full_val, result, span_open): | CODE |
| LOW | share/tools/web_config/webconfig.py | 800 | class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | CODE |
| LOW | share/tools/web_config/webconfig.py | 963 | def do_set_color_for_variable(self, name, color): | CODE |
| LOW | share/tools/web_config/webconfig.py | 1053 | def parse_one_sample_prompt_hash(self, line, result_dict): | CODE |
| LOW | share/tools/web_config/webconfig.py | 1094 | def do_get_sample_prompts_list(self): | CODE |
| LOW | share/tools/web_config/webconfig.py | 1125 | def font_size_for_ansi_prompt(self, prompt_demo_ansi): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/littlecheck.py | 838 | # To facilitate integration with testing frameworks, use exit code 125 to indicate that all | COMMENT |
| MEDIUM | tests/pexpects/history.py | 8 | # meant to be a comprehensive test of the history subsystem. Those types of | COMMENT |
| LOW | build_tools/make_linux_packages.sh | 72 | # just use dpkg-buildpackage directly | COMMENT |
| LOW | share/tools/create_manpage_completions.py | 2104 | # If we can't have the OS interpret $MANPATH, just use it as-is (gulp). | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/env_universal_common.rs | 634 | const SAVE_MSG: &[u8] = b"# This file contains fish universal variable definitions.\n"; | CODE |
| MEDIUM | src/env_universal_common.rs | 930 | "# This file contains fish universal variable definitions.\n", | CODE |
| MEDIUM | src/env_universal_common.rs | 948 | "# This file contains fish universal variable definitions.\n", | CODE |
| MEDIUM | src/env_universal_common.rs | 1000 | "# This file contains fish universal variable definitions.\n", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Cargo.toml | 10 | # don't forget to update COPYING and debian/copyright too | COMMENT |
| LOW | Cargo.toml | 10 | # don't forget to update COPYING and debian/copyright too | COMMENT |
| LOW | src/parser_keywords.rs | 40 | // Don't forget to add any new reserved keywords to the documentation | COMMENT |
| MEDIUM | src/builtins/string/shorten.rs | 155 | // This should work for most cases considering the combiners typically have width 0. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc_src/fish_indent_lexer.py | 7 | CODE | |
| LOW | doc_src/conf.py | 19 | CODE | |
| LOW | tests/test_driver.py | 21 | CODE | |
| LOW | tests/pexpect_helper.py | 16 | CODE | |
| LOW | tests/littlecheck.py | 5 | CODE | |
| LOW | tests/littlecheck.py | 6 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 4 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | share/tools/create_manpage_completions.py | 1362 | CODE | |
| LOW | share/tools/web_config/webconfig.py | 1045 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc_src/fish_synopsis.py | 3 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/fs.rs | 280 | /// # Return value | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_driver.py | 233 | except Exception as e: | CODE |