Fail the build if non trusted libraries or certain classes are used

We need to enforce usage of certain libraries for network calls, asynchronous operation, message queuing though in rare case someone may end up using custom code instead of standard libraries. We can ofcourse detect those in code review but its too late and time consuming. I am looking to write easy rules via some custom wrappers of code that should fail the build if such custom code is detected.

What would be the best way to integrate such rules in teamcity build process?

0
2 comments

Hi Mitul,

I think it would make the most sense to have a set of tests that perform those kind of checks. Code inspections can also help here https://confluence.jetbrains.com/display/TCD10/Code+Inspection

If you can make it work in the development machine, then it should also be possible to pick it up during the build process in teamcity.

1

Please sign in to leave a comment.