Skip duplicates simpler than: configure the size of the code fragment that is compared against the rest of the code in the selected set of files in units. You can restrict the analysis to see duplicates only from the same module or from the same file to avoid false-positive results. Show duplicates from: select the set of files from which duplicates are going to be shown. Scope: select the scope of files in which the inspection is going to operate (the code on which the inspection in going to run). Severity: select a severity level from the list or create a new one. Once you click the inspection, its settings appear on the right. In the search field of the Inspections dialog, type duplicated code fragment to locate the inspection in the list. Make sure that the necessary inspection profile is selected in the Profile list. Press Ctrl+Alt+S to open the IDE settings and select Editor | Inspections. To see all duplicates in the selected set of files at once, run the inspection by name. The inspection works out of the box and has a number of settings that you can change to adjust its behavior. If you create a duplicate by writing or pasting code, WebStorm highlights it right away and suggests quick-fixes. WebStorm helps you find repetitive blocks of code in a certain set of files by means of the Duplicated code fragment inspection.
0 Comments
Leave a Reply. |