FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 01 Mar 2019 02:53:09 +0900] rev 41825
contrib: add line offset information to file check function of check-code.py
This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.
This information will be useful to show correct line number in an
actual file for errors detected in code fragments embedded in *.t test
scripts.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 01 Mar 2019 02:53:09 +0900] rev 41824
contrib: change return value of file checking function of check-code.py
This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.
After this patch, caller of _checkfiledata() can count number of
errors in each code fragments of an actual file.
This will be useful to share --per-file limitation by all embedded
code fragments.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 01 Mar 2019 02:53:09 +0900] rev 41823
contrib: factor out actual error check for file data of check-code.py
This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.
Newly added _checkfiledata() will be useful to apply checks on code
fragments embedded in *.t test scripts.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 01 Mar 2019 02:53:09 +0900] rev 41822
contrib: refactor preparation logic for patterns of check-code.py
This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.
Before this patch, preparation logic in _preparepats() of
check-code.py is not reusable. It can handle only module global list
"checks".
This patch splits preparation logic into small internal functions, and
add the loop to invoke them, in order to increase reusability of the
logic.
"c[-2]" is equivalent to "c[3]" for "checks". This patch uses the
former, because it will be more reusable for subsequent patch than the
latter.