pkgdev icon indicating copy to clipboard operation
pkgdev copied to clipboard

pkgdev fmt: add subcommand for mangling ebuilds/files

Open radhermit opened this issue 4 years ago • 1 comments

Without proper bash parsing support, this could still do things like updating file headers and fixing EOF lines and the functionality should be available for external use so pkgdev commit would auto-fix files if requested (https://github.com/pkgcore/pkgdev/issues/5).

radhermit avatar Feb 28 '21 21:02 radhermit

Bash parsing support could let us do some neat things like fixing *DEPEND whitespace and preferred style for specifying dependencies (newlines where appropriate, and so on -- and possibly making it easier to sort them?).

Examples we should be able to do w/o parsing:

  • blank line after EAPI
  • sorting (some) eclasses (at least those which don't export phases)

Examples we can't:

  • "block structure" (some variables in a certain order, space, some other variables in a certain order)
  • sort *DEPEND(?)

thesamesam avatar Feb 28 '21 22:02 thesamesam