WebStorm
 
Get WebStorm

Locate duplicates

Last modified: 16 December 2024

WebStorm helps you find repetitive blocks of code in a certain set of files by means of the Duplicated code fragment inspection. If you create a duplicate by writing or pasting code, WebStorm highlights it right away and suggests quick-fixes.

https://resources.jetbrains.com/help/img/idea/2024.3/ws_detect_duplicates.png
Gif

The inspection works out of the box and has a number of settings that you can change to adjust its behavior.

To see all duplicates in the selected set of files at once, run the inspection by name.

https://resources.jetbrains.com/help/img/idea/2024.3/ws_detect_duplicates_by_name.png
Gif