Move lint check to cmake, fix style on tests