[JENKINS-25009] fixed codenarc violations