Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138760

Validate QML snippets in CI

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None

      We often find that snippets in the documentation do not work. This is either because they were never tested and written wrongly or because they stopped working at a certain point.

      It would be great to have a tool that allows us to easily validate/test QML snippets in CI. In a second step this tool has to be rolled out to our codebase to test as many snippets as possible.

      There is an existing auto test that validates some QML snippets in \qt5\qtdeclarative\tests\auto\quickcontrols\snippets\tst_snippets.cpp. It would be great if this could be made more convenient/automated so we can test more snippets in CI.

      It should also be noted that Rust does this already. From the Rust book: "Adding example code blocks in your documentation comments can help demonstrate how to use your library, and doing so has an additional bonus: running cargo test will run the code examples in your documentation as tests! Nothing is better than documentation with examples. But nothing is worse than examples that don’t work because the code has changed since the documentation was written." https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            docinfrastructure Documentation Infrastructure Team
            matthias_rauter Matthias Rauter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes