build: treated style cop warning as error only on release mode.