Check common code bug

Search source text for six named JavaScript or Python bug patterns while making no claim of full static analysis.

freeworks offlinenothing uploaded
ToolCommon Code Bug Checker
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

JavaScript mode looks for assignment inside if, async callbacks passed to forEach, and loose equality; Python mode looks for bare except, an empty-list default, and identity against a literal. These are regular-expression matches with no parser, scope graph, type system, or control-flow model.

  • JavaScript is the initial dialect and selecting Python replaces its pattern set.
  • Zero findings means only that the chosen three expressions did not match.

Worked example

Check common code bug
Input
											Code: if (value = 3) { console.log(value) }
array.forEach(async item => await save(item))
Language: javascript
										
Output
												Issues: Possible assignment inside a condition., forEach does not await async callbacks.
Issue count: 2
Note: Heuristic review only; run the language compiler, tests and a dedicated linter.
											

When to use this

Review preflights highlight async forEach, Python snippets expose shared list defaults, and teaching exercises compare heuristics with compiler and linter results.

Edge cases

  • Pattern text inside comments or strings can produce a false warning.
  • Equivalent bugs with unusual whitespace or nested syntax can evade the expressions.
  • No finding establishes neither runtime correctness nor test coverage.