Commit Graph

98 Commits

Author SHA1 Message Date
Kurtis Rader
2d26a262e7 make cppcheck useful again 2016-11-11 20:48:34 -08:00
Aaron Gyes
839cd2a1c7 lint.fish: fix line number display 2016-11-05 15:38:49 -07:00
Aaron Gyes
adba0550d5 lint.fish: colorize cppcheck output 2016-11-05 15:37:19 -07:00
Kurtis Rader
7cca963b8f lint all programs on macOS 2016-11-04 20:12:51 -07:00
Kurtis Rader
17f5727e7e do not restyle all fish 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.
2016-10-04 19:48:40 -07:00
Aaron Gyes
a5e31cb0f1 quiet make builds: part two
* 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.
2016-08-09 05:05:15 -07:00
Aaron Gyes
71e1e38426 Silence the Makefile build
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
2016-07-31 12:24:35 -07:00
ridiculousfish
e1ab6494cd Revert "Improve style script."
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.
2016-07-24 17:58:56 -07:00
ridiculousfish
5eedb0ee9c Revert "Only show fish greeting for interactive logins"
This reverts commit 3a7a6f16ef.
2016-07-24 16:39:43 -07:00
Aaron Gyes
3a7a6f16ef Only show fish greeting for interactive logins
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
2016-07-24 00:05:05 -07:00
Aaron Gyes
799d8ddfc4 Improve style script.
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.
2016-07-23 05:02:27 -07:00
Aaron Gyes
fa78a7101c Make IWYU output in lint.cpp less messy
And re-run IWYU, adjust #includes.
2016-06-23 17:26:08 -07:00
Aaron Gyes
f04644f749 Lossless recompress of images with pngcrush+zopfli
And tweak RTF.
2016-06-18 10:03:26 -07:00
Kurtis Rader
dc58edd521 implement custom cppcheck rules
I recently noticed there were several invocations of `wcwidth()` that should
have been `fish_wcwidth()`. This adds custom cppcheck rules to detect that
mistake.
2016-06-17 20:16:21 -07:00
ridiculousfish
d77c20b09a Don't cppcheck the pcre sources 2016-06-11 15:35:52 -07:00
ridiculousfish
d910aa15fe Avoid using chmod --reference in style.fish
chmod --reference is not available on OS X
Instead, we copy the source file into the temporary path, so that
mode bits are preserved
2016-06-11 15:28:40 -07:00
Kurtis Rader
5bf1b0e5f5 fix random lint issues
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.
2016-05-29 22:24:29 -07:00
David Adam
d7a4838a54 make_pkg: allow output to an environment-controlled path 2016-05-25 17:21:05 +00:00
David Adam
6d6f67ee67 make_pkg: use a temporary directory rather than just /tmp 2016-05-25 17:11:02 +00:00
David Adam
987f7cafd3 make_tarball: use a temporary directory rather than just /tmp 2016-05-25 16:56:00 +00:00
David Adam
b883e59ee9 make_tarball: search for a tar that supports the options we need 2016-05-25 16:56:00 +00:00
David Adam
79fa4d5c4a make_tarball: allow output to an environment-controlled path 2016-05-25 16:56:00 +00:00
David Adam
23de5908cf make_tarball: minor cleanup 2016-05-25 16:56:00 +00:00
David Adam
8fba36b242 make_tarball: generate SHA-256 hashes, not SHA-1
Closes #3048.
2016-05-23 22:25:57 +00:00
David Adam
85e701f422 build_tools: drop make_deb and description-pak
[ci skip]
2016-05-22 22:54:44 +00:00
David Adam
21fc2decd7 lint, style: use git plumbing commands
Rather than using porcelain commands, try using plumbing for a more
stable interface with less string munging.
2016-05-18 23:00:30 +00:00
Kurtis Rader
b055b8440c enhance the key_reader program
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
2016-05-10 14:11:30 -07:00
Kurtis Rader
0d1d324e9f only deal with files that exist
I noticed while working on an unrelated change that deleting a file caused
`make lint` to behave in an unexpected manner.
2016-05-08 12:08:23 -07:00
Kurtis Rader
e1a706bd77 limit make style-all to fish scripts in share
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.
2016-05-03 19:37:27 -07:00
Kurtis Rader
df10b53c0c restyle builtin modules to match project style
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.
2016-04-26 21:58:59 -07:00
Kurtis Rader
1f06e5f0b9 add better support for IWYU and fix things
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
2016-04-26 15:02:22 -07:00
David Adam
f28a1c58f3 build_tools/make_pkg: fixups for versioning and Xcode preferences
[ci skip]
2016-04-20 14:54:49 +08:00
David Adam
9aeed0dc06 Merge branch 'Integration_2.3.0'
Merge the pcre2 10.20 to 10.21 update.

Closes #2943.
2016-04-19 16:28:03 +08:00
Aaron Gyes
0fd3f5c0dd Update to pcre2 10.21
Point build tools at 10.21
2016-04-19 11:49:12 +08:00
Kurtis Rader
706bfa70c1 improve the style.fish script
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.
2016-04-12 19:57:07 -07:00
Kurtis Rader
6431c0de16 fix bug in lint.fish helper 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.
2016-04-12 18:32:20 -07:00
Kurtis Rader
784b438d4a fix git command in lint.fish script 2016-04-07 13:47:51 -07:00
Kurtis Rader
8e8b5a6481 augment the guide for contributing
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
2016-04-05 19:19:57 -07:00
Kurtis Rader
fd1b7ba529 support making fish code match the style guide
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
2016-04-04 21:00:43 -07:00
Kurtis Rader
47f1a92cc4 fixes for cppcheck lint warnings
Refine the linting behavior.

Fix several of the, mostly trivial, lint errors.
2016-04-04 14:34:28 -07:00
Kurtis Rader
6fa09e6a70 add make targets to lint the code
Fixes #2818
2016-04-01 16:29:06 -07:00
Kurtis Rader
35cee1e39c remove "doc" make target and rename "user_doc"
Fixes #2874
2016-03-30 19:20:23 -07:00
Ian Ray
9ecd73d956 Generate version numbers for Xcode builds
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
2015-09-29 14:55:51 -07:00
David Adam
299a383d98 Makefile: add target for Include What You Use (iwyu)
Requires http://include-what-you-use.org/ and Clang to operate.
Doesn't quite work for the builtin_* collection; that has to be done by
hand.
2015-07-29 21:41:57 +08:00
ridiculousfish
16ad5d3a2e Add cppcheck.sh driver script for running cppcheck 2015-07-25 17:33:34 -07:00
Kevin Ballard
ec5f3d0cc8 Don't require .git before running git-describe
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.
2014-10-27 15:46:22 -07:00
Konrad Borowski
c3bacc78c7 Mark unknown versions as unknown. 2014-10-12 15:01:48 +02:00
Mark Griffiths
aed92b9a2c Merge branch 'master' into documentation-update 2014-09-07 16:37:31 +01:00
Mark Griffiths
35e6fb3788 Updated build_doc…sh to run cleanly in Xcode build
If the lexicon input filter isn't specified (as is the case in the
current Xcode project, the script quietly continues without it.
2014-09-03 14:43:26 +01:00
Mark Griffiths
14a7118499 Revert 60b9f8d..e4d6eaf
This rolls back to commit 60b9f8db18.
2014-09-03 14:43:26 +01:00