seattlerb / debride

Analyze code for potentially uncalled / dead methods, now with auto-removal.
https://www.zenspider.com/projects/debride.html
720 stars 19 forks source link

create YamlFormatter. #36

Closed sizer closed 2 years ago

sizer commented 7 years ago

I added an option --format and YamlFormatter. It is a key factor using linter like debride that reusing linter log to import another libraries. For make more useful debride I added YamlFormatter.

If you like it, merge this PR :)

usage of --format is looks like below.

debride [options] files_or_dirs

Specific options:

    -h, --help                       Display this help.
    -e, --exclude FILE1,FILE2,ETC    Exclude files or directories in comma-separated list.
    -w, --whitelist FILE             Whitelist these messages.
        --focus PATH                 Only report against this path
    -r, --rails                      Add some rails call conversions.
    -v, --verbose                    Verbose. Show progress processing files.
    -f, --format                     Set formatter formatting log.
$ debride ./app/models -f yml
These methods MIGHT not be called:
Address:
  - address_detail                      # ./app/models/address.rb:315-321
zenspider commented 2 years ago

Thank you! It's a good idea, but there's some problems with this PR:

Based on your idea, I've added --json and --yaml output options.

I'm going to close this PR.