New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
foliavalidator: processdir raises UnboundLocalError instead of returning false #40
Comments
I think that folialint (and libfolia) is correct in rejecting forward word references. |
The foliavalidator error is problem in dir processing (working on a fix). When tested alone, the file does validate:
|
Nevertheless, i think forward references are WRONG |
The other issue:
folialint
|
bug reproduces (python lib), test fails indeed |
bug is already fixed in libfolia |
closing this then |
On validation of an entire dir, folialint returns a failure while foliavalidator raises an Error (see output below).
Behaviour should be consolidated (i.e. foliavalidator should return false)?
folialint
(lamachine)tvoets@applejack:/vol/tensusers/proycon/clin_spellingstaak/annotated_docs$ folialint --nooutput nnota/*.xml
nnota/page1341.tested.tagged.folia.xml failed:
XML error: Unresolvable id page1341.text.div.1.p.1.s.7.w.24in WordReference
foliavalidator
(lamachine)tvoets@applejack:/vol/tensusers/proycon/clin_spellingstaak/annotated_docs$ foliavalidator nnota/
Searching in nnota/
Traceback (most recent call last):
File "/vol/customopt/lamachine/bin/foliavalidator", line 11, in
sys.exit(main())
File "/vol/customopt/lamachine/lib/python3.4/site-packages/foliatools/foliavalidator.py", line 145, in main
r = processdir(x,schema,quick,settings.deep, settings.stricttextvalidation,settings.debug)
File "/vol/customopt/lamachine/lib/python3.4/site-packages/foliatools/foliavalidator.py", line 87, in processdir
if not r: success = False
UnboundLocalError: local variable 'r' referenced before assignment
The text was updated successfully, but these errors were encountered: