PR #3794 changes the command-line args for Leo's new beautifier

14 views
Skip to first unread message

Edward K. Ream

unread,
Feb 14, 2024, 11:00:28 AM2/14/24
to leo-editor

PR #3794 is now part of devel. This PR changes the command-line arguments for Leo's new beautifier (in leoTokens.py) as follows:


`-a, --all`: Beautify all given files instead of all *changed* given files.

`-c, --changed`: Report changed files by name.

`-d, --diff`: Show diffs of changed files.

`-r, --report`: Show a summary report.

`-w, --write`: Write all changed files. Without this option, run in "dry run" mode.


These options are now orthogonal: options do not significantly affect other options.


The PR changes the script `full-test-leo.cmd` accordingly.


Edward

Edward K. Ream

unread,
Feb 14, 2024, 8:26:43 PM2/14/24
to leo-e...@googlegroups.com
On Wed, Feb 14 at 10:00 AM Edward K. Ream wrote:

> PR #3794 is now part of devel. This PR changes the command-line arguments for Leo's new beautifier (in leoTokens.py).

And now PR #3795 is also in the "devel" branch. This PR:


- Changes the name of the 'changed' command-line arg to 'beautified.'

- Fixes a long-standing botch that interfered with summary reports.

- Ensures that the beautifier never changes a file if any error arises while beautifying that file.


These changes are worth doing on their own. They will also help evaluate the project to transliterate leoTokens.py into Nim. I'll explain why in a future post.


Edward

Reply all
Reply to author
Forward
0 new messages