Coder Social home page Coder Social logo

watson-ruby's Introduction

watson-ruby Gem Version Build Status

an inline issue manager

watson (mirror) is a tool for creating and tracking bug reports, issues, and internal notes in code.
It is avaliable in two flavors, watson-ruby and watson-perl

See watson in action here (mirror)

See the RDoc documentation here (mirror)

Installation

watson-ruby has been tested with Ruby v2.1 and RubyGems v2.0.3 (on Arch Linux)
watson-ruby requires the json gem

From Repo

watson-ruby is avaliable as a RubyGems (link). You can either download it directory from gem using

gem install watson-ruby

Or you can clone this repo and install with Rake

git clone https://github.com/nhmood/watson-ruby.git .
cd watson-ruby
bundle install
bundle exec rake

Recent Updates

  • watson now supports Asana
  • watson now supports GitLab
  • vim-unite-watson.vim integrates watson right into vim!
  • watson now supports multiple export modes
    • JSON output allows you to integrate watson parse data into your own apps
    • Silent output allows you to use watson without a printout; tie it to git hooks for streamlined issue posting

Usage

For a quick idea of how to use watson, check out the app demo! (mirror)
See below for a description of what all the command line arguments do.

Supported Languages

If you see something missing from the list please either file an issue or submit a pull request (comment parsing happens in lib/watson/paser.rb)

  • C / C++
  • Objective C
  • C#
  • Java
  • Javascript
  • PHP
  • Go
  • Scala
  • Erlang
  • Fortran
  • SQL / PL
  • Lua
  • HTML
  • SASS SCSS
  • Haskell
  • Bash / Zsh
  • Ruby
  • Perl
  • Python
  • Coffeescript
  • Clojure
  • VimL
  • Markdown
  • HTML
  • Emacslisp
  • LaTex
  • Handlebars

Command line arguments

Usage: watson [OPTION]...
Running watson with no arguments will parse with settings in RC file
If no RC file exists, default RC file will be created

   -c, --context-depth   lines of context to provide with posted issue
   -d, --dirs            list of directories to search in
   --debug               enable debug prints from specified class
                         all debug prints enabled if no arguments passed
   -f, --files           list of files to search in
   --format              set output format for watson
                         [print, json, unite, silent]
   -h, --help            print help
   -i, --ignore          list of files, directories, or types to ignore
   -p, --parse-depth     depth to recursively parse directories
   -r, --remote          list / create tokens for Bitbucket/GitHub
   -s, --show            filter results (files listed) based on issue status
                         [all, clean, dirty]
   -t, --tags            list of tags to search for
   -u, --update          update remote repos with current issues
   -v, --version         print watson version and info

Any number of files, tags, dirs, and ignores can be listed after flag
Ignored files should be space separated
To use *.filetype identifier, encapsulate in "" to avoid shell substitutions

Report bugs to: [email protected]
watson home page: <http://goosecode.com/watson>
[goosecode] labs | 2012-2013


All file/directory/tag related parameters support relative as well as absolute paths.

-c, --context-lines [LINES]

This parameter specifies how many lines of context watson should include when posting issues to remote repos.
When this parameter is set from the command line, the .watsonrc config file is written with the value; the command line option effectively sets the default value for this feature in the current directory.
The default value is set to 15 (and can be found in the lib/watson/command.rb file).

-d, --dirs [DIRS]

This parameter specifies which directories watson should parse through.
It should be followed by a space separated list of directories that should be parsed.
If watson is run without this parameter, the current directory is parsed.

--debug [CLASS]

This parameter enables debug prints for the specified class.
It should be followed by a space separated list of classes that should print debug messages.
The list of classes are found in lib/watson.
If passed without arguments, debug prints in ALL classes of watson will be enabled.

-f, --files [FILES]

This parameter specifies which files watson should parse through.
It should be followed by a space separated list of files that should be parsed.

--format [PRINT, JSON, UNITE, SILENT]

This parameter specifies how watson should output the issues that it finds.
If passed with print, the regular printing will occur, either to Unix less or STDOUT (depending on system).
If passed with json, the output will be in the form of JSON, and will be stored in .watsonresults.

  • This particular option is useful if attempting to intergrate watson into other tools / platforms.

If passed with unite, the output will be compatible with the unite.vim plugin
(see the Unite section below or visit alpaca-tc/vim-unite-watson

If passed with silent, watson will have no output.

  • This particular option is useful if remote posting to GitHub, Bitbucket, or GitLab is desired without the visual component of watson.
  • For example, you could set up a git commit hook to post issues to GitHub/Bitbucket/GitLab, but avoid the giant print out every time.

-h, --help

This parameter displays the list of avaliable options for watson.

-i, --ignore [IGNORES]

This parameter specifies which files and directories watson should ignore when parsing.
It should be followed by a space separated list of files and/or directories to be ignored.
This parameter should be used as an opposite to -d/-f, when there are more files that should be parsed in a directory than should be ignored.

-p, --parse-depth [PARSE_DEPTH]

This parameter specifies how deep watson should recursively parse directories.
The 'depth' is defined as how many levels deep from the top-most specified directory to parse.
If individual directories are passed with the -d (--dirs) flag, each will be parsed PARSE_DEPTH layers, regardless of their depth from the current directory.
If watson is run without this parameter, the parsing depth is unlimited and will search through all subdirectories found.

-r, --remote [GITHUB, BITBUCKET, GITLAB, ASANA]

This parameter is used to both list currently established remotes as well as setup new ones.
If passed without any options, the currently established remotes will be listed.
If passed with a github, bitbucket, gitlab, asana argument, watson will proceed to ask some questions to set up the corresponding remote.

-s, --show [ALL, CLEAN, DIRTY]

This parameter is used to specify which types of files and entries are shown when watson is run.
If passed with the clean argument, only files that watson did NOT find issues in will be displayed.
If passed with the dirty argument, only files that watson DID find issues in will be displayed.
If passed with the all argument, watson will display all files, regardless of their issue status.
The default behavior of watson is the all option.

-t, --tags [TAGS]

This parameter is used to specify which tags watson should look for when parsing.
The tag currently supports any regular character and number combination, no special (!@#$...) characters.

-u, --update

This parameter is used to update remote repos with new issues.
watson does not post new issues by default therefore this parameter is required to push up to GitHub/Bitbucket/GitLab.
watson does pull issue status by default, therefore you will always be notified of resolved issues on GitHub/Bitbucket.

-v, --version

This parameter displays the current version of watson you are running.

.watsonrc

watson supports an RC file that allows for reusing commong settings without repeating command line arguments every time.

The .watsonrc is placed in every directory that watson is run from as opposed to a unified file (in ~/.watsonrc for example). The thought process behind this is that each project may have a different set of folders to ignore, directories to search through, and tags to look for.
For example, a C/C++ project might want to look in src/ and ignore obj/ whereas a Ruby project might want to look in lib/ and ignore assets/.

A base .watsonrc is created in the users $HOME directory and used as the template for creating all subsequent config files.
Any changes made in the $HOME/.watsonrc will carry on towards new configs, but will not update previously created configs.
The $HOME/.watsonrc is directly copied, not merged, as to avoid confusion as to the source of config parameters.
The $HOME/.watsonrc contains all remote GitHub API tokens created. The individual project .watsonrc will contain only the username associated with the API token, and will reference $HOME/.watsonrc to obtain the API token on runtime.

The .watsonrc file is fairly straightforward...
[dirs] - This is a newline separated list of directories to look in while parsing.

[tags] - This is a newline separated list of tags to look for while parsing.

[ignore] - This is a newline separated list of files / folders to ignore while parsing.
This supports wildcard type selecting by providing .filename (no * required)

[context_depth] - This value determines how many lines of context should be grabbed for each issue when posting to a remote.

[type] - This field allows for custom filetype/comment associations without having to edit the gem itself.
The format of filetype entries should be

".type"   => ["comment1", "comment2"]
".nhmood" => ["@@", "***"]
".cc"     => ["//"]

[show_type] - This field allows for setting the default show type, similar to the -s/--show command line arg
If set to clean, only files that watson did NOT find issues in will be displayed.
If set to dirty, only files that watson DID find issues in will be displayed.
If set to all, watson will display all files, regardless of their issue status.
The default behavior of watson is the all option.

[tag_format] - Customize the tag format for your project. Defaults to [TAG] - COMMENT. "TAG" and "COMMENT" are required keywords.

[(github/bitbucket/gitlab/asana)_api] - If a remote is established, the API key for the corresponding remote is stored here.
Currently, OAuth has yet to be implemented for Bitbucket so the Bitbucket username is stored here.

[(github/bitbucket/gitlab)_repo] - The repo name / path is stored here.

[(github/gitlab)_endpoint] - The endpoint in case of GitHub Enterprise of GitLab configuration.

[asana_project] - The Asana project in case of Asana integration is stored here.

[asana_workspace] - The Asana workspace in case of Asana integration is stored here.

The remote related .watsonrc options shouldn't need to be edited manually, as they are automatically populated when the -r, --remote setup is called.

unite.vim

alpaca-tc was kind enough to create a unite.vim plugin to integrate with watson!
unite.vim allows you to create user interfaces within vim and lets you search and display any kind of information.
The unite-vim-watson.vim plugin allows you to:

  • Generate a list of issues directly inside vim
  • Search and select files displayed in the watson output
  • Jump directly to the line where the issue is located (!!)

If you use vim I definitely recommend using vim-unite-watson.vim, it works wonders for productivity!

See it in action here (GIF demo)

Special Thanks

Special thanks to @samirahmed for his super Ruby help and encouraging the Ruby port!
Special thanks to @eugenekolo [email] for his super Perl help!
Special thanks to @crowell for testing out watson-ruby!

FAQ

  • Will inline issues get deleted if I close them on GitHub/Bitbucket/GitLab?
    No, watson won't touch your source code, it will only inform you that issues have been closed remotely.

  • Why Ruby?
    I wanted to learn Ruby and this seemed like a pretty decent project.

  • Why is the Ruby version different from the Perl version?
    The Ruby version was developed after the Perl version was made. Because of this, it was a lot easier to add on features that were thought of while/after making the Perl version as the plumbing was still being setup.
    With a combination of wanting to finish watson-ruby as well as laziness, some of the improvements that were added to watson-ruby have yet to be pulled back into watson-perl.
    If you are interested in helping out or maintaining watson-perl let me know!

watson-ruby's People

Contributors

ehadoux avatar findel avatar hamanish avatar hunterboerner avatar javoire avatar jerrysievert avatar jhaals avatar kentatogashi avatar kouphax avatar mlaug avatar mtford90 avatar nhmood avatar nicinabox avatar profan avatar radiospiel avatar rasmuswl avatar rogerso avatar shyndman avatar sorrycc avatar t-mac avatar tel avatar thekidcoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watson-ruby's Issues

Add config options (rc file) for default max depth and context lines [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 14
tag : todo
md5 : 1b2e201cf223a760d7955d00173bda82

    # [todo] - Add config options (rc file) for default max depth and context lines
        # List of all files/folders to ignore when parsing  
    attr_accessor :ignore_list
    # List of directories to parse  
    attr_accessor :dir_list
    # List of all files to parse
    attr_accessor :file_list        
    # List of tags to look for when parsing
    attr_accessor :tag_list         
    # Number of directories to parse recursively
    attr_accessor :parse_depth
    # Number of lines of issue context to grab
    attr_accessor :context_depth    
        # Flag for command line setting of file/dir to parse
    attr_accessor :cl_entry_set

Add option to save output to file also [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 90
tag : todo
md5 : 8c2cca11be5bb9238647bba4868ec6e4

        # [todo] - Add option to save output to file also
        @use_less = false
            # Data containers
        @ignore_list    = Array.new()
        @dir_list       = Array.new()
        @file_list      = Array.new()
        @tag_list       = Array.new()

        # Remote options
        @remote_valid   = false

        @github_valid   = false
        @github_api     = ""
        @github_repo    = ""
        @github_issues  = {:open   => Hash.new(),
                          :closed => Hash.new()

More "Ruby" way of going to next line? [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 261
tag : review
md5 : eb83bcdeb3e78f7c5783b6e1008ae470

                # [review] - More "Ruby" way of going to next line?
                next
            end


            # [review] - Use if with match so we can call next on the line reading loop
            # Tried using match(){|_mtch|} as well as do |_mtch| but those don't seem to
            # register the next call to the outer loop, so this way will do for now
                # Regex on line to find out if we are in a new [section] of
            # config parameters. If so, store it into section var and move
            # to next line 
            _mtch = _line.match(/^\[(\w+)\]/)
            if _mtch
                debug_print "Found section #{ _mtch[1] }\n"
                _section = _mtch[1]
                next

Add option to save output to specified file [lib/watson.rb]

filename : lib/watson.rb
line # : 24
tag : todo
md5 : 8b50ce58f658f01b266097e97d68f6cb

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files
GLOBAL_DEBUG_ON = false
# Gllobal flag to turn OFF debugging across all files
GLOBAL_DEBUG_OFF = false 
    # [review] - Not sure if module_function is proper way to scope
# I want to be able to call debug_print without having to use the scope
# operator (Watson::Printer.debug_print) so it is defined here as a 
# module_function instead of having it in the Printer class
# Gets included into every class individually

If input msg is a Hash, use pp to dump it [lib/watson.rb]

filename : lib/watson.rb
line # : 46
tag : todo
md5 : 86ace81eb3985d24953abc266e49dcdb

# [todo] - If input msg is a Hash, use pp to dump it
        # Print only if DEBUG flag of calling class is true OR 
    # GLOBAL_DEBUG_ON of Watson module (defined above) is true
    # AND GLOBAL_DEBUG_OFF of Watson module (Defined above) is false
        # Sometimes we call debug_print from a static method (class << self)
    # and other times from a class method, and ::DEBUG is accessed differently 
    # from a class vs object, so lets take care of that
    _DEBUG = (self.is_a? Class) ? self::DEBUG : self.class::DEBUG
        print "=> #{msg}" if ( (_DEBUG == true || GLOBAL_DEBUG_ON == true) && (GLOBAL_DEBUG_OFF == false))
end 
        ###########################################################
# Perform system check to see if we are able to use unix less for printing 

Play with idea of making body of GitHub issue hash format to be exec'd [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 282
tag : todo
md5 : 31546491cd844675df481310dc1571ba

# [todo] - Play with idea of making body of GitHub issue hash format to be exec'd
#          Store pieces in text as :md5 => "whatever" so when we get issues we can
#          call exec and turn it into a real hash for parsing in watson
#          Makes watson code cleaner but not as readable comment on GitHub...?
debug_print "Checking open issues to see if already posted\n"
config.bitbucket_issues[:open].each do | _open | 
    if _open["content"].include?(issue[:md5])
        debug_print "Found in #{ _open["title"] }, not posting\n"
        return false
    end
    debug_print "Did not find in #{_open["title"]}\n"
end 

debug_print "Checking closed issues to see if already posted\n"
config.bitbucket_issues[:closed].each do  | _closed | 
    if _closed["content"].include?(issue[:md5])
        debug_print "Found in #{ _closed["title"] }, not posting\n"

Not a fan of running these here but want to avoid getting all issues when running remote (which @config.run does) [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 127
tag : review
md5 : 00bdc95b47067889ef9c1ab4ce01f0c6

                # [review] - Not a fan of running these here but want to avoid getting all issues when running remote (which @config.run does)
                @config.check_conf
                @config.read_conf
                setup_remote(_flag_args)

                # If setting up remote, exit afterwards
                exit true

            when "-t", "--tags"
                debug_print "Found -t/--tags argument\n"
                set_tags(_flag_args)
                when "-u", "--update"
                debug_print "Found -u/--update argument\n"
                @config.remote_valid =  true

Crossplatform password block needed, not sure if current method is safe either [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 99
tag : fix
md5 : 63005a1dc174a3a608b3efa79a983baa

        # [fix] - Crossplatform password block needed, not sure if current method is safe either
        # Block output to tty to prevent PW showing, Linux/Unix only :(
        print BOLD + "Password: " + RESET
        system "stty -echo"
        _password = $stdin.gets.chomp
        system "stty echo"
        print "\n"
        if _password.empty?
            Printer.print_status "x", RED
            print BOLD + "Input is blank. Please enter your password!\n\n" + RESET
            return false
        end
            # HTTP Request to check if Repo exists and user has access 
        # http://confluence.atlassian.com/display/BITBUCKET/Use+the+Bitbucket+REST+APIs 
            # Create options hash to pass to Remote::http_call 

Can Win/Mac have dir + file with same name in same dir? [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 346
tag : review
md5 : 4d923a34cb0a917a31a6a74ed9bd30c9

                # [review] - Can Win/Mac have dir + file with same name in same dir?
                _mtch = _line.match(/^((\w+)?\.?\/?)+/)[0]
                if !_mtch.empty?
                    @ignore_list.push(_mtch) 
                    debug_print "#{ _mtch } added to @ignore_list\n"
                end
                debug_print "@ignore_list --> #{ @ignore_list }\n"

            when "github_api"
                # No need for regex on API key, GitHub setup should do this properly
                # Chomp to get rid of any nonsense
                @github_api = _line.chomp!
                debug_print "GitHub API: #{ @github_api }\n"

            when "github_repo"

Keep asking for user data until valid instead of leaving app [lib/watson/github.rb]

filename : lib/watson/github.rb
line # : 16
tag : todo
md5 : 81579429f4cfb33acfdbbc4fbccb8a35

    # [todo] - Keep asking for user data until valid instead of leaving app
            # Include for debug_print
    include Watson

    #############################################################################   
    # Setup remote access to GitHub 
    # Get Username, Repo, and PW and perform necessary HTTP calls to check validity
    def setup(config)
            # Identify method entry
        debug_print "#{ self.class } : #{ __method__ }\n"

        Printer.print_status "+", GREEN
        print BOLD + "Obtaining OAuth Token for GitHub...\n" + RESET

Populate @dirs/files_list first, then check size instead [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 297
tag : review
md5 : fa180c7d5ae2f4c9b93042a49c1ae11c

                # [review] - Populate @dirs/files_list first, then check size instead
                if @cl_entry_set
                    debug_print "Directories or files set from command line ignoring rc [dirs]\n"
                    next 
                end

                # Regex to grab directory
                # Then substitute trailing / (necessary for later formatting)
                # Then push to @dir_list
                _mtch = _line.match(/^((\w+)?\.?\/?)+/)[0].gsub(/(\/)+$/, "")
                if !_mtch.empty?
                    @dir_list.push(_mtch) 
                    debug_print "#{ _mtch } added to @dir_list\n"
                end
                debug_print "@dir_list --> #{ @dir_list }\n"

Should we clean the dir before adding here? [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 269
tag : review
md5 : d80c71d6d9f52b99a0eb046266425638

        # [review] - Should we clean the dir before adding here?
        # For each argument passed, make sure valid, then add to @config.dir_list
        args.each do | _dir |
            # Error check on input
            if !Watson::FS.check_dir(_dir)
                print "Unable to open #{ _dir }\n"
            else
                # Clean up directory path
                _dir = _dir.match(/^((\w+)?\.?\/?)+/)[0].gsub(/(\/)+$/, "")
                if !_dir.empty?
                    debug_print "Adding #{ _dir } to config dir_list\n"
                    @config.dir_list.push(_dir)
                end
            end
        end
            debug_print "Updated dirs: #{ @config.dir_list }\n"

Properly scope Printer class so we dont need the Printer. for [lib/watson/github.rb]

filename : lib/watson/github.rb
line # : 14
tag : review
md5 : 5e268391308470516f3cfc652eb78509

    # [review] - Properly scope Printer class so we dont need the Printer. for 
    #            method calls?
    # [todo] - Keep asking for user data until valid instead of leaving app
            # Include for debug_print
    include Watson

    #############################################################################   
    # Setup remote access to GitHub 
    # Get Username, Repo, and PW and perform necessary HTTP calls to check validity
    def setup(config)
            # Identify method entry
        debug_print "#{ self.class } : #{ __method__ }\n"

        Printer.print_status "+", GREEN

Make this a non-debug print to user? [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 260
tag : review
md5 : 2d8b0c860d5920215c042aa05acc948a

            # [review] - Make this a non-debug print to user?
            debug_print "No args passed, exiting\n"
            return false
        end
            # Set config flag for CL entryset  in config
        @config.cl_entry_set = true 
        debug_print "Updated cl_entry_set flag: #{ @config.cl_entry_set }\n"

        # [review] - Should we clean the dir before adding here?
        # For each argument passed, make sure valid, then add to @config.dir_list
        args.each do | _dir |
            # Error check on input
            if !Watson::FS.check_dir(_dir)
                print "Unable to open #{ _dir }\n"
            else
                # Clean up directory path

Keep *.swp in there? [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 229
tag : review
md5 : a5997989bb0082344f36df9e86a80676

        # [review] - Keep *.swp in there?
        # [todo] - Add conditional to @rc_file such that if passed by -f we accept it
        # [todo] - Add current file (watson) to avoid accidentally printing app tags 
        @ignore_list.push(".")
        @ignore_list.push("..")
        @ignore_list.push("*.swp")
        @ignore_list.push(@rc_file)
        @ignore_list.push(@tmp_file)
            # Open and read rc
        # [review] - Not sure if explicit file close is required here
        _rc = File.open(@rc_file, 'r').read

        debug_print "\n\n"  

        # Create temp section var to keep track of what we are populating in config
        _section = ""

Don't just check for blank password but invalid as well [lib/watson/github.rb]

filename : lib/watson/github.rb
line # : 55
tag : todo
md5 : 5f9156ff58811fb89fbad8bd977d2a4b

        # [todo] - Don't just check for blank password but invalid as well
        # Poor mans username/password grabbing
        print BOLD + "Username: " + RESET
        _username = $stdin.gets.chomp
        if _username.empty?
            Printer.print_status "x", RED
            print BOLD + "Input blank. Please enter your username!\n\n" + RESET
            return false
        end
            # [fix] - Crossplatform password block needed, not sure if current method is safe either
        # Block output to tty to prevent PW showing, Linux/Unix only :(
        print BOLD + "Password: " + RESET
        system "stty -echo"
        _password = $stdin.gets.chomp
        system "stty echo"
        print "\n\n"

This is a bit messy (to slice by _i - 1) when we have control [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 98
tag : review
md5 : 6cd359037bd5d372ceac24e9bbb9e4d9

            # [review] - This is a bit messy (to slice by _i - 1) when we have control
            # over the _i index above but I don't want to
            # think about the logic right now so look at later
            _flag_args = args.slice!(0..(_i-1))
                case _flag 
            when "-c", "--context-depth"
                debug_print "Found -c/--context-depth argument\n"
                set_context(_flag_args)
                when "-d", "--dirs"
                debug_print "Found -d/--dirs argument\n"
                set_dirs(_flag_args)

            when "-f", "--files"
                debug_print "Found -f/--files argument\n"
                set_files(_flag_args)

Add ability to pass "IDENTIFY" to debug_print to auto print method entry info [lib/watson.rb]

filename : lib/watson.rb
line # : 17
tag : todo
md5 : 5d8f7aec945fccf26d0ee22c94c1cdba

# [todo] - Add ability to pass "IDENTIFY" to debug_print to auto print method entry info 

# [todo] - Make sure all methods have proper return at end

# [review] - Method input arg always renamed from arg to _arg inside method, change this?
#            Not sure if I should just make input arg _arg or if explicit _ is useful 

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files
GLOBAL_DEBUG_ON = false
# Gllobal flag to turn OFF debugging across all files

Use if with match so we can call next on the line reading loop [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 266
tag : review
md5 : 6642f7af20c07b5ad49b005bb5466c72

            # [review] - Use if with match so we can call next on the line reading loop
            # Tried using match(){|_mtch|} as well as do |_mtch| but those don't seem to
            # register the next call to the outer loop, so this way will do for now
                # Regex on line to find out if we are in a new [section] of
            # config parameters. If so, store it into section var and move
            # to next line 
            _mtch = _line.match(/^\[(\w+)\]/)
            if _mtch
                debug_print "Found section #{ _mtch[1] }\n"
                _section = _mtch[1]
                next
            end
                    case _section
            when "context_depth"

Replace all regex parentheses() with brackets[] if not matching [lib/watson.rb]

filename : lib/watson.rb
line # : 11
tag : todo
md5 : 8ce0c4810e13203e90c89c49429bde64

# [todo] - Replace all regex parentheses() with brackets[] if not matching
#          Was using () to group things together for syntax instead of []
#          Replace so we can get cleaner matches and don't need to keep track of matches

# [todo] - Change debug_print to provide its own \n

# [todo] - Add ability to pass "IDENTIFY" to debug_print to auto print method entry info 

# [todo] - Make sure all methods have proper return at end

# [review] - Method input arg always renamed from arg to _arg inside method, change this?
#            Not sure if I should just make input arg _arg or if explicit _ is useful 

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added

gsub uses (.?)+ to grab anything after lib (optional), better regex? [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 178
tag : review
md5 : 93235816f8f628bd2b66ab6a860292dc

        # [review] - gsub uses (.?)+ to grab anything after lib (optional), better regex? 
        _full_path = __dir__.gsub(/\/lib(.?)+/, '') + "/" + "assets/defaultConf"
        debug_print "Full path to defaultConf (in gem): #{ _full_path }\n"

        # Check to make sure we can access the default file
        if !Watson::FS.check_file(_full_path)
            print "Unable to open #{ _full_path }\n"
            print "Cannot create default, exiting...\n"
            return false
        else
            # Open default config file in read mode and read into temp
            _input = File.open(_full_path, 'r')
            _default = _input.read
                # Open rc file in current directory in write mode and write default
            _output = File.open(@rc_file, 'w')
            _output.write(_default)

Add current file (watson) to avoid accidentally printing app tags [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 231
tag : todo
md5 : 04702c2887bb3056b7598de144c516a9

        # [todo] - Add current file (watson) to avoid accidentally printing app tags 
        @ignore_list.push(".")
        @ignore_list.push("..")
        @ignore_list.push("*.swp")
        @ignore_list.push(@rc_file)
        @ignore_list.push(@tmp_file)
            # Open and read rc
        # [review] - Not sure if explicit file close is required here
        _rc = File.open(@rc_file, 'r').read

        debug_print "\n\n"  

        # Create temp section var to keep track of what we are populating in config
        _section = ""

        # Keep index to print what line we are on

Better way to identify/compare remote->local issues than md5 [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 267
tag : todo
md5 : c6b521f8a16501ae7813caf8da1e5b1a

    # [todo] - Better way to identify/compare remote->local issues than md5
    #          Current md5 based on some things that easily can change, need better ident
            # Identify method entry
        debug_print "#{self.class} : #{__method__}\n"


        # Only attempt to get issues if API is specified 
        if config.bitbucket_api.empty?
            debug_print "No API found, this shouldn't be called...\n"
            return false
        end
            # Check that issue hasn't been posted already by comparing md5s
        # Go through all open issues, if there is a match in md5, return out of method
        # [todo] - Play with idea of making body of GitHub issue hash format to be exec'd
        #          Store pieces in text as :md5 => "whatever" so when we get issues we can

Populate @tag_list, then check size instead [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 316
tag : review
md5 : 0712ce13f6ce50af74864296a3b53a65

                # [review] - Populate @tag_list, then check size instead
                if @cl_tag_set
                    debug_print "Tags set from command line, ignoring rc [tags]\n"
                    next 
                end
                    # Same as previous for tags
                # [review] - Need to think about what kind of tags this supports
                # Check compatibility with GitHub + Bitbucket and what makes sense
                # Only supports single word+number tags
                _mtch = _line.match(/^(\S+)/)[0]
                if !_mtch.empty?
                    @tag_list.push(_mtch)
                    debug_print "#{ _mtch } added to @tag_list\n"
                end
                debug_print "@tag_list --> #{ @tag_list }\n"

Wrap Bitbucket password grabbing into separate method [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 14
tag : todo
md5 : 89f9f53b636eaeccfe1b003aefd5d271

# [todo] - Wrap Bitbucket password grabbing into separate method
    # Include for debug_print
include Watson
    #############################################################################   
# Setup remote access to Bitbucket
# Get Username, Repo, and PW and perform necessary HTTP calls to check validity
def setup(config)

    # Identify method entry
    debug_print "#{ self.class } : #{ __method__ }\n"

    Printer.print_status "+", GREEN
    print BOLD +  "Attempting to access Bitbucket...\n" + RESET

    # Check config to make sure no previous repo info exists

Add conditional to @rc_file such that if passed by -f we accept it [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 230
tag : todo
md5 : f0cf8a1a187180dc2bd40efe4120cebc

        # [todo] - Add conditional to @rc_file such that if passed by -f we accept it
        # [todo] - Add current file (watson) to avoid accidentally printing app tags 
        @ignore_list.push(".")
        @ignore_list.push("..")
        @ignore_list.push("*.swp")
        @ignore_list.push(@rc_file)
        @ignore_list.push(@tmp_file)
            # Open and read rc
        # [review] - Not sure if explicit file close is required here
        _rc = File.open(@rc_file, 'r').read

        debug_print "\n\n"  

        # Create temp section var to keep track of what we are populating in config
        _section = ""

Not sure if explicit file close is required here [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 239
tag : review
md5 : ae184abbc1e4155a7575a3adb8c2c1b8

        # [review] - Not sure if explicit file close is required here
        _rc = File.open(@rc_file, 'r').read

        debug_print "\n\n"  

        # Create temp section var to keep track of what we are populating in config
        _section = ""

        # Keep index to print what line we are on
        # Could fool around with Enumerable + each_with_index but oh well
        _i = 0;
            # Fix line endings so we can support Windows/Linux edited rc files
        _rc.gsub!(/\r\n?/, "\n")
        _rc.each_line do | _line |
            debug_print "#{ _i }: #{ _line }" if (_line != "\n")
            _i = _i + 1

Allow closing of issues from watson? Don't like that idea but maybe [lib/watson/github.rb]

filename : lib/watson/github.rb
line # : 13
tag : todo
md5 : d327ee0fc8672c86df6c9d177ef2e81c

    # [todo] - Allow closing of issues from watson? Don't like that idea but maybe
    # [review] - Properly scope Printer class so we dont need the Printer. for 
    #            method calls?
    # [todo] - Keep asking for user data until valid instead of leaving app
            # Include for debug_print
    include Watson

    #############################################################################   
    # Setup remote access to GitHub 
    # Get Username, Repo, and PW and perform necessary HTTP calls to check validity
    def setup(config)
            # Identify method entry
        debug_print "#{ self.class } : #{ __method__ }\n"

Make this a non-debug print to user? [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 224
tag : review
md5 : 2d8b0c860d5920215c042aa05acc948a

            # [review] - Make this a non-debug print to user?
            debug_print "No args passed, exiting\n"
            return false
        end

        # For context_depth we do NOT append to RC, ALWAYS overwrite
        # For each argument passed, make sure valid, then set @config.parse_depth 
        args.each do | _context_depth |
            if _context_depth.match(/^(\d+)/)
                debug_print "Setting #{ _context_depth } to config context_depth\n" 
                @config.context_depth = _context_depth.to_i
            else
                debug_print "#{ _context_depth } invalid depth, ignoring\n"
            end
        end

Make sure all methods have proper return at end [lib/watson.rb]

filename : lib/watson.rb
line # : 19
tag : todo
md5 : a8bb1b568d6b99d37be56c5865fdc965

# [todo] - Make sure all methods have proper return at end

# [review] - Method input arg always renamed from arg to _arg inside method, change this?
#            Not sure if I should just make input arg _arg or if explicit _ is useful 

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files
GLOBAL_DEBUG_ON = false
# Gllobal flag to turn OFF debugging across all files
GLOBAL_DEBUG_OFF = false 

Make this non-debug print to user? [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 75
tag : review
md5 : 134b270988d5245c6371b9eb547ee0fa

            # [review] - Make this non-debug print to user?
            debug_print "Unrecognized flag #{ args[0] }\n"
            args.slice!(0)
        end

        # Parse command line options
        # Grab flag (should be first arg) then slice off args until next flag
        # Repeat until all args have been dealt with
            until args.length == 0
            # Set flag for calling function later
            _flag = args.slice!(0)
                debug_print "Current Flag: #{ _flag }\n"
                # Go through args until we find the next valid flag or all args are parsed 
            _i = 0

Not sure if module_function is proper way to scope [lib/watson.rb]

filename : lib/watson.rb
line # : 36
tag : review
md5 : 689efffa625cb16851d04b12478c5cc4

# [review] - Not sure if module_function is proper way to scope
# I want to be able to call debug_print without having to use the scope
# operator (Watson::Printer.debug_print) so it is defined here as a 
# module_function instead of having it in the Printer class
# Gets included into every class individually
module_function

###########################################################
# Global debug print that prints based on local file DEBUG flag as well as GLOBAL debug flag 
def debug_print(msg)
# [todo] - If input msg is a Hash, use pp to dump it
        # Print only if DEBUG flag of calling class is true OR 
    # GLOBAL_DEBUG_ON of Watson module (defined above) is true
    # AND GLOBAL_DEBUG_OFF of Watson module (Defined above) is false
        # Sometimes we call debug_print from a static method (class << self)

Should command line args append or overwrite config/RC parameters? [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 19
tag : review
md5 : 09b421d74dc4a5721a92c766da0a14d8

    # [review] - Should command line args append or overwrite config/RC parameters?
    #            Currently we overwrite, maybe add flag to overwrite or not?
            # Identify method entry
        debug_print "#{ self } : #{ __method__ }\n"

        # List of possible flags, used later in parsing and for user reference
        _flag_list = ["-c", "--context-depth",
                      "-d", "--dirs",
                      "-f", "--files",
                      "-h", "--help",
                      "-i", "--ignore",
                      "-p", "--parse-depth",
                      "-r", "--remote",
                      "-t", "--tags",
                      "-u", "--update",
                      "-v", "--version"

Allow closing of issues from watson? Don't like that idea but maybe [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 13
tag : todo
md5 : e57eb5ea1ceb66d6f0b9e53b8885129e

# [todo] - Allow closing of issues from watson? Don't like that idea but maybe
# [todo] - Wrap Bitbucket password grabbing into separate method
    # Include for debug_print
include Watson
    #############################################################################   
# Setup remote access to Bitbucket
# Get Username, Repo, and PW and perform necessary HTTP calls to check validity
def setup(config)

    # Identify method entry
    debug_print "#{ self.class } : #{ __method__ }\n"

    Printer.print_status "+", GREEN
    print BOLD +  "Attempting to access Bitbucket...\n" + RESET

Add bold and colored printing [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 159
tag : todo
md5 : 352d5fd0d508d1dd5b0c29b1ed21fb5e

    # [todo] - Add bold and colored printing

        # Identify method entry
        debug_print "#{ self } : #{ __method__ }\n"

        print BOLD;
        print "Usage: watson [OPTION]...\n"
        print "Running watson with no arguments will parse with settings in RC file\n"
        print "If no RC file exists, default RC file will be created\n"
            print "\n"
        print "   -c, --context-depth   number of lines of context to provide with posted issue\n"
        print "   -d, --dirs            list of directories to search in\n"
        print "   -f, --files           list of files to search in\n"
        print "   -h, --help            print help\n"
        print "   -i, --ignore          list of files, directories, or types to ignore\n"
        print "   -p, --parse-depth     depth to recursively parse directories\n"

Don't just check for blank password but invalid as well [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 60
tag : todo
md5 : 3057d15df845cc990e2f01ec72b8cf0a

        # [todo] - Don't just check for blank password but invalid as well
        # Poor mans username/password grabbing
        print BOLD + "Username: " + RESET
        _username = $stdin.gets.chomp
        if _username.empty?
            Printer.print_status "x", RED
            print BOLD + "Input blank. Please enter your username!\n\n" + RESET
            return false
        end
            print "\n"
            # Get repo information, if blank give error
        Printer.print_status "!", YELLOW 
        print BOLD + "Repo information required\n" + RESET
        print "      Please provide owner that repo is under followed by repo name\n"
        print "      e.g. owner: nhmood, repo: watson (case sensitive)\n"

Only give relative path for privacy when posted [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 333
tag : review
md5 : b6c50191344a9be3e454e249d73a84d9

# [review] - Only give relative path for privacy when posted
_body = "__filename__ : #{ issue[:path] }  \n" +
        "__line #__ : #{ issue[:line_number] }  \n" + 
        "__tag__ : #{ issue[:tag] }  \n" +
        "__md5__ : #{ issue[:md5] }  \n\n" +
        "#{ issue[:context].join }"

# Create option hash to pass to Remote::http_call
# Issues URL for GitHub + SSL
# No tag or label concept in Bitbucket unfortunately :(
opts = {:url        => "https://bitbucket.org/api/1.0/repositories/#{ config.bitbucket_api }/#{ config.bitbucket_repo }/issues",
        :ssl        => true,
        :method     => "POST",
        :basic_auth => [config.bitbucket_api, config.bitbucket_pw],
        :data       => [{"title" => issue[:title] + " [#{ issue[:path] }]",
                        "content" => _body }],
        :verbose    => false 

Not sure if explicit file close is required here [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 423
tag : review
md5 : ae184abbc1e4155a7575a3adb8c2c1b8

        # [review] - Not sure if explicit file close is required here
        _rc = File.open(@rc_file, 'r').read
        _update = File.open(@rc_file, 'w')


        # Keep index to print what line we are on
        # Could fool around with Enumerable + each_with_index but oh well
        _i = 0;
            # Keep track of newlines for prettying up the conf
        _nlc = 0
        _section = ""
            # Fix line endings so we can support Windows/Linux edited rc files
        _rc.gsub!(/\r\n?/, "\n")
        _rc.each_line do | _line |
            # Print line for debug purposes

Populate @tag_list, then check size instead [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 336
tag : review
md5 : 0712ce13f6ce50af74864296a3b53a65

# [review] - Populate @tag_list, then check size instead

if @cl_ignore_set
    debug_print "Ignores set from command line, ignoring rc [ignores]\n"
    next
end

# Same as previous for ignores (regex same as dirs)
# Don't eliminate trailing / because not sure if dir can have
# same name as file (Linux it can't, but not sure about Win/Mac)
# [review] - Can Win/Mac have dir + file with same name in same dir?
_mtch = _line.match(/^((\w+)?\.?\/?)+/)[0]
if !_mtch.empty?
    @ignore_list.push(_mtch) 
    debug_print "#{ _mtch } added to @ignore_list\n"
end
debug_print "@ignore_list --> #{ @ignore_list }\n"

Not sure if I should use the open/read/write or Fileutils.cp [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 171
tag : review
md5 : 0a12ea7e18c69f84fd01bb67bc743921

    # [review] - Not sure if I should use the open/read/write or Fileutils.cp

        # Identify method entry
        debug_print "#{ self.class } : #{ __method__ }\n"

        # Generate full path since File doesn't care about the LOAD_PATH
        # [review] - gsub uses (.?)+ to grab anything after lib (optional), better regex? 
        _full_path = __dir__.gsub(/\/lib(.?)+/, '') + "/" + "assets/defaultConf"
        debug_print "Full path to defaultConf (in gem): #{ _full_path }\n"

        # Check to make sure we can access the default file
        if !Watson::FS.check_file(_full_path)
            print "Unable to open #{ _full_path }\n"
            print "Cannot create default, exiting...\n"
            return false
        else

Change debug_print to provide its own \n [lib/watson.rb]

filename : lib/watson.rb
line # : 15
tag : todo
md5 : db012a37f91895a2229eb38f0de53e3d

# [todo] - Change debug_print to provide its own \n

# [todo] - Add ability to pass "IDENTIFY" to debug_print to auto print method entry info 

# [todo] - Make sure all methods have proper return at end

# [review] - Method input arg always renamed from arg to _arg inside method, change this?
#            Not sure if I should just make input arg _arg or if explicit _ is useful 

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files

Replace Identify line in each method with method_added call [lib/watson.rb]

filename : lib/watson.rb
line # : 25
tag : todo
md5 : c53b361c0321aa080aad1df039a731c1

# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files
GLOBAL_DEBUG_ON = false
# Gllobal flag to turn OFF debugging across all files
GLOBAL_DEBUG_OFF = false 
    # [review] - Not sure if module_function is proper way to scope
# I want to be able to call debug_print without having to use the scope
# operator (Watson::Printer.debug_print) so it is defined here as a 
# module_function instead of having it in the Printer class
# Gets included into every class individually
module_function

Not sure this is the correct place to put the Ctrl+C capture [lib/watson/command.rb]

filename : lib/watson/command.rb
line # : 60
tag : review
md5 : 9b282879834ad99eba631c996578d8d0

        # [review] - Not sure this is the correct place to put the Ctrl+C capture
        trap("INT") do
            File.delete(@config.tmp_file) if File.exists?(@config.tmp_file)
            exit 2
        end
            # Parse command line options
        # Begin by slicing off until we reach a valid flag

        # Always look at first array element in case and then slice off what we need
        # Accept parameters to be added / overwritten if called twice
        # Slice out from argument until next argument

        # Clean up argument list by removing elements until the first valid flag    
        until _flag_list.include?(args[0]) || args.length == 0
            # [review] - Make this non-debug print to user?
            debug_print "Unrecognized flag #{ args[0] }\n"

Not sure whether to make check* methods return FP [lib/watson/fs.rb]

filename : lib/watson/fs.rb
line # : 10
tag : todo
md5 : d4a7ed9ab5de76f7b8183e60e49d0f29

    # [todo] - Not sure whether to make check* methods return FP
    #          Makes it nice to get it returned and use it but
    #          not sure how to deal with closing the FP after
    #          Currently just close inside
        # Include for debug_print
    include Watson

    ###########################################################
    # Check if file exists and can be opened
    def check_file(file)

        # Identify method entry
        debug_print "#{ self } : #{ __method__ }\n"

        # Error check for input
        if file.length == 0

Bitbucket OAuth not implemented yet so warn user about HTTP Auth [lib/watson/bitbucket.rb]

filename : lib/watson/bitbucket.rb
line # : 52
tag : todo
md5 : 67d1a8fa1d841d30d4a3d7ff1ec86829

        # [todo] - Bitbucket OAuth not implemented yet so warn user about HTTP Auth
        # Bitbucket doesn't have nonOAuth flow that GitHub does :(
        # Even if I use OAuth lib, still need to validate from webview which is lame
        Printer.print_status "!", RED 
        print BOLD + "Bitbucket OAuth not implemented yet.\n" + RESET;
        print "      Basic HTTP Auth in use, will request PW entry every time.\n\n"
                # [todo] - Don't just check for blank password but invalid as well
        # Poor mans username/password grabbing
        print BOLD + "Username: " + RESET
        _username = $stdin.gets.chomp
        if _username.empty?
            Printer.print_status "x", RED
            print BOLD + "Input blank. Please enter your username!\n\n" + RESET
            return false
        end

Combine into single statement (for performance or something?) [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 13
tag : review
md5 : 65c2f0e70fff3011713c2d9fb7d77d05

    # [review] - Combine into single statement (for performance or something?)
    # [todo] - Add config options (rc file) for default max depth and context lines
        # List of all files/folders to ignore when parsing  
    attr_accessor :ignore_list
    # List of directories to parse  
    attr_accessor :dir_list
    # List of all files to parse
    attr_accessor :file_list        
    # List of tags to look for when parsing
    attr_accessor :tag_list         
    # Number of directories to parse recursively
    attr_accessor :parse_depth
    # Number of lines of issue context to grab
    attr_accessor :context_depth    
        # Flag for command line setting of file/dir to parse

Method input arg always renamed from arg to _arg inside method, change this? [lib/watson.rb]

filename : lib/watson.rb
line # : 21
tag : review
md5 : 884d38a348a7dc8518e2e226bffc96ad

# [review] - Method input arg always renamed from arg to _arg inside method, change this?
#            Not sure if I should just make input arg _arg or if explicit _ is useful 

# [todo] - Add option to save output to specified file
# [todo] - Replace Identify line in each method with method_added call
#          http://ruby-doc.org/core-2.0.0/Module.html#method-i-method_added
    # Separate ON and OFF so we can force state and still let 
# individual classes have some control over their prints
    # Global flag to turn ON debugging across all files
GLOBAL_DEBUG_ON = false
# Gllobal flag to turn OFF debugging across all files
GLOBAL_DEBUG_OFF = false 
    # [review] - Not sure if module_function is proper way to scope
# I want to be able to call debug_print without having to use the scope

Read and store rc FP inside initialize? [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 70
tag : review
md5 : 21917160148caa0b73c4af43307f87b9

    # [review] - Read and store rc FP inside initialize?
    # This way we don't need to keep reopening the FP to use it
    # but then we need a way to reliably close the FP when done 

        # Identify method entry
        debug_print "#{self.class} : #{__method__}\n"
            # Program config
        @rc_file        = ".watsonrc"
        @tmp_file       = ".watsonresults"
            @parse_depth    = 0
        @context_depth  = 15
            # State flags
        @cl_entry_set   = false
        @cl_tag_set     = false

Need to think about what kind of tags this supports [lib/watson/config.rb]

filename : lib/watson/config.rb
line # : 323
tag : review
md5 : fc8255717a95e49635f126006327aa9d

                # [review] - Need to think about what kind of tags this supports
                # Check compatibility with GitHub + Bitbucket and what makes sense
                # Only supports single word+number tags
                _mtch = _line.match(/^(\S+)/)[0]
                if !_mtch.empty?
                    @tag_list.push(_mtch)
                    debug_print "#{ _mtch } added to @tag_list\n"
                end
                debug_print "@tag_list --> #{ @tag_list }\n"

                when "ignore"
                # Same as previous for ignores
                # [review] - Populate @tag_list, then check size instead

                if @cl_ignore_set
                    debug_print "Ignores set from command line, ignoring rc [ignores]\n"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.