Update some docs
This commit is contained in:
@@ -168,12 +168,12 @@ As output, this script should emit whatever the programs it calls emit.
|
|||||||
- 255: error internal to the script in question
|
- 255: error internal to the script in question
|
||||||
|
|
||||||
(FIXME: Unsurprisingly, `gofmt` is the only tool I've tested so far that gets
|
(FIXME: Unsurprisingly, `gofmt` is the only tool I've tested so far that gets
|
||||||
this right. That a file should be reformatted isn't an exceptional condition,
|
this right. It isn't an exceptional condition when a file should be
|
||||||
so there's no good reason to signal failure here.
|
reformatted, so there's no good reason to signal failure here.
|
||||||
|
|
||||||
Even less unsurprisingly, Laravel pint gets it worse than all the others I
|
Even less unsurprisingly, Laravel pint gets it worse than all the others I
|
||||||
checked; it doesn't distinguish misformatted files from files with actual
|
checked; it doesn't distinguish files that need to be reformatted from files
|
||||||
syntax errors.
|
with actual syntax errors.
|
||||||
|
|
||||||
Anyway, `gofmt` is the obviously the model to follow. So we should
|
Anyway, `gofmt` is the obviously the model to follow. So we should
|
||||||
probably drop `1`.)
|
probably drop `1`.)
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ request anyway and we can work on getting it up to snuff.
|
|||||||
- Be easy to configure.
|
- Be easy to configure.
|
||||||
- Be clearly documented. Remember that many programmers are working in
|
- Be clearly documented. Remember that many programmers are working in
|
||||||
high-stress situations. Documentation that is incomplete, unclear, or cute
|
high-stress situations. Documentation that is incomplete, unclear, or cute
|
||||||
will make things even worse for them. Use English correctly and, to the
|
makes things even worse for them. Use English correctly and, to the
|
||||||
extent possible, unambiguously.
|
extent possible, unambiguously.
|
||||||
|
|
||||||
## Non-goals
|
## Non-goals
|
||||||
|
|
||||||
|
- We don't want to do anything with warnings etc that aren't specifically
|
||||||
|
formatting-related
|
||||||
|
|
||||||
# Wishlist
|
# Wishlist
|
||||||
|
|
||||||
@@ -46,12 +48,16 @@ request anyway and we can work on getting it up to snuff.
|
|||||||
conclusion.
|
conclusion.
|
||||||
- Write a doctor command to identify potential issues (you'd probably run it
|
- Write a doctor command to identify potential issues (you'd probably run it
|
||||||
similarly to how you run the install script, but `s/install/doctor`).
|
similarly to how you run the install script, but `s/install/doctor`).
|
||||||
|
- Create a nix setup that includes all the tools as fallbacks
|
||||||
|
- Cache file type sniffing results? How?
|
||||||
|
|
||||||
# Problems
|
# Problems
|
||||||
|
|
||||||
- It would probably be better if we wrote reformatted code to temp files and
|
- It would probably be better if we wrote reformatted code to temp files and
|
||||||
atomically renamed them. This might mean that the tool-specific programs
|
atomically renamed them. This might mean that the tool-specific programs
|
||||||
should emit diffs rather than working silently as they currently do.
|
should emit diffs rather than working silently as they currently do. The
|
||||||
|
rationale is that this makes it a lot easier to atomically apply two or more
|
||||||
|
fixers.
|
||||||
- It probably doesn't work on Windows as-is.
|
- It probably doesn't work on Windows as-is.
|
||||||
- There are probably some Linuxisms and maybe even some recentbashisms.
|
- There are probably some Linuxisms and maybe even some recentbashisms.
|
||||||
- It doesn't work with tramp.
|
- It doesn't work with tramp.
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -1,4 +1,4 @@
|
|||||||
would-reformat - automatic reformatting for emacs without being annoying
|
would-reformat - automatic reformatting for emacs (and maybe other editors) without being annoying
|
||||||
|
|
||||||
# Motivation
|
# Motivation
|
||||||
|
|
||||||
@@ -38,9 +38,13 @@ saving a file and to run `do-reformat.sh` when you hit `<F1>`.
|
|||||||
- typescript
|
- typescript
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
Out of the box, python uses `isort` and `black`, go uses `gofmt`, and dart
|
Out of the box, for python we use `isort` and `black`, for go we use `gofmt`,
|
||||||
uses `dart format`. The rest use `prettier`. Adding new programming
|
for dart we use `dart format`, for rust we use `rustfmt`, and for everything
|
||||||
languages is easy, assuming they have a formatter with a dry run mode.
|
else we use `prettier`.
|
||||||
|
|
||||||
|
Adding suuport for other programming languages is easy, assuming they have a
|
||||||
|
formatter with a dry run mode. And even if they don't it shouldn't be that
|
||||||
|
bad.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user