Announcement

Collapse
No announcement yet.

Source code friendly spell check?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Source code friendly spell check?

    It's a painful process to use any of my spell check tools on my source code documentation.

    The IDE/compiler checks my code, so what I'm trying to catch is comments in the code, plus text in the documentation surrounding the source code.

    Do anyone use a spell checker that handles this situation well?

  • #2
    You could write a fast and dirty utility to extract only the comments and put them in a text file. Then just spell check the text file.
    Scott Slater
    Summit Computer Networks, Inc.
    www.summitcn.com

    Comment


    • #3
      Hi Scott,

      Yep, that would work, although I'd have to manual track the changes I made and transfer them to the original file (or make the changes there).

      But I also have content in the documentation which is not commented source code, but is discussion about the code, so in that case I need another solution.

      Comment


      • #4
        Use the COM interface to MS Word, loading your source file? You can call a spell checker method, and react to changes with a replace method.

        (Hell, I didn't say I could DO it, but it sounds reasonable).
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Yep, that would work, although I'd have to manual track the changes I made and transfer them to the original file (or make the changes there).
          Why? Using Scott's idea, you would know where the comments come from in the source, so expand the program to put them back when you have run the spell-checker. That would be great utility.

          Comment


          • #6
            Gary, Have you given any of these a shot? I did a search for "Find Replace SpellCheck" and the following came up in the Source Code Forum

            KeyNote Plugin - Tony Burcham
            More SpellCheck COM code - Michael Vickery
            Word COM Spell and Thesaurus - Michael Vickery
            Word COM Spell Check - Michael Vickery

            Not many but there are a few out there. I have not tested these but if they are in the Source Code forum they most likely work.
            Engineer's Motto: If it aint broke take it apart and fix it

            "If at 1st you don't succeed... call it version 1.0"

            "Half of Programming is coding"....."The other 90% is DEBUGGING"

            "Document my code????" .... "WHYYY??? do you think they call it CODE? "

            Comment


            • #7
              > Not many but there are a few out there.... in the Source Code forum

              There is a LOT of stuff in the Source Code Forum. The only real frustration is, not all the threads have good 'keywords' in their titles, or something in the title is misspelled.

              And if you don't know the 'magic' words which appear in the code, even the full text search (vs 'Thread Title' search) won't help.

              While you cannot edit the subject lines, now you CAN add tags at any time. Maybe when you find something after a tough search for lack of keywords you could take the couple of minutes to add tags to the thread so it will be easier for the next person to find it.

              There's also some Gold in Them Thar 'Not the Source Code' Forums. I say if it's worth posting a complete, compilable program, it's worth posting in the Source Code Forum.

              YMMV.

              MCM
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                Originally posted by Gary Beene View Post
                It's a painful process to use any of my spell check tools on my source code documentation.

                The IDE/compiler checks my code, so what I'm trying to catch is comments in the code, plus text in the documentation surrounding the source code.

                Do anyone use a spell checker that handles this situation well?
                I use UltraEdit, which includes GNU Aspell. As you spell check, you can simply choose to add the PowerBasic commands, keywords, equates, variables, macros, and procedures to your personal dictionary, thereby building a custom PB specific dictionary.

                Also, if you use all uppercase for your PowerBasic commands, keywords, etc. you can set the spellchecker to ignore all uppercase words.

                I think that is probably as good as you could do.

                HTH
                Last edited by Terry Webb; 21 Jul 2009, 07:00 PM.

                Comment


                • #9
                  Apart from all sorts of other benefits to using a third party editor (clip text,
                  code folding, user defined tools and hot keys etc) Some have a built-in spell checker.

                  These spell check options are available in EditPlus http://www.editplus.com/

                  Options:
                  Ignore words with numbers
                  Ignore URLs and E-mail addresses
                  Ignore all-caps words
                  Ignore mixed case
                  Skip HTML tags
                  Check the Latin alphabet only

                  Dictionary:
                  US English. UK English

                  Combined with a user dictionary:
                  Plain text file that has ".USD" extension.
                  You can add items into this file by Add or Add Uncap
                  command in the Spell Checker dialog box or by manually editing the file.
                  Rgds, Dave

                  Comment

                  Working...
                  X