I have gone through the tool and it is very helpful to determine the size . This tool is not supported Power Builder Language and its extension is PB and it is similar to Visual Basic.
Please let me know how to count Power Builder by using this tool
You can add a custom language definition for Power Builder. First run with
cloc --write-lang-def=def.txt
Then edit def.txt and create a new entry for Power Builder using the Visual Basic definition as a guide. Then tell cloc to read this updated definition file when you count your code, ie,
cloc --read-lang-def=def.txt dir1 dir2 dir3 et cetera
Once you have the definition for Power Builder working the way you like, send it to me and I'll include it in the tool.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, Power Builder is not added. Ref the note I made in May, it is easy for you to add yourself. You need to provide more information before I can add PB.
See https://github.com/AlDanial/cloc/#AdditionalLanguages on how to request a language be added. Also note new development is at GitHub.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you so much. I would've done so already, but unfortunately the def.txt that gets generated when I run the cloc --write-lang-def=def.txt
command doesn't seem to be valid. Even if I make no changes to it and just tell the CLOC to use it, I get the following error all the time:
Missing computer language name, line 1 of def.txt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The latest release of cloc (https://github.com/AlDanial/cloc/blob/master/cloc ) shouldn't have that problem. In any case, I am happy to add Power Builder for you but I'm missing information. What are the file extensions? I did some research on my own and found many (plb/plw/plt), some of which looked like binary files. How are comments defined? My own digging makes it look like C++ comment style is used. However that conflicts with your statement that comments look like Visual Basic. Please give me the info necessary to integrate PB!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you so much for support and willing to help. I was able to make def.txt work by removing the “Unknown” profile on top of it and adding a profile for PowerBuilder (please see below). The comment system used by PB is not uncommon and quite simple – double-slashes denote a single-line comment and / … / are for multi-line comments. Have I figured the profile right? It probably has to be adjusted as I wouldn’t really know what 3rd_gen_scale really means.
As for the extensions, you don’t have to account for any binaries since all the PB shops who use repositories just store the flat files there. Basically, they all have a .SR* extension (and for simplicity purposes you can adjust the profile to say just so), but I personally opted to exclude some of them as they contain GUI-generated code only. Instead, I included those ones containing code for windows (.srw), user objects (.sru), menus (.srm), global functions (.srf), structures (.srf) and application objects (.sra). These files represent human-written code (at least, to the most part). Nothing else should really be considered.
Perfect, that information is exactly what I was after. I added support for PowerBuilder to cloc with git commit 9dcff8f; you can get the code from https://github.com/AlDanial/cloc/blob/master/cloc (new cloc development is happening at GitHub).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can add a custom language definition for Power Builder. First run with
Then edit def.txt and create a new entry for Power Builder using the Visual Basic definition as a guide. Then tell cloc to read this updated definition file when you count your code, ie,
Once you have the definition for Power Builder working the way you like, send it to me and I'll include it in the tool.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Has it been done? I need it urgently as we're facing the task of counting our PB code for corporate statistics. We have tons of code.
Many thanks, Leon
No, Power Builder is not added. Ref the note I made in May, it is easy for you to add yourself. You need to provide more information before I can add PB.
See https://github.com/AlDanial/cloc/#AdditionalLanguages on how to request a language be added. Also note new development is at GitHub.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Thank you so much. I would've done so already, but unfortunately the def.txt that gets generated when I run the cloc --write-lang-def=def.txt
command doesn't seem to be valid. Even if I make no changes to it and just tell the CLOC to use it, I get the following error all the time:
Missing computer language name, line 1 of def.txt
The latest release of cloc (https://github.com/AlDanial/cloc/blob/master/cloc ) shouldn't have that problem. In any case, I am happy to add Power Builder for you but I'm missing information. What are the file extensions? I did some research on my own and found many (plb/plw/plt), some of which looked like binary files. How are comments defined? My own digging makes it look like C++ comment style is used. However that conflicts with your statement that comments look like Visual Basic. Please give me the info necessary to integrate PB!
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Al,
Thank you so much for support and willing to help. I was able to make def.txt work by removing the “Unknown” profile on top of it and adding a profile for PowerBuilder (please see below). The comment system used by PB is not uncommon and quite simple – double-slashes denote a single-line comment and / … / are for multi-line comments. Have I figured the profile right? It probably has to be adjusted as I wouldn’t really know what 3rd_gen_scale really means.
As for the extensions, you don’t have to account for any binaries since all the PB shops who use repositories just store the flat files there. Basically, they all have a .SR* extension (and for simplicity purposes you can adjust the profile to say just so), but I personally opted to exclude some of them as they contain GUI-generated code only. Instead, I included those ones containing code for windows (.srw), user objects (.sru), menus (.srm), global functions (.srf), structures (.srf) and application objects (.sra). These files represent human-written code (at least, to the most part). Nothing else should really be considered.
PowerBuilder
filter remove_matches ^\s//
filter call_regexp_common C
filter remove_inline //.$
extension sra
extension srf
extension srm
extension srs
extension sru
extension srw
3rd_gen_scale 0.77
end_of_line_continuation \$
Perfect, that information is exactly what I was after. I added support for PowerBuilder to cloc with git commit 9dcff8f; you can get the code from https://github.com/AlDanial/cloc/blob/master/cloc (new cloc development is happening at GitHub).