Package com.google.gerrit.server.project
Class PrologRulesWarningValidator
java.lang.Object
com.google.gerrit.server.project.PrologRulesWarningValidator
- All Implemented Interfaces:
CommitValidationListener
A validator than emits a warning for newly added prolog rules file via git push. Modification and
deletion are allowed so that clients can get rid of prolog rules.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononCommitReceived
(CommitReceivedEvent receiveEvent) Runs a commit validation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.gerrit.server.git.validators.CommitValidationListener
getValidatorName, shouldValidateAllCommits, validateCommit
-
Constructor Details
-
PrologRulesWarningValidator
@Inject public PrologRulesWarningValidator(org.eclipse.jgit.lib.Config cfg)
-
-
Method Details
-
onCommitReceived
public List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent) throws CommitValidationException Description copied from interface:CommitValidationListener
Runs a commit validation.This method only exist for backwards-compatibility and doesn't need to be implemented when
CommitValidationListener.validateCommit(CommitReceivedEvent)
is implemented.- Specified by:
onCommitReceived
in interfaceCommitValidationListener
- Parameters:
receiveEvent
- commit event details- Returns:
- list of validation messages if the commit passes the validation
- Throws:
CommitValidationException
- if validation fails and the commit is rejected
-