CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Inspection: Analyze Duplicates (JS, TS, HTML, XML)

Last modified: 16 December 2024

CLion 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, CLion 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