JackDrogon commented on issue #16665:
URL: https://github.com/apache/doris/issues/16665#issuecomment-1427535309

   现在工作目录创建iwyu目录,然后使用find导出所有文件列表到iwyu/files_list,然后就可以使用iwyu-patch 从1到n 
挨个一个个文件进行清理,关于这些需要挨个文件commit。因为iwyu会过度清理,需要有些添加iwyu guard.
   
   下面是iwyu-patch的示例脚本
   
   ```bash
   #!/bin/bash
   
   num=$1
   filename=$(sed "${num}q;d" ./iwyu/files_list)
   shortname=$(echo $filename | awk -F/ '{print $NF}')
   iwyu_outfile="./iwyu/${shortname}.iwyuout"
   build_dir=build_Release
   echo $filename $shortname $iwyu_outfile
   
   iwyu_tool.py -p $build_dir $filename > $iwyu_outfile
   fix_includes.py --comments --update_comments -b < $iwyu_outfile
   ```
   


-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to