Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
This report presents the forensic synthetic code analysis of tinygo-org/tinygo, a Go project with 17,568 GitHub stars. SynthScan v2.0 examined 201,039 lines of code across 1606 source files, recording 620 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 3.1 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 620 distinct pattern matches across 9 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 | diff.go | 21 | // | COMMENT |
| LOW | testdata/corpus.yaml | 1 | # This contains code from https://github.com/dgryski/tinygo-test-corpus | COMMENT |
| LOW | testdata/corpus.yaml | 241 | - pkg: stat/distmat | COMMENT |
| LOW | testdata/corpus.yaml | 261 | #- pkg: spatial/vptree # panic: unimplemented: (reflect.Value).MapKeys() | COMMENT |
| LOW | testdata/errors/compiler.go | 21 | // ERROR: compiler.go:4:6: can only use //go:wasmimport on declarations | COMMENT |
| LOW | testdata/errors/interp.go | 21 | // ERROR: # main | COMMENT |
| LOW | tools/gen-device-svd/gen-device-svd.go | 941 | } | COMMENT |
| LOW | interp/memory.go | 1 | package interp | COMMENT |
| LOW | interp/memory.go | 61 | // A memoryView is bound to a function activation. Loads are done from this view | COMMENT |
| LOW | interp/memory.go | 601 | // If a particular LLVM type is requested, cast to it. | COMMENT |
| LOW | interp/interpreter.go | 81 | // There may be PHI nodes that need to be resolved. Resolve all PHI | COMMENT |
| LOW | interp/interpreter.go | 261 | // which case this call won't even get to this point but will | COMMENT |
| LOW | interp/interpreter.go | 281 | err := r.runAtRuntime(fn, inst, locals, &mem, indent) | COMMENT |
| LOW | interp/interp.go | 81 | COMMENT | |
| LOW | tests/text/template/smoke/smoke_test.go | 41 | t := template.Must(template.New("letter").Parse(letter)) | COMMENT |
| LOW | tests/text/template/smoke/smoke_test.go | 61 | // | COMMENT |
| LOW | tests/text/template/smoke/smoke_test.go | 101 | // Output: | COMMENT |
| LOW | docs/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/conf.py | 21 | # sys.path.insert(0, os.path.abspath('.')) | COMMENT |
| LOW | docs/conf.py | 61 | # The full version, including alpha/beta/rc tags. | COMMENT |
| LOW | docs/conf.py | 81 | # directories to ignore when looking for source files. | COMMENT |
| LOW | docs/conf.py | 101 | # | COMMENT |
| LOW | docs/conf.py | 121 | # | COMMENT |
| LOW | docs/conf.py | 141 | COMMENT | |
| LOW | docs/conf.py | 161 | COMMENT | |
| LOW | docs/conf.py | 181 | # html_sidebars = {} | COMMENT |
| LOW | docs/conf.py | 201 | # | COMMENT |
| LOW | docs/conf.py | 221 | # Language to be used for generating the HTML full-text search index. | COMMENT |
| LOW | docs/conf.py | 241 | COMMENT | |
| LOW | docs/conf.py | 261 | COMMENT | |
| LOW | docs/conf.py | 281 | # | COMMENT |
| LOW | docs/conf.py | 321 | # dir menu entry, description, category) | COMMENT |
| LOW | docs/conf.py | 341 | # | COMMENT |
| LOW | cgo/libclang_config_llvm16.go | 1 | //go:build !byollvm && llvm16 | COMMENT |
| LOW | cgo/libclang_config_llvm17.go | 1 | //go:build !byollvm && llvm17 | COMMENT |
| LOW | cgo/libclang_config_llvm18.go | 1 | //go:build !byollvm && llvm18 | COMMENT |
| LOW | cgo/security.go | 1 | // Copyright 2018 The Go Authors. All rights reserved. | COMMENT |
| LOW | cgo/libclang_config_llvm19.go | 1 | //go:build !byollvm && llvm19 | COMMENT |
| LOW | cgo/libclang.go | 21 | ) | COMMENT |
| LOW | cgo/libclang.go | 661 | // Source: | COMMENT |
| LOW | cgo/cgo.go | 621 | Type: unionFieldType, | COMMENT |
| LOW | cgo/cgo.go | 1361 | return node | COMMENT |
| LOW | cgo/libclang_config_llvm20.go | 1 | //go:build !byollvm && !llvm15 && !llvm16 && !llvm17 && !llvm18 && !llvm19 | COMMENT |
| LOW | cgo/libclang_config_llvm15.go | 1 | //go:build !byollvm && llvm15 | COMMENT |
| LOW | cgo/testdata/flags.go | 1 | package main | COMMENT |
| LOW | cgo/testdata/errors.out.go | 1 | // CGo errors: | COMMENT |
| LOW | cgo/testdata/errors.go | 21 | #define SOME_CONST_b 3 ) // const with lots of weird whitespace (to test error locations) | COMMENT |
| LOW | loader/goroot.go | 301 | // always creates a symlink. On Windows, it tries to create a symlink and if | COMMENT |
| LOW | loader/loader.go | 221 | // unmodified package) have a suffix added to the import path, for | COMMENT |
| LOW | loader/loader.go | 301 | // before the packages they depend upon. | COMMENT |
| LOW | builder/library.go | 41 | librarySources func(target string, libcNeedsMalloc bool) ([]string, error) | COMMENT |
| LOW | builder/buildid.go | 81 | // Normally we would have found a build ID by now. But not on Nix, | COMMENT |
| LOW | builder/cc.go | 21 | "tinygo.org/x/go-llvm" | COMMENT |
| LOW | builder/cc.go | 41 | // return outfile | COMMENT |
| LOW | builder/cc.go | 241 | } | COMMENT |
| LOW | builder/sizes_test.go | 21 | } | COMMENT |
| LOW | builder/build.go | 41 | type BuildResult struct { | COMMENT |
| LOW | builder/build.go | 61 | // ImportPath is the import path of the main package. This is useful for | COMMENT |
| LOW | builder/build.go | 1461 | // If the stack isn't a multiple of 8, it means the leaf | COMMENT |
| LOW | builder/cc1as.h | 1 | // Source: https://github.com/llvm/llvm-project/blob/main/clang/tools/driver/cc1as_main.cpp | COMMENT |
| 530 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/reflect/type.go | 397 | // TODO: implement canRangeFunc | COMMENT |
| LOW | src/reflect/type.go | 411 | // TODO: implement canRangeFunc2 | COMMENT |
| LOW | src/internal/cm/stream.go | 15 | // TODO: implement methods on type stream | COMMENT |
| LOW | src/internal/cm/future.go | 15 | // TODO: implement methods on type future | COMMENT |
| LOW | src/testing/testing_test.go | 3 | // TODO: implement readdir for windows, then enable this file | COMMENT |
| LOW | src/machine/machine_mimxrt1062_i2c.go | 165 | // TODO: implement | COMMENT |
| LOW | src/machine/machine_stm32f103.go | 334 | // TODO: implement SPI2 and SPI3. | COMMENT |
| LOW | src/machine/machine_stm32f103.go | 381 | // TODO: implement I2C2. | COMMENT |
| LOW | src/machine/machine_stm32u031.go | 178 | // TODO: implement output channels | COMMENT |
| LOW | src/machine/board_stm32f469disco.go | 60 | // TODO: implement SPI2 and SPI3. | COMMENT |
| LOW | src/machine/board_stm32f4disco.go | 87 | // TODO: implement SPI2 and SPI3. | COMMENT |
| LOW | src/machine/machine_stm32_i2c_reva.go | 162 | // TODO: implement | COMMENT |
| LOW | src/device/arm/semihosting.go | 62 | // TODO: implement it here using inline assembly. | COMMENT |
| LOW | src/os/removeall_test.go | 3 | // TODO: implement ReadDir on windows | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/machine/machine_nrf52840.go | 83 | // Step 1: wait for new sampling to start for target buffer | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 88 | // Step 2: swap out buffers for next recording so we don't continue to | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 94 | // Step 3: wait for original event to end | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 98 | // Step 4: wait for default buffer to start recording before proceeding | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/machine/machine_nrf52840.go | 83 | // Step 1: wait for new sampling to start for target buffer | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 88 | // Step 2: swap out buffers for next recording so we don't continue to | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 94 | // Step 3: wait for original event to end | COMMENT |
| LOW⚡ | src/machine/machine_nrf52840.go | 98 | // Step 4: wait for default buffer to start recording before proceeding | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/machine/machine_esp32c6_adc.go | 79 | // ── regI2C: internal I2C-bus (LP_I2C_ANA_MST) for SAR ADC calibration ─────── | COMMENT |
| MEDIUM | src/machine/machine_esp32c6_adc.go | 306 | // ── Self-calibration ────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/tgtestjson.sh | 6 | # TODO: let's just add -json support to tinygo test. | COMMENT |
| MEDIUM | src/runtime/complex.go | 24 | // Algorithm for robust complex division as described in | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | compiler/llvm.go | 22 | // This is useful for creating temporary allocas for intrinsics. Don't forget to | COMMENT |
| LOW | compiler/llvmutil/llvm.go | 38 | // This is useful for creating temporary allocas for intrinsics. Don't forget to | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 123 | CODE |