p12tic / cppreference-doc

C++ standard library reference
en.cppreference.com
GNU General Public License v3.0
411 stars 101 forks source link

Testing the code examples #135

Open mingodad opened 6 months ago

mingodad commented 6 months ago

I did a Lua script to extract the code examples and test then here https://github.com/robertoraggi/cplusplus/issues/314 to test it's independent parser https://github.com/robertoraggi/cplusplus and other parsers as well like g++ and clang .

Around 5% of the examples fail (some are due to missing include files or the libstdc++ installed on my Ubuntu 18.04).

If this project doesn't have a script to test the code examples you can use/adapt it .

mingodad commented 4 months ago

See here https://github.com/tree-sitter/tree-sitter-cpp/issues/243 for a script using tree-sitter and Lua to check for errors on the documentation like the ones bellow: