memgraph/tools/github/clang-tidy/grep_error_lines.sh
János Benjamin Antal 6d4fe5cdd5
Explore and implement the usage of clang-tidy and sanitizers (#125)
* Run clang-tidy on the full code base

* Run clang-tidy on diffs

* Enable ASAN in coverage build

* Add UBSAN to code analysis
2021-04-01 17:08:40 +02:00

12 lines
462 B
Bash
Executable File

#!/bin/bash
# Matches timestamp like "2021-03-25T17:06:42.2621697Z"
TIMESTAMP_PATTERN="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}Z"
# Matches absolute file pathes with line and column identifier like
# "/opt/actions-runner/_work/memgraph/memgraph/src/utils/exceptions.hpp:71:11:"
FILE_ABSOLUTE_PATH_PATTERN="/[^:]+:\d+:\d+:"
ERROR_OR_WARNING_PATTERN="(error|warning):"
grep -P "^($TIMESTAMP_PATTERN )?$FILE_ABSOLUTE_PATH_PATTERN $ERROR_OR_WARNING_PATTERN.*$"