The `make style` and `make style-all` commands have been performing well
without glitches for long enough that it is no longer necessary to report
when they don't change the style of a file. Especially in light of the
fact that all the relevant code has been restyled in the past year. This
change makes `make style-all` much less noisy.
I had disabled having `make style-all` restyling fish scripts because a
majority of them did not conform to the style enforced by `fish_indent`.
I recently restyled most of the fish scripts with the exception of the
completion scripts. So this re-enables restyling all scripts with the
exception of completion scripts.
For now don't restyle all the fish scripts. That's because there
are still problems with the `fish_indent` output that require manual
intervention. Not to mention that very few of the fish scripts even
conform to `fish_indent` output at this time.
This change made clang-format apply to our JavaScript sources,
but we haven't yet agreed upon a JavaScript style guide. Once we
agree on one, we can include the JS files in the formatting pass too.
This reverts commit 799d8ddfc4.
This is a regression introduced by 834ebef53c
Bolster with a check for only login sessions too -- hopefully makes it
less annooying on subshells in general.
Fixes#3261
clang-format supports javascript and our 1 obj-c file. Also,
let it pick up a handful of missed files of types we already inteded it
to fix up.
Improve formatting and output.
I noticed that if I've previous done `make test` that a subsequent `make
style-all` attempts to restyle all the fish scripts in the *test* directory.
Those files are transient and not part of the git repository. Limit restyling
all fish scripts just to those in the *share* directory tree. There are a
couple elsewhere in the repo (e.g., *build_tools*) but they can be handled on
an individual basis.
Now that the IWYU cleanup has been merged compile all, not just a couple, of
the builtin modules independent of builtin.cpp. That is, no longer `#include
builtin_NAME.cpp` in builtin.cpp. This is more consistent, more in line with
what developers expect, and is likely to reduce mistakes.
Reduces lint errors from 384 to 336 (-13%). Line count from 6307 to 4988 (-21%).
Another step in resolving issue #2902.
If there are uncommitted changes use `git-clang-format` to limit the style
fixups to the lines being modified.
Refuse to do a `make style-all` if there are uncommitted changes.
Include a fix for the parsing of `git status` output that was recently
incorporated into the lint.fish script.
This changes implements two new make targets: `style` and `style-all`. These
make it easy to ensure that a change conforms to the project style guides for
C++ and fish code.
Fixes#571