Skip to content

Commit

Permalink
Remove relative paths for clang-tidy annotations (pytorch#62004)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#62004

Some of the files checked by clang tidy are compiled from a sibling directory, so the files all start with something like `../torch`. This ends up messing with `translate_annotations.py` which runs from the repo root. This fixes it by chopping off any relative paths in the clang tidy output.

Test Plan: Imported from OSS

Reviewed By: malfet

Differential Revision: D29835446

Pulled By: driazati

fbshipit-source-id: 2bd279370e41ed0a321e30f88fe38434105c75e8
  • Loading branch information
driazati authored and facebook-github-bot committed Jul 22, 2021
1 parent e731a63 commit a0e3816
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ jobs:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
cd "${GITHUB_WORKSPACE}"
sed --in-place 's/^\.\.\///g' clang-tidy-output.txt
tools/linter/translate_annotations.py \
--file=clang-tidy-output.txt \
--regex='^(?P<filename>.*?):(?P<lineNumber>\d+):(?P<columnNumber>\d+): (?P<errorDesc>.*?) \[(?P<errorCode>.*)\]' \
Expand Down

0 comments on commit a0e3816

Please sign in to comment.