<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="auto">Hi Ricardo Martincoski,</div><div dir="auto"><br><div dir="auto">My comments regarding patch [1].</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">> always use the absolute path of the file being checked when</div><div dir="auto">> -b was passed. A small drawback is that the warning messages will occupy</div><div dir="auto">> more columns in this case,</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">For user it would be quite unexpected to see that paths used in check-package arguments mismatch paths printed in stdout.</div><div dir="auto">I can't think of applications that absolutize paths.</div><div dir="auto">Е.g when GCC, flake8, cppcheck find errors/warnings they print file names as they were passed to binary call.</div><div dir="auto"><br></div><div>My current usage of check-package - verify patch on Gerrit and vote back.</div><div>But in future I'd like to have an ability to report back each line warning as a bot comment right on file diff screen.</div><div>To do this I neet to construct JSON containing list of {'filename', 'line', 'message'} dicts where 'filename' - file path relative to repo root.<br></div><div>Simplified calls when commit under review is checked out:</div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">  files=$(git diff --diff-filter ACMRT --name-only HEAD~)</span><br></div><div><font color="#000000" face="monospace"><span style="font-size:12px;white-space:pre">  <path-to-buildroot>/utils/check-package </span></font><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">--br2-external $files > errors.log</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">  <convert-to-json> errors.txt > errors.json</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">  <post-comments> errors.json</span></div><div><br></div></div></div><div dir="auto">In case check-package will print absolute paths into errors.log extra logic will be required to make paths relative back again.<br></div><div dir="auto"><br></div><div dir="auto">[1] <a href="http://patchwork.ozlabs.org/patch/992601/" target="_blank">http://patchwork.ozlabs.org/patch/992601/</a></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div>