Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 08:19:05 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)  (Read 6317 times)

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« on: January 19, 2012, 06:23:24 PM »
Application NameKyrathasoft Source Code Line Counter
Version 1.0.1.4 (last updated 27th June 2016
Short Descriptioncounts lines of source code across all files in a project (or even across multiple projects) using physical SLOC
Supported OSes Windows XP forward
Setup File KyrSrcLineCounterSetup.zip (~332 Kb)
System Requirementsrequires .NET Framework 4.0; the setup program detects the absence of .NET Framework 4.0 and installs if necessary
Author Infokyrathaba, author of Kyrathaba's Hangman. My past NANY entries include: Crocus Contacts, Blackjack, and NANY Excuse Manager.
DescriptionOption to count or not-count comments and blank lines.
Use standard folder-selection dialog, or drop folder on the listview
Automatically recounts when file extension is changed in the dropdown combo box
Automatically recounts when a folder is dropped on listview
Ability to count files/lines across multiple top-level directories
Supports C, C#, C++, VB, Delphi/Pascal, Bash, Java, AHK, Auto-It
Screenshots
Installationuse the Setup file created by Visual Studio 2015 Community Edition IDE
Using the applicationShould be highly intuitive; I await feedback (kyrathasoft@gmail.com)
Uninstallinguse the uninstaller
Known Issuesnone
Notable mentionsdotTech article


« Last Edit: June 27, 2016, 03:18:54 PM by kyrathaba »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter
« Reply #1 on: January 20, 2012, 01:30:25 AM »
Ha, my favorite tool to post feature requests for :)

Could SCLC count the lines of .XAML files, when also counting .CS files? Would need extra entries in the selection combobox (*.cs/*.xaml and probably *.vb/*.xaml), but the xaml is a rather large part of WPF projects these days.

Not sure if it should plainly count the lines as found, or normalize to 1 attribute per line, or a complete item, including all attributes, as 1 line. Lines as found in the file should be good enough, I guess.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter
« Reply #2 on: January 20, 2012, 06:56:34 AM »
Do you have such a project handy? If you could zip the entire project folder with its subfolders and post it here, I'll download it and use it as a test case.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #3 on: January 20, 2012, 09:49:36 AM »
I have no project I can share here, but I quickly threw together a HelloWpfWorld thingy :)

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #4 on: January 20, 2012, 12:48:12 PM »
Okay, I've updated the program to scan XAML files. You can redownload, or you should just be able to update the program using the "Update" button in the About dialog, accessible under the Help menu.

Quote
Lines as found in the file should be good enough, I guess.

Does this.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #5 on: January 20, 2012, 01:13:14 PM »
Hey, nice and quick :Thmbsup:

But, like with the standard *.cs and *.vb filters (I didn't request this yet, did I 8)), it might be smart to exclude the generated stuff in the *\obj\* project directory:
Screenshot - 20-01-2012 , 20_09_39.png

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #6 on: January 20, 2012, 02:57:02 PM »
Easy enough. I'll try to get to it in the day few hours.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #7 on: January 20, 2012, 03:55:24 PM »
Version 1.0.1.2

Ok, now, by default, files in the /obj/ subdirectory of your project are excluded. You can uncheck the checkbox if you want to count them.

sclc1012.png

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #8 on: January 22, 2012, 02:39:24 PM »
That's working a lot more convenient indeed, thanks for the quick response!

But also there's a few things I have found :)
  • When enabling/disabling the "Exclude /obj/ files" option and "Auto-recount when File Options change" is enabled, a Recount doesn't happen, though it would be quite logical if it did.
  • When resizing the form, the grid columns resize automagically, this is happening from code, right? It'd be nice if my manual width-changes would be used as the relative size.
  • When resizing, the Browse and Recount combo and button move with the right side of the form, but the File filter label/combo stay in their original place. That's a bit funky imho.
  • After a restart, the form is back to it's original size, position and File filter selection. Can these be saved between sessions?

No need to rush, but would be nice to have. :up:

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #9 on: January 22, 2012, 05:57:15 PM »
Quote
   
    1 When enabling/disabling the "Exclude /obj/ files" option and "Auto-recount when File Options change" is enabled, a Recount doesn't happen, though it would be quite logical if it did.
    2 When resizing the form, the grid columns resize automagically, this is happening from code, right? It'd be nice if my manual width-changes would be used as the relative size.
    3 When resizing, the Browse and Recount combo and button move with the right side of the form, but the File filter label/combo stay in their original place. That's a bit funky imho.
    4 After a restart, the form is back to it's original size, position and File filter selection. Can these be saved between sessions?

Ath,

In version 1.0.1.3 I believe I've addressed your requests listed in numbers 1, 3, and 4 above. In number two, I've caused the column widths to be, respectively, 80%, 15%, and 5% of the width of the ListView control. Not exactly what you've asked for, but in response to two email feature requests I've received recently (on 12/16 and 01/03). Let me know if you find these changes a general improvement.

You should be able to download the update from within the program, although I also provide the link below:


installer link

Note: this version also corrects error where the update-checker says "Kyrathaba's Hangman has found an available update", LOL! Can you say, copy/paste error?
« Last Edit: January 22, 2012, 06:05:53 PM by kyrathaba »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #10 on: January 23, 2012, 01:49:41 AM »
Wow, that's quick! Thanks :Thmbsup:

I can live with the columns being resized, that's no big issue, I now just resize the form so that the contents of all columns is completely readable, and the size is stored, so :D

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #11 on: January 24, 2012, 07:54:14 AM »
Great! Happy to be of service  :D

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: Kyrathasoft Source Code Line Counter (a NANY 2012 entry)
« Reply #12 on: January 24, 2012, 07:55:17 AM »
Ath, thanks so much for pointing out those areas that needed improvement. People like you are largely responsible for developers polishing off those rough edges in their apps.