areusch commented on a change in pull request #10284:
URL: https://github.com/apache/tvm/pull/10284#discussion_r809568922



##########
File path: tests/lint/check_asf_header.sh
##########
@@ -44,14 +57,25 @@ if [ ${filter_untracked} -eq 1 ]; then
     rat_output="${processed_rat_output}"
 fi
 
-if grep --quiet -E "File" "${rat_output}"; then
-    echo "Need to add ASF header to the following files."
+grep --quiet -E "File" "${rat_output}" && success=1 || success=0
+
+if [ $success -eq 0 ]; then
+    echo "No files violate ASF header check"
+else
+    if [ $fix -eq 1 ]; then
+        python3 tests/lint/add_asf_header.py "${rat_output}"
+        echo "Ran add_asf_header.py to fix the following files:"
+    else
+        echo "Need to add ASF header to the following files."
+    fi
     echo "----------------File List----------------"
     cat "${rat_output}"
     echo "-----------------------------------------"
-    echo "Use the following steps to add the headers:"
-    echo "- Create file_list.txt in your text editor"
-    echo "- Copy paste the above content in file-list into file_list.txt"
-    echo "- python3 tests/lint/add_asf_header.py file_list.txt"
+    if [ $fix -eq 0 ]; then
+        echo "To fix, run check_asf_header.sh --fix, or use the following 
manual steps:"

Review comment:
       added a line to describe how to fix from docker/lint.sh




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to