Commit graph

106 commits

Author SHA1 Message Date
mathbunnyru
9768653df7 New pcre2 2017-01-18 16:44:48 -08:00
mathbunnyru
7a80610300 Delete trailing spaces 2017-01-15 14:57:21 -08:00
Kurtis Rader
42eaacd3a1 enable make style-all doing fish scripts
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.
2016-12-03 20:39:32 -08:00
David Adam
417255fc55 Makefile: skip the open manpage on OS X
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.
2016-12-03 12:44:35 +08:00
ridiculousfish
e97c5b552c Update make_tarball.sh to run autoreconf instead of autoconf
This is necessary as part of the autotools build changes
for C++11
2016-11-26 15:02:19 -08:00
ridiculousfish
c7a016a137 Enable C++11 in 'make lint'
autotools implements C++11 support by setting $CXX to
"g++ -std=c++11", so we have to make sure to quote $CXX when
passing it to the linter script
2016-11-26 12:59:00 -08:00
Kurtis Rader
521546a986 fix some lint warnings
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.
2016-11-15 21:15:22 -08:00
Kurtis Rader
8645aa94c8 improve linting tool
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.
2016-11-14 19:20:12 -08:00
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