Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer help message #37

Closed
porglezomp opened this issue Sep 26, 2018 · 6 comments
Closed

Nicer help message #37

porglezomp opened this issue Sep 26, 2018 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@porglezomp
Copy link

The help message produced by scc is somewhat confusing and hard to read.

The help text is currently 170 columns wide. It could benefit from line wrapping, ideally automatic based on terminal width, but I understand if that's out of scope.

Current:

   --wide, -w           Set to check produce more output such as complexity and code vs complexity ranking. Same as setting format to wide

Wrapping for 100 columns:

   --wide, -w           Set to check produce more output such as complexity and
                        code vs complexity ranking. Same as setting format to wide.

In addition, many of the help messages are phrased awkwardly, which makes the width issue worse.

For example, --files has the description "Set to specify you want to see the output for every file" which could be written more concisely as "Display output for every file".

@boyter
Copy link
Owner

boyter commented Sep 27, 2018

I will admit copy writing is not my strong point.

I will have to see about wrapping. Its done though https://github.com/urfave/cli and I don't remember a way to do it in an automated way, but perhaps newlines will work.

If you want to submit a PR with redone messages id be happy to merge it in. Otherwise I am afraid my best guess might still be awkward.

Let me know either way and ill look into the wrapping.

@boyter boyter added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Sep 27, 2018
boyter added a commit that referenced this issue Sep 28, 2018
@boyter
Copy link
Owner

boyter commented Sep 28, 2018

Have modified some of the copy as suggested. Not sure if I can modify the wrapping, still investigating this.

@boyter
Copy link
Owner

boyter commented Sep 28, 2018

$ scc --help
NAME:
   scc - Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.

USAGE:
   scc DIRECTORY

VERSION:
   1.10.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --languages                         Print out supported languages and extensions
   --format value, -f value            Set output format [possible values: tabular, wide, json, csv] (default: "tabular")
   --output value, -o value            Save to file, defaults to stdout
   --pathblacklist value, --pbl value  Which directories should be ignored as comma separated list (default: ".git,.hg,.svn")
   --sort value, -s value              Sort based on column [possible values: files, name, lines, blanks, code, comments, complexity] (default: "files")
   --exclude value, -e value           Ignore files and directories matching a regular expression
   --whitelist value, --wl value       Restrict file extensions to just those provided as a comma separated list E.G. go,java,js
   --files                             Display output for every file
   --verbose, -v                       Enable verbose output
   --duplicates, -d                    Check for and remove duplicate files from stats and output
   --complexity, -c                    Skip complexity calculations, note this will be overridden if --wide -w is set
   --wide, -w                          Wider output with additional statistics
   --averagewage value, --aw value     Integer to override the average wage value used for basic COCOMO calculation (default: 56286)
   --cocomo, --co                      Set to check remove COCOMO calculation output
   --filegccount value, --fgc value    How many files to parse before turning the GC on (default: 10000)
   --binary                            Disable binary file detection
   --debug                             Enable debug output
   --trace                             Enable trace output, not recommended when processing multiple files
   --help, -h                          show help
   --version, --ver                    Print the version

@porglezomp
Copy link
Author

That's a lot clearer. The only big issue I still have with it is for --cocomo which looks like it didn't get an update. I'd just write that as "Remove COCOMO calculation output"

@boyter
Copy link
Owner

boyter commented Oct 3, 2018

Dammit I had a feeling I might have missed one. Ill update that as well.

@boyter
Copy link
Owner

boyter commented Oct 3, 2018

Done.

@boyter boyter closed this as completed Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants