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'm starting to wonder if IWYU is worth the effort. Nonetheless, this
makes it lint clean on macOS and reduces the number of warnings on
FreeBSD and Linux.
Commit 8645aa94 was made because it seemed necessary at the time. However,
when I run `make lint-all` now it complains about include loops for header
`signal.h`. This reverts part of that earlier commit to get sane behavior
from IWYU again.
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.
This is normally handled by the build_documentation.sh script, but if
the tarball includes the documentation then that script is never run.
We should do it in both places as the Xcode build uses only the
build_documentation.sh script!
Fixes#2561.
This fixes some of the IWYU and cppcheck lint warnings. And only on
macOS (formerly OS X). Fixing these types of warnings on a broader set
of platforms should be done but this is a baby step to making `make
lint-all` have few, if any, warnings. This reduces the number of lines
in the `make lint-all` output on macOS by over 500 lines.
I found that after fixing the args to `cppcheck` it started reporting
lots of varFuncNullUB warnings. Suppress them as they should be safe to
ignore. Also, improve the readability of the script.
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.
* Use the Makefile mechanism to also detect old key_reader binaries
Don't tell them to delete it - just that they might want fkr.
You'd have to of installed it manually. Not unhelpful to point
that out here.
* Remind folks to start a new fish session after install
* Add output for installation during silent builds
* Suppress "Fish has been built, use make install..." if fish was
actually built with a goal of `make install' from the command-line
already and it's already working on that. It can be confusing.
* Get rid of the $(call) stuff for color usage
Fixes problem with gucked up output when doing parallel builds
* Brighten up output with more colors and fancy attributes.
Works fine with TERM=dumb
* Introduce show-VAR targets - with VAR being a variable name,
adding this to the target list wherever you like will cause
the pretty-printed VAR='VAR' output. Can also use MAKE show-FOO
to quickly diagnose problems.
* Put the -D macros in CPPFLAGS (C preprocessor flags) as God
intended instead of MACROS. CPPFLAGS was already defined but
empty - and MACROS was getting added to CXXFLAGS and used on
every CXX invocation.
* Addresss a handful of missed bits from the initial silent make
merge. Like msgfmt output.
* Fix config.status output being completely silenced even when
it's re-running ./configure.
* Work around annoyance with PCRE being perfectly quiet except a
minority of the rm's during make clean.
There was a lot of very noisy output for things
we do not care about, particularly the echoing of clang commands,
installs, and doxygen output.
We now show output like " CXX src/fish.o" and not much else
unless there is a problem.
Add mechanism to show e.g. CXXFLAGS variables at top of build.
Improve make docs output
Highlight FISH_BUILD_VERSION
FISH_BUILD_VERSION is yellow.
Run ./configure with -q
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 recently noticed there were several invocations of `wcwidth()` that should
have been `fish_wcwidth()`. This adds custom cppcheck rules to detect that
mistake.
This only eliminates errors reported by `make lint`. It shouldn't cause any
functional changes.
This change does remove several functions that are unused. It also removes the
`desc_arr` variable which is both unused and out of date with reality.
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.
Fixes#2991
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.
Remove the "make iwyu" build target. Move the functionality into the
recently introduced lint.fish script. Fix a lot, but not all, of the
include-what-you-use errors. Specifically, it fixes all of the IWYU errors
on my OS X server but only removes some of them on my Ubuntu 14.04 server.
Fixes#2957
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.
I just noticed that depending on the state of your working tree there can be
one or more spaces after the modification token and the file name. If there is
more than one space that causes the `string split` to produce unexpected
output.
Include information about how to deal with lint warnings and suppress
`clang-format` reformatting of blocks of code.
Move information only relevant to developers from the README.md to the
CONTRIBUTING.md document.
Closes#2901
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
Teach Xcode to run new script xcode_version_gen.sh before building
the fish_shell and fish_indent targets. The script generates file
fish-build-version.h for inclusion by fish_version.cpp.
Note that Xcode always runs the script because of the phony target
named force-fish-build-version.h, but fish-build-version.h is only
touched if the contents of FISH-BUILD-VERSION-FILE change.
Fixes#890
When calculating the version, we don't need to test for the presence of
.git before running `git describe`. This lets us work properly in a
detached work tree if GIT_DIR is set.
Note: if you have previously cloned the repository, the tags for
previous versions have been edited. Use `git fetch --tags` to
synchronise your local copy.
Include config.h.in as well as configure.
Also sets correct owner, group and mode for all appended files.
Update the mtime of all appended files so that configure and config.h.in
are always newer than configure.ac.
(Fixes many problems introduced by 5023ade7, and makes the commit
message actually true.)
For the next release, this means that `autoconf` is no longer required
if building from the tarball. The website and documentation should be
updated accordingly at that time.
This commit hooks the Makefile up to generate a FISH_BUILD_VERSION
symbol and kills off PACKAGE_VERSION in .cpp files.
It also modifies the tarball generation script to add the necessary
version file for releases.
- etc/config.fish and share/config.fish are now "universal" and no longer reference install paths or need to be touched by autotools. They've been removed from config.fish.in to config.fish.
- fish now attempts to determine __fish_datadir and __fish_sysconfdir relative to the path of the fish executable itself (typically by walking up one directory). This means that you can copy the directory hierarchy around and things will still work. The compiled-in paths are used as a backup.
- The fish Xcode project now can build fish natively, without needing autotools.
- Version bumped to 2.0