Menu

Checking validation errors for library configuration files

2019-01-14
2019-01-19
  • Markus Elfring

    Markus Elfring - 2019-01-14

    I have tried the following files out together with Cppcheck's library configuration XML specification and the tool “javascript RelaxNG validator”.

    An interesting message was displayed.

    validation error : document not valid : invalid pattern, expected :
    Empty
    , found :
    ElementNode

    Will these data need any further checks and software development considerations?


    Another system check with the tool “jing 20151127-19.11”:

    elfring@Sonne:~/Projekte/cppcheck/lokal/cfg> jing cppcheck-cfg.rng sdl.cfg
    /home/elfring/Projekte/cppcheck/lokal/cfg/cppcheck-cfg.rng:157:45: error: invalid parameter: invalid regular expression: character "-" must be escaped with "\" in ths context:
    (-?[0-9]*(\.[0-9]+)?[,:])*([>>>>-]?[0-9]+(\.[0-9]+)?)?
    
     

    Last edit: Markus Elfring 2019-01-14
  • versat

    versat - 2019-01-17

    I have verified some files smaller than 100kB on https://www.liquid-technologies.com/online-relaxng-validator (bigger files are not allowed).
    No issues were reported.
    The configuration files are also verified via make validateCFG or make checkcfg in the Makefile via this command:
    xmllint --noout --relaxng cfg/cppcheck-cfg.rng <configfile>
    This is executed by travis all the time.

    Not sure if the tools you tested are more strict and the configuration files should be improved or if these tools are missing anything. Since there are many variants of regular expression syntax i am not sure which one should be used and if jing is right here. Maybe every tool uses some other variant :) Do you know anything about that?

     
    • Markus Elfring

      Markus Elfring - 2019-01-17

      Thanks for your reminder for the tool “xmllint”.

       
  • versat

    versat - 2019-01-18
    • Regarding libxml2 issues:
      Why and what should we influence?
    • I have not manipulated CMake configurations much. How hard is it to add tests there? Can you add some tests and make a PR?
    • Which additional error information do you mean? If there are issues we sure want to fix them.
     
    • Markus Elfring

      Markus Elfring - 2019-01-18
      • How interesting do you find details from bug and issue trackers for the referenced software tools? (How much will deviations matter for data validation by these approaches?)
      • I occasionally try to achieve something for the programming language “CMake”. I am curious under which circumstances possible extensions will get the desired software development attention also for build scripts.
      • The XML data model contains aspects for further design considerations, doesn't it?
       
  • Daniel Marjamäki

    character "-" must be escaped with "\" in ths context

    If you wish you can write a pull request that fixes this compatibilty issue. I assume it would not break xmllint compatibility.

     
    • Markus Elfring

      Markus Elfring - 2019-01-19
       

      Last edit: Markus Elfring 2019-01-19

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.