Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Integration vera++ in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Integration vera++ in Qt Creator

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
16 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    juestone
    wrote on last edited by
    #1

    Hi everyone, I am trying to integrate vera to Qt, even I found something such as https://stackoverflow.com/questions/34768812/integrate-vera-or-other-coding-convention-tool-with-qt-qtcreator
    I added the code block given there to Home/Qt/5.12.5/gcc_64/mkspecs/linux-g++-64/qmake.conf, but it didn't work. I am using Ubuntu 18.04 and we are developing Qt Quick (Qml) application for an arm based mpu soc, thanks.

    jsulmJ 2 Replies Last reply
    0
    • J juestone

      Hi everyone, I am trying to integrate vera to Qt, even I found something such as https://stackoverflow.com/questions/34768812/integrate-vera-or-other-coding-convention-tool-with-qt-qtcreator
      I added the code block given there to Home/Qt/5.12.5/gcc_64/mkspecs/linux-g++-64/qmake.conf, but it didn't work. I am using Ubuntu 18.04 and we are developing Qt Quick (Qml) application for an arm based mpu soc, thanks.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @juestone said in Integration vera++ in Qt Creator:

      Home/Qt/5.12.5/gcc_64/mkspecs/linux-g++-64/qmake.conf

      Shouldn't this file be in your project folder?
      Also, linux-g++-64 is not for ARM.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        juestone
        wrote on last edited by
        #3

        I know it's not for arm but now I am compiling for x86 on dekstop for debugging, and I couldn't find that file in my project folder.

        1 Reply Last reply
        0
        • J juestone

          Hi everyone, I am trying to integrate vera to Qt, even I found something such as https://stackoverflow.com/questions/34768812/integrate-vera-or-other-coding-convention-tool-with-qt-qtcreator
          I added the code block given there to Home/Qt/5.12.5/gcc_64/mkspecs/linux-g++-64/qmake.conf, but it didn't work. I am using Ubuntu 18.04 and we are developing Qt Quick (Qml) application for an arm based mpu soc, thanks.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @juestone said in Integration vera++ in Qt Creator:

          but it didn't work

          Please provide more information, "didn't work" does not help much to find the issue...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            juestone
            wrote on last edited by
            #5

            1d515119-51a5-4a9d-aa0c-0c6212bd7828-image.png
            Vera++ is a tool that allows checking the coding style of C++ source codes. The following things with the name of T008, L004 and the others are scripts that is checking the coding style of cpp source codes. It is possible to integrate this tool with Qt creator, considering the screenshots attached to their site.
            Vera++ bitbucket repo:
            https://bitbucket.org/verateam/vera/wiki/Home

            jsulmJ 1 Reply Last reply
            0
            • J juestone

              1d515119-51a5-4a9d-aa0c-0c6212bd7828-image.png
              Vera++ is a tool that allows checking the coding style of C++ source codes. The following things with the name of T008, L004 and the others are scripts that is checking the coding style of cpp source codes. It is possible to integrate this tool with Qt creator, considering the screenshots attached to their site.
              Vera++ bitbucket repo:
              https://bitbucket.org/verateam/vera/wiki/Home

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @juestone This is not an answer to my question. I did not ask what Vera++ is, I asked what did not work for you when you tried to integrate it.
              "but it didn't work" - is not a proper problem description...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                juestone
                wrote on last edited by
                #7

                I couldn't get those coding style warning when I debugged it, I think I couldn't succeed to integrate it shortly

                jsulmJ 1 Reply Last reply
                0
                • J juestone

                  I couldn't get those coding style warning when I debugged it, I think I couldn't succeed to integrate it shortly

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @juestone Did you call "make vera++" as shown in the link you posted?

                  qmake
                  make qmake_all
                  make vera++
                  

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    juestone
                    wrote on last edited by
                    #9

                    Yes when I called it on home dir, nothing happened. When I called on application dir, it gave error. When I called on build dir, it didn't give error, even it looks like it works, but i didn't get how I will use:
                    make:

                    /build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ qmake
                    Usage: /usr/lib/qt5/bin/qmake [mode] [options] [files]
                    
                    QMake has two modes, one mode for generating project files based on
                    some heuristics, and the other for generating makefiles. Normally you
                    shouldn't need to specify a mode, as makefile generation is the default
                    mode for qmake, but you may use this to test qmake on an existing project
                    
                    Mode:
                      -project       Put qmake into project file generation mode
                                     In this mode qmake interprets files as files to
                                     be built,
                                     defaults to *; *; *; *.ts; *.xlf; *.qrc
                                     Note: The created .pro file probably will 
                                     need to be edited. For example add the QT variable to 
                                     specify what modules are required.
                      -makefile      Put qmake into makefile generation mode (default)
                                     In this mode qmake interprets files as project files to
                                     be processed, if skipped qmake will try to find a project
                                     file in your current working directory
                    
                    Warnings Options:
                      -Wnone         Turn off all warnings; specific ones may be re-enabled by
                                     later -W options
                      -Wall          Turn on all warnings
                      -Wparser       Turn on parser warnings
                      -Wlogic        Turn on logic warnings (on by default)
                      -Wdeprecated   Turn on deprecation warnings (on by default)
                    
                    Options:
                       * You can place any variable assignment in options and it will be *
                       * processed as if it was in [files]. These assignments will be    *
                       * processed before [files] by default.                            *
                      -o file        Write output to file
                      -d             Increase debug level
                      -t templ       Overrides TEMPLATE as templ
                      -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
                      -help          This help
                      -v             Version information
                      -early         All subsequent variable assignments will be
                                     parsed right before default_pre.prf
                      -before        All subsequent variable assignments will be
                                     parsed right before [files] (the default)
                      -after         All subsequent variable assignments will be
                                     parsed after [files]
                      -late          All subsequent variable assignments will be
                                     parsed right after default_post.prf
                      -norecursive   Don't do a recursive search
                      -recursive     Do a recursive search
                      -set <prop> <value> Set persistent property
                      -unset <prop>  Unset persistent property
                      -query <prop>  Query persistent property. Show all if <prop> is empty.
                      -qtconf file   Use file instead of looking for qt.conf
                      -cache file    Use file as cache           [makefile mode only]
                      -spec spec     Use spec as QMAKESPEC       [makefile mode only]
                      -nocache       Don't use a cache file      [makefile mode only]
                      -nodepend      Don't generate dependencies [makefile mode only]
                      -nomoc         Don't generate moc targets  [makefile mode only]
                      -nopwd         Don't look for files in pwd [project mode only]
                    
                    
                    /build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ make qmake_all
                    cd app/ && /home/h***/Qt/5.12.5/gcc_64/bin/qmake -o Makefile /home/h***/Desktop/D**\ Project/project-app/app/app.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                    cd app/ && make -f Makefile qmake_all
                    make[1]: Entering directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/app'
                    make[1]: Nothing to be done for 'qmake_all'.
                    make[1]: Leaving directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/app'
                    cd tests/ && /home/h***/Qt/5.12.5/gcc_64/bin/qmake -o Makefile /home/h***/Desktop/project\ Project/project-app/tests/tests.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                    cd tests/ && make -f Makefile qmake_all
                    make[1]: Entering directory '/home/h***/Desktop/DIC Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/tests'
                    make[1]: Nothing to be done for 'qmake_all'.
                    make[1]: Leaving directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/tests'
                    
                    build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ make vera++
                    vera++ --checkstyle-report .vera++.xml --show-rule
                    

                    In last status, I tried to debug the app but nothing happened.

                    jsulmJ 1 Reply Last reply
                    0
                    • J juestone

                      Yes when I called it on home dir, nothing happened. When I called on application dir, it gave error. When I called on build dir, it didn't give error, even it looks like it works, but i didn't get how I will use:
                      make:

                      /build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ qmake
                      Usage: /usr/lib/qt5/bin/qmake [mode] [options] [files]
                      
                      QMake has two modes, one mode for generating project files based on
                      some heuristics, and the other for generating makefiles. Normally you
                      shouldn't need to specify a mode, as makefile generation is the default
                      mode for qmake, but you may use this to test qmake on an existing project
                      
                      Mode:
                        -project       Put qmake into project file generation mode
                                       In this mode qmake interprets files as files to
                                       be built,
                                       defaults to *; *; *; *.ts; *.xlf; *.qrc
                                       Note: The created .pro file probably will 
                                       need to be edited. For example add the QT variable to 
                                       specify what modules are required.
                        -makefile      Put qmake into makefile generation mode (default)
                                       In this mode qmake interprets files as project files to
                                       be processed, if skipped qmake will try to find a project
                                       file in your current working directory
                      
                      Warnings Options:
                        -Wnone         Turn off all warnings; specific ones may be re-enabled by
                                       later -W options
                        -Wall          Turn on all warnings
                        -Wparser       Turn on parser warnings
                        -Wlogic        Turn on logic warnings (on by default)
                        -Wdeprecated   Turn on deprecation warnings (on by default)
                      
                      Options:
                         * You can place any variable assignment in options and it will be *
                         * processed as if it was in [files]. These assignments will be    *
                         * processed before [files] by default.                            *
                        -o file        Write output to file
                        -d             Increase debug level
                        -t templ       Overrides TEMPLATE as templ
                        -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
                        -help          This help
                        -v             Version information
                        -early         All subsequent variable assignments will be
                                       parsed right before default_pre.prf
                        -before        All subsequent variable assignments will be
                                       parsed right before [files] (the default)
                        -after         All subsequent variable assignments will be
                                       parsed after [files]
                        -late          All subsequent variable assignments will be
                                       parsed right after default_post.prf
                        -norecursive   Don't do a recursive search
                        -recursive     Do a recursive search
                        -set <prop> <value> Set persistent property
                        -unset <prop>  Unset persistent property
                        -query <prop>  Query persistent property. Show all if <prop> is empty.
                        -qtconf file   Use file instead of looking for qt.conf
                        -cache file    Use file as cache           [makefile mode only]
                        -spec spec     Use spec as QMAKESPEC       [makefile mode only]
                        -nocache       Don't use a cache file      [makefile mode only]
                        -nodepend      Don't generate dependencies [makefile mode only]
                        -nomoc         Don't generate moc targets  [makefile mode only]
                        -nopwd         Don't look for files in pwd [project mode only]
                      
                      
                      /build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ make qmake_all
                      cd app/ && /home/h***/Qt/5.12.5/gcc_64/bin/qmake -o Makefile /home/h***/Desktop/D**\ Project/project-app/app/app.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                      cd app/ && make -f Makefile qmake_all
                      make[1]: Entering directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/app'
                      make[1]: Nothing to be done for 'qmake_all'.
                      make[1]: Leaving directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/app'
                      cd tests/ && /home/h***/Qt/5.12.5/gcc_64/bin/qmake -o Makefile /home/h***/Desktop/project\ Project/project-app/tests/tests.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                      cd tests/ && make -f Makefile qmake_all
                      make[1]: Entering directory '/home/h***/Desktop/DIC Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/tests'
                      make[1]: Nothing to be done for 'qmake_all'.
                      make[1]: Leaving directory '/home/h***/Desktop/project Project/build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug/tests'
                      
                      build-project-Desktop_Qt_5_12_5_GCC_64bit-Debug$ make vera++
                      vera++ --checkstyle-report .vera++.xml --show-rule
                      

                      In last status, I tried to debug the app but nothing happened.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @juestone said in Integration vera++ in Qt Creator:

                      vera++.xml

                      Was this file generated?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        juestone
                        wrote on last edited by
                        #11

                        Unfortunately no

                        jsulmJ 1 Reply Last reply
                        0
                        • J juestone

                          Unfortunately no

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @juestone .vera++.xml - there seems to be a dot as first character in the file name. Means: it is a hidden file, you need to make sure you also show hidden files when checking whether this file exists.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1
                          • J Offline
                            J Offline
                            juestone
                            wrote on last edited by juestone
                            #13

                            I couldn't file with the name of .vera++.xml both on home/Qt/.. and project dir. I enabled the visible of hidden files. But those command added these lines into Makefile inside app folder nut no changes on app debugging or running:

                            make_first: sub-app-make_first sub-tests-make_first  FORCE
                            all: sub-app-all sub-tests-all  FORCE
                            clean: sub-app-clean sub-tests-clean  FORCE
                            	-$(DEL_FILE) .vera++.xml
                            distclean: sub-app-distclean sub-tests-distclean  FORCE
                            	-$(DEL_FILE) Makefile
                            	-$(DEL_FILE) .qmake.stash
                            install_subtargets: sub-app-install_subtargets sub-tests-install_subtargets FORCE
                            uninstall_subtargets: sub-app-uninstall_subtargets sub-tests-uninstall_subtargets FORCE
                            
                            vera++:
                            	vera++ --checkstyle-report .vera++.xml --show-rule
                            
                            jsulmJ 2 Replies Last reply
                            0
                            • J juestone

                              I couldn't file with the name of .vera++.xml both on home/Qt/.. and project dir. I enabled the visible of hidden files. But those command added these lines into Makefile inside app folder nut no changes on app debugging or running:

                              make_first: sub-app-make_first sub-tests-make_first  FORCE
                              all: sub-app-all sub-tests-all  FORCE
                              clean: sub-app-clean sub-tests-clean  FORCE
                              	-$(DEL_FILE) .vera++.xml
                              distclean: sub-app-distclean sub-tests-distclean  FORCE
                              	-$(DEL_FILE) Makefile
                              	-$(DEL_FILE) .qmake.stash
                              install_subtargets: sub-app-install_subtargets sub-tests-install_subtargets FORCE
                              uninstall_subtargets: sub-app-uninstall_subtargets sub-tests-uninstall_subtargets FORCE
                              
                              vera++:
                              	vera++ --checkstyle-report .vera++.xml --show-rule
                              
                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @juestone said in Integration vera++ in Qt Creator:

                              home/Qt/.. and project dir

                              It should be inside the build folder as any other file generated during the build...

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • J juestone

                                I couldn't file with the name of .vera++.xml both on home/Qt/.. and project dir. I enabled the visible of hidden files. But those command added these lines into Makefile inside app folder nut no changes on app debugging or running:

                                make_first: sub-app-make_first sub-tests-make_first  FORCE
                                all: sub-app-all sub-tests-all  FORCE
                                clean: sub-app-clean sub-tests-clean  FORCE
                                	-$(DEL_FILE) .vera++.xml
                                distclean: sub-app-distclean sub-tests-distclean  FORCE
                                	-$(DEL_FILE) Makefile
                                	-$(DEL_FILE) .qmake.stash
                                install_subtargets: sub-app-install_subtargets sub-tests-install_subtargets FORCE
                                uninstall_subtargets: sub-app-uninstall_subtargets sub-tests-uninstall_subtargets FORCE
                                
                                vera++:
                                	vera++ --checkstyle-report .vera++.xml --show-rule
                                
                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                @juestone said in Integration vera++ in Qt Creator:

                                Makefile inside app folder nut no changes on app debugging or running

                                Why should there be any changes? Vera++ is just a tool for code analysis.

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  juestone
                                  wrote on last edited by
                                  #16

                                  I mean with change, I expect something like that on secreenshot on the website of vera++ or analysis codes can be displayed on the terminal, but I can't display anything about coding-style analysis.

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved