File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 8383# Try building the application (+e as we want to test every example and get a
8484# summary on what is working)
8585set +e
86- pio --no-ansi run -d " $PROJECTDIR " -e " $BOARD " 2>&1 | " $CIDIR /scripts/pio-to-gh-log.py"
86+ pio --no-ansi run -d " $PROJECTDIR " -e " $BOARD " 2>&1 | \
87+ " $CIDIR /scripts/pio-to-gh-log.py" \
88+ " src/main.cpp:examples/$EXAMPLENAME /$EXAMPLENAME .ino:-1" \
89+ " lib/esp32_https_server/:src/" \
90+ " $REPODIR /:"
8791RC=${PIPESTATUS[0]}
8892if [[ " $RC " != " 0" ]]; then
8993 echo " ::error::pio returned with RC=$RC "
Original file line number Diff line number Diff line change 77
88re_err = re .compile (r"^([^:]+):([0-9]+):([0-9]+): error: (.*)$" )
99
10+ # Parameters are strings of the form
11+ # path_prefix:replacement_prefix:line_offset
12+ # Where all paths starting with path_prefix will be replced with replacement_prefix,
13+ # and if such a replacement takes place, the line number will be shifted by line_offset.
14+ # That allows taking care for inserted code like the #include <Arduino.h>
15+ mappings = []
16+ for arg in sys .argv [1 :]:
17+ parts = arg .split (":" , 2 )
18+ mappings .append ((* parts [0 :2 ], 0 if len (parts )== 2 else int (parts [2 ])))
19+
1020for line in sys .stdin :
1121 print (line , end = "" )
1222 m = re_err .match (line .strip ())
1323 if m is not None :
24+ name = m .group (1 )
25+ lineno = int (m .group (2 ))
26+ for mapping in mappings :
27+ if name .startswith (mapping [0 ]):
28+ name = mapping [1 ] + name [len (mapping [0 ]):]
29+ lineno += mapping [2 ]
1430 print ("::error file={name},line={line},col={col}::{message}" .format (
15- name = m . group ( 1 ) , line = m . group ( 2 ) , col = m .group (3 ), message = m .group (4 )
31+ name = name , line = lineno , col = m .group (3 ), message = m .group (4 )
1632 ))
You can’t perform that action at this time.
0 commit comments