pilosus / pip-license-checker

Check license types for third-party dependencies: permissive, copyleft, proprietory, etc.
https://blog.pilosus.org/posts/2021/09/07/pip-license-checker/
Other
67 stars 3 forks source link

Formatting long lines #80

Closed pilosus closed 3 years ago

pilosus commented 3 years ago

Some package names or license names are way too long for existing report formatting (see example on Print report step).

There are the following possible solutions to the problem:

  1. Introduce an option with printf format string to be used instead of the hardcoded values
  2. Calculate optimal formatting automatically by analyzing all the rows of the final report. Possibly, add an option flag to turn on/off auto-formatting
  3. Introduce a new --external-format called edn to support lein-licenses with --extra-options to shorten fully-qualified package names (just like for gradle format)
  4. Truncate long lines to the limit in accordance with the formatter's constants.

Option 3 seems to be orthogonal to the problem. Option 4 may be implemented along with option 1: we truncate the strings but allow to set the limits via the option flag. Option 2 sounds good, although examples of existing software choosing this approach would be a good idea.