Clone Finder TeamCity Plugin
The Qodana Clone Finder plugin for TeamCity lets you extend Qodana static analysis with the Clone Finder functionality.
Ensure you have the Qodana plugin for IntelliJ Inspection installed
Install the Qodana Clone Finder plugin from JetBrains Marketplace
Use TeamCity VCS roots to add all required project source to the build.
With the plugin installed, add the Qodana runner to your build.
Make sure the Clone Finder option is enabled and provide the following required parameters:
Queried project — the project source code
Referenced project directories — one or more projects to compare against
Languages — languages to perform search
The example above shows that the project
phpunit will be compared to the project
pest and the analysis will be performed for the PHP language.
In this example, VCS roots are configured with the following mappings:
phpunitsources will be checked out to the
pestsources will be checked out to the
If you use DSL to configure your build, add this section to your build configuration description:
After the build is finished, you will see the Qodana tab on the Build Overview page. Note that the tab can be hidden under the More section. To see it in all builds with this step, mark the Qodana tab with a star.
Almost all UI features of the Qodana tab are similar among all Qodana tools we provide. They are sufficient for exploring the results of a single run, but the tab in TeamCity offers even more. You can easily compare two builds and focus on the difference. Now, the comparison is limited to a single build configuration, but we are working on providing the cross-configuration option as well.
In the inspection profile, you will find two inspections provided by Clone Finder:
Code Fragments/Clone with license mismatch
Check the Qodana UI to see all features available in the UI.