Commit graph

199 commits

Author SHA1 Message Date
Lior Stern
d7aeac3c61 Add clang-tidy to build_tools/lint.fish 2020-04-04 14:47:58 -07:00
Fabian Homborg
edad6aa607 Update littlecheck
Now featuring Context display on error, which should make it a bit
easier to make out any problems.
2020-03-29 15:21:09 +02:00
ridiculousfish
11c1491e5a Import latest littlecheck
Commit b2f40783a2b5b0663409c4daa90b794b02dd37a6

This has better progress reporting, and the exit status of littlecheck
indicates how many test failures there were.
2020-03-15 17:45:11 -07:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
ridiculousfish
6721bf4031 Add the get-task-allow entitlement
This allows Mac fish to be debugged.
2020-02-29 15:29:50 -08:00
ridiculousfish
f6fc5afc59 Add a script to help notarize Mac build artifacts
This makes the Mac release process less painful.
2020-02-18 12:55:11 -07:00
ridiculousfish
d989ce72d0 Teach make_pkg.sh to codesign
It respects MAC_CODESIGN_ID and MAC_PRODUCTSIGN_ID variables.
2020-02-18 12:55:11 -07:00
Fabian Homborg
65883e0e40 Restyle
Mostly line breaks, one instance of tabs!

For some reason clang-format insists on two spaces before a same-line comment?

(I continue to be unimpressed with super-strict line length limits,
but I continue to believe in automatic styling, so it is what it is)

[ci skip]
2020-02-17 14:14:05 +01:00
David Adam
07ba0cb84a make_tarball: use XZ for compression
Closes #5460.
2020-02-14 22:00:38 +08:00
David Adam
6682f0e8ca make_pkg: use absolute source directories in all arguments 2020-02-11 14:26:00 +08:00
Fabian Homborg
f5a3a259dc Fix littlecheck on python 2 2020-01-25 15:31:10 +01:00
Fabian Homborg
25810b70f2 Update littlecheck
This allows:

- Running scripts via shebang (not important here)
- Progress output (so we can ditch more of our run script)
- Context (only after, for now) - this is important if there is a test failure
2020-01-25 11:54:42 +01:00
Fabian Homborg
69b464bc37 Run fish_indent on all our fish scripts
It's now good enough to do so.

We don't allow grid-alignment:

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z              -a '(something)'
```

becomes

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```

It's just more trouble than it is worth.

The one part I'd change:

We align and/or'd parts of an if-condition with the in-block code:

```fish
if true
   and false
    dosomething
end
```

becomes

```fish
if true
    and false
    dosomething
end
```

but it's not used terribly much and if we ever fix it we can just
reindent.
2020-01-13 20:34:22 +01:00
ridiculousfish
4f3b3f7d61 Rename GIT_DIR to FISH_BASE_DIR in git_version_gen.sh
$GIT_DIR is interpreted by git as an environment variable, pointing at the
.git directory. If git_version_gen.sh is run in an environment with an
exported GIT_DIR, it will re-export GIT_DIR to point at the fish source
directory. This will cause git operations to fail.

This could be reproduced as building fish as part of an interactive rebase
'exec' command. git_version_gen.sh would always fail!
2019-12-16 19:18:56 -08:00
David Adam
5911fc94b8 littlecheck: pass close_fds to subprocess.Popen
Closes #6435.

close_fds=True is actually the default in Python 2.7 and 3.2, but not in
ancient (but still in production in Red Hat Enterprise Linux 6) Python
2.6. Enable it there as well.
2019-12-15 21:48:55 +08:00
Rosen Penev
72bf267d96 make_pkg: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-30 09:27:50 +01:00
Rosen Penev
9fe7efb82f git_version_gen: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-30 09:27:50 +01:00
Rosen Penev
a755bc5cf6 make_tarball.sh: Run through shellcheck 2019-11-28 18:57:38 +01:00
Jason
3cf6ebc0e1 Amend typos and grammar errors 2019-11-25 13:07:15 +01:00
David Adam
66fd52aa15 fish_xgettext: update translation generation for new build system
Closes #6123.
2019-09-21 22:29:19 +08:00
Fabian Homborg
cc1388a78a Upgrade littlecheck to allow whitespace before comments
Necessary for test files that pass fish_indent.
2019-06-25 16:11:24 +02:00
ridiculousfish
476185748f Add littlecheck.py
This will be the new testing tool replacing the diff-based tests.

Imported from https://github.com/ridiculousfish/littlecheck
Version e28281273e54745c7d7aabeeb4b085af477d584b
2019-06-16 13:27:06 -07:00
Fabian Homborg
7ddae68645 Restyle a few stragglers
THERE WERE TABS! TABS!

TABS!

[ci skip]
2019-05-20 21:07:37 +02:00
Fabian Homborg
c2b7e9b2e6 fish_indent: Allow multiple file arguments
Allows `fish_indent -w **.fish` to restyle all fish files under the
current directory.

(This also has the sideeffect of reducing style.fish time by ~10s, as
we only need to invoke `fish_indent` once, instead of once per-file)
2019-05-20 21:04:51 +02:00
Fabian Homborg
4078a3df26 build_tools/style.fish: Stop excluding completions
[ci skip]
2019-05-05 12:54:02 +02:00
Fabian Homborg
df7cb66ff9 build_tools/style: Make output a bit spicier.
COLORS! ALL THE COLORS! Well, three! No, wait, FOUR! But only if you
count "normal" as a color!

[ci skip]
2019-05-05 12:07:38 +02:00
Fabian Homborg
2b3f48d9ee build_tools/style.fish: Use black as python formatter
(Also renames the silly "$f_files" to "$fish_files")
2019-05-05 12:07:38 +02:00
ridiculousfish
36998eee55 Make more miscellaneous globals thread safe 2019-05-04 20:58:35 -07:00
ridiculousfish
18cecd3663 Beef up find_globals
Allow it to find the source declarations for globals, and ignore const ones.
2019-05-04 20:42:48 -07:00
Lily Ballard
aafd706a34 Replace Doxygen reference in README with Sphinx
Also update a comment in the `make_tarball.sh` script.
2019-03-31 21:39:03 +08:00
David Adam
83b4adffc0 make_pkg: get static version if git is not available 2019-02-28 21:08:02 +08:00
David Adam
ba64ec6e91 lint: drop CXX argument
The "fatal error: 'stddef.h' file not found" error is caused by incomplete installation of IWYU,
which can be fixed directly.

See https://github.com/include-what-you-use/include-what-you-use/issues/100
2019-02-28 22:03:57 +11:00
David Adam
a0f785c90f build_tools/style: drop guidance to use make 2019-02-28 22:03:57 +11:00
David Adam
e9b853e0c2 make_tarball: use cmake instead of Autotools for doc generation 2019-02-28 22:03:56 +11:00
Fabian Homborg
5e98259d95 autotools: Fix lint target
This used "argparse" to parse the args, which broke since CXXFLAGS
contained options.

Instead we pass "--all" before any other arguments, and then stop
argparse at nonoptions.
2019-02-25 15:15:40 +01:00
ridiculousfish
c99fa08f21 Remove all of the documentation build helper scripts 2019-02-24 19:40:05 -08:00
David Adam
e461858964 travis: blacklist stl_tree from UBSan
Work on #2852.
2019-02-10 16:24:24 +08:00
ridiculousfish
23f8f1b6fb Remove some stale bits from make_pkg.sh 2019-02-05 22:14:43 -08:00
ridiculousfish
0f5dc0b4e2 Add --stdout param to git_version_gen.sh
This causes git_version_gen.sh to print to stdout.
2019-02-05 22:14:43 -08:00
ridiculousfish
c869ab541d Remove some additional xcode references 2019-02-05 22:14:43 -08:00
ridiculousfish
ecb808fb39 Teach make_pkg.sh to build fish.app via cmake 2019-02-05 22:14:43 -08:00
ridiculousfish
eaefed434d make_pkg.sh to build with CMake instead of Xcode 2019-02-05 22:14:43 -08:00
Fabian Homborg
eb8a93f499 lint.fish: Modernize a bit
Use argparse, variable-as-command, skip missingInclude.
2019-02-04 16:58:38 +01:00
David Adam
b60a9d8c4a pcre2: move to PCRE2 10.32
Closes #5353.
2018-12-29 22:54:40 +08:00
Mahmoud Al-Qudsi
a5b8359c1c Add script for diffing two fish profile runs
Came in handy for tracking down the performance regression in #5219. This will
take the output of two (necessarily identical) `fish --profile ...` runs and
produce a third profile log in which all times are the difference between the
first and the second profile provided.

(I'm not sure if build_tools is the right place for it, but I think it's OK?)
2018-10-14 16:45:16 -05:00
ridiculousfish
36a149337b Eliminate / vet and whitelist some more globals 2018-09-29 01:11:15 -04:00
ridiculousfish
20cb62440c Eliminate some mutable global variables
Make them const or otherwise get rid of them
2018-09-29 00:20:50 -04:00
ridiculousfish
f465760d1f Add a tool to locate global variables 2018-09-29 00:18:33 -04:00
David Adam
1e0fab4fa4 git_version_gen: add support for out-of-tree tarballs
Closes #4122.
2018-08-28 23:10:24 +08:00
Mahmoud Al-Qudsi
f741968d6d Drop hard dependency on bash from git_version_gen.sh again
I can't seem to find a reason why the shell interpreter needs to be bash
and not just sh here. Needed to replace `BASH_SOURCE[0]` with the legacy
`$0` supported by sh, but otherwise it seems to still work.

Many non-Linux platforms do not ship with bash out-of-the-box (and as a
shell, I don't think we need to encourage the further proliferation of
bash ;-), this lets fish build on a clean install of FreeBSD, which does
not have bash.
2018-06-01 12:48:03 -05:00