• Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major Major
    • sloccount-plugin
    • None

      atm the plugin only supports the --details format of sloccount report whereas
      sloc2html (http://www.dwheeler.com/sloccount/sloc2html-example.html) supports --multimodule.
      I would be great if the plugin could also support multiproject.

          [JENKINS-13382] Support multimodule sloccount report

          Michal Turek added a comment -

          Hi Brice,

          can you please write more information about this feature request?

          If I execute SLOCCount as usual, I will get the following output.

          [m@evm sloccount-plugin]$ sloccount --duplicates --wide --details src
          Creating filelist for main
          Creating filelist for test
          Categorizing files.
          Computing results.
          
          
          69      java    main    /SHORTENED/sloccount/SloccountDiffSummary.java
          50      java    main    /SHORTENED/sloccount/SloccountDiff.java
          72      java    main    /SHORTENED/sloccount/SloccountBuildAction.java
          133     java    main    /SHORTENED/sloccount/SloccountChartBuilder.java
          12      java    main    /SHORTENED/sloccount/SloccountDiffLanguage.java
          SHORTENED
          [m@evm sloccount-plugin]$
          

          But if I execute SLOCCount with --multiproject flag as suggested in task Description, I will get something very different, which is basically incompatible with most of the plugin current functionality.

          [m@evm sloccount-plugin]$ sloccount --wide --multiproject src
          Creating filelist for main
          Creating filelist for test
          Categorizing files.
          Finding a working MD5 command....
          Found a working MD5 command.
          Computing results.
          
          
          SLOC    Directory       SLOC-by-Language (Sorted)
          1224    main            java=1224
          77      test            java=77
          
          
          Totals grouped by language (dominant language first):
          java:          1301 (100.00%)
          
          
          
          
          Total Physical Source Lines of Code (SLOC)                = 1,301
          Development Effort Estimate, Person-Years (Person-Months) = 0.26 (3.13)
           (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
          Schedule Estimate, Years (Months)                         = 0.31 (3.78)
           (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
          Total Estimated Cost to Develop                           = $ 35,235
           (average salary = $56,286/year, overhead = 2.40).
          SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
          SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL.
          SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to
          redistribute it under certain conditions as specified by the GNU GPL license;
          see the documentation for details.
          Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."
          [m@evm sloccount-plugin]$
          

          This task is candidate for rejection at the moment. Did I miss something?

          Michal Turek added a comment - Hi Brice, can you please write more information about this feature request? If I execute SLOCCount as usual, I will get the following output. [m@evm sloccount-plugin]$ sloccount --duplicates --wide --details src Creating filelist for main Creating filelist for test Categorizing files. Computing results. 69 java main /SHORTENED/sloccount/SloccountDiffSummary.java 50 java main /SHORTENED/sloccount/SloccountDiff.java 72 java main /SHORTENED/sloccount/SloccountBuildAction.java 133 java main /SHORTENED/sloccount/SloccountChartBuilder.java 12 java main /SHORTENED/sloccount/SloccountDiffLanguage.java SHORTENED [m@evm sloccount-plugin]$ But if I execute SLOCCount with --multiproject flag as suggested in task Description, I will get something very different, which is basically incompatible with most of the plugin current functionality. [m@evm sloccount-plugin]$ sloccount --wide --multiproject src Creating filelist for main Creating filelist for test Categorizing files. Finding a working MD5 command.... Found a working MD5 command. Computing results. SLOC Directory SLOC-by-Language (Sorted) 1224 main java=1224 77 test java=77 Totals grouped by language (dominant language first): java: 1301 (100.00%) Total Physical Source Lines of Code (SLOC) = 1,301 Development Effort Estimate, Person-Years (Person-Months) = 0.26 (3.13) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.31 (3.78) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Total Estimated Cost to Develop = $ 35,235 (average salary = $56,286/year, overhead = 2.40). SLOCCount, Copyright (C) 2001-2004 David A. Wheeler SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL. SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to redistribute it under certain conditions as specified by the GNU GPL license; see the documentation for details. Please credit this data as "generated using David A. Wheeler's 'SLOCCount'." [m@evm sloccount-plugin]$ This task is candidate for rejection at the moment. Did I miss something?

          Michal Turek added a comment -

          Rejected. Please reopen if you are able to add more information.

          Michal Turek added a comment - Rejected. Please reopen if you are able to add more information.

          Ruby Paasche added a comment - - edited

          If i ran sloccount with the following command:
          [ -d slocdata ] || mkdir slocdata
          /usr/bin/sloccount --datadir slocdata --duplicates --wide --details "$WORKSPACE/src"/* --multiproject >"$WORKSPACE/sloccount.sc"

          on a multimodul maven project checked out to $WORKSPACE/src.

          I've got a sloccount.sc containing (splited) information for every modul of this project.

          I think the author want to see the sloccount on every modul page.

          This will be a great feature.

          Thee file looks like:

          Creating filelist for main
          Creating filelist for test
          Categorizing files.
          Computing results.
          
          
          69      java    main    /SHORTENED/main/sloccount/SloccountDiffSummary.java
          50      java    main    /SHORTENED/main/sloccount/SloccountDiff.java
          72      java    test    /SHORTENED/test/sloccount/SloccountBuildAction.java
          133     java    test    /SHORTENED/test/sloccount/SloccountChartBuilder.java
          12      java    test    /SHORTENED/test/sloccount/SloccountDiffLanguage.java
          SHORTENED
          

          Ruby Paasche added a comment - - edited If i ran sloccount with the following command: [ -d slocdata ] || mkdir slocdata /usr/bin/sloccount --datadir slocdata --duplicates --wide --details "$WORKSPACE/src"/* --multiproject >"$WORKSPACE/sloccount.sc" on a multimodul maven project checked out to $WORKSPACE/src. I've got a sloccount.sc containing (splited) information for every modul of this project. I think the author want to see the sloccount on every modul page. This will be a great feature. Thee file looks like: Creating filelist for main Creating filelist for test Categorizing files. Computing results. 69 java main /SHORTENED/main/sloccount/SloccountDiffSummary.java 50 java main /SHORTENED/main/sloccount/SloccountDiff.java 72 java test /SHORTENED/test/sloccount/SloccountBuildAction.java 133 java test /SHORTENED/test/sloccount/SloccountChartBuilder.java 12 java test /SHORTENED/test/sloccount/SloccountDiffLanguage.java SHORTENED

          Michal Turek added a comment -

          Do you mean the third column containing "main" and "test"? It has nothing to do with "multiproject", it is a "standard" SLOCCount output exactly the same as without "multiproject". The following two commands produce the same output.

          cd projects/sloccount-plugin/
          sloccount --duplicates --wide --details --multiproject src/* > multiproject.sc
          sloccount --duplicates --wide --details src/* > normal.sc
          

          You need to remove "details" to let "multiproject" to take effect.

          I guess you would like to use the third column (which is completely ignored in SloccountParser class at the moment) for a new panel on the details page, correct? There are panels Files, Folders and Languages now. The third column is already part of the Folders panel (compare the third column with the fourth), but there are all other subdirectories too. I can image a new panel only for the top level directories (projects). What do you think?

          Michal Turek added a comment - Do you mean the third column containing "main" and "test"? It has nothing to do with "multiproject", it is a "standard" SLOCCount output exactly the same as without "multiproject". The following two commands produce the same output. cd projects/sloccount-plugin/ sloccount --duplicates --wide --details --multiproject src/* > multiproject.sc sloccount --duplicates --wide --details src/* > normal.sc You need to remove "details" to let "multiproject" to take effect. I guess you would like to use the third column (which is completely ignored in SloccountParser class at the moment) for a new panel on the details page, correct? There are panels Files, Folders and Languages now. The third column is already part of the Folders panel (compare the third column with the fourth), but there are all other subdirectories too. I can image a new panel only for the top level directories (projects). What do you think?

          Ruby Paasche added a comment -

          That would be create, the table wouldn't grow so fast on large projects.

          Ruby Paasche added a comment - That would be create, the table wouldn't grow so fast on large projects.

          Michal Turek added a comment -

          New feature request JENKINS-21697 was created based on the discussion. This task will be set back to Rejected.

          Michal Turek added a comment - New feature request JENKINS-21697 was created based on the discussion. This task will be set back to Rejected.

            mixalturek Michal Turek
            brice Brice Beard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: