You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/01/22 00:47:21 UTC

[GitHub] [druid] maytasm3 commented on a change in pull request #9157: Add git pre-commit hook to source control

maytasm3 commented on a change in pull request #9157: Add git pre-commit hook to source control
URL: https://github.com/apache/druid/pull/9157#discussion_r369320817
 
 

 ##########
 File path: hooks/pre-push.sh
 ##########
 @@ -0,0 +1,17 @@
+#!/bin/bash -eu
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+mvn checkstyle:checkstyle --fail-at-end
 
 Review comment:
   I saw the script at https://github.com/hdpe/maven-checkstyle-pre-commit/blob/master/pre-commit but the licensing is not clear so decided not to add it. It takes about 30s to runs checkstyle on everything and this is only done pre push (so should be less often then if we do pre commit). I think 30s is not too bad considering that the CI thing takes 1-2 hours and we can save resource on CI 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org