Commit graph

22 commits

Author SHA1 Message Date
sideshowbarker
570814a31e Meta: Make all pre-commit CI scripts work with Bash 3.2
This change makes all the pre-commit CI scripts runnable under Bash 3.2,
by replacing “mapfile” invocations in them code that first explicitly
creates an array, and then uses a while loop to populate the array.

Otherwise, without this change, the scripts all fail to run under Bash
3.2 — due to lack of support for “mapfile”.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/283

This also drops bash from the list of homebrew dependencies in the build
instructions — because with this change, homebrew bash (v4) is no longer
needed; things will now work with the Apple-provided bash (v3.2)
2024-07-16 08:56:22 -06:00
Tim Ledbetter
3e56835611 Everywhere: Remove references to non-existent paths 2024-06-03 10:53:53 +02:00
Tim Schumacher
9d6c4c5137 Meta: Allow shellcheck to search sourced files in the script directory 2022-10-16 23:39:45 +02:00
Ali Mohammad Pur
302a0c54f0 Base: Add some default completions to shellrc 2022-04-18 19:53:10 +04:30
Brian Gianforcaro
95b295971d Everywhere: Move tests to /home/anon/Tests 2022-03-20 22:20:59 +01:00
Brian Gianforcaro
4b2bbe6a7e Meta: Skip shellcheck for Ports in pre-commit hook
Shellcheck barfs on many of the patterns we use in port scripts, the
check is already disabled when we run the script in CI, so we might as
well disable the check for pre-commit as well.
2022-01-17 11:17:15 +01:00
thislooksfun
03494ed6ba Meta: Add a check to ensure grep -P stays gone
grep -P does not work on macOS, but grep -E does.
2021-11-02 12:23:30 +01:00
Ben Wiederhake
2caad04d23 Base: Add new system-mode that just generates manpages 2021-11-01 21:12:58 +01:00
Brian Gianforcaro
83dca542bb Meta: Enable linting of shell scripts under Toolchain
Now that everything under Toolchain is shellcheck clean,
remove it from the exception list.
2021-05-05 21:26:37 +02:00
Andrew Kaster
611bbc43be Base/CI: Boot serenity in CI in a mode that runs tests on target
Build a new version of Serenity in CI that doesn't have all the debug
symbols on, or we'd be waiting a very long time to boot.

Insert a TestRunner entry into SystemServer.ini that will run a shell
script that runs tests in /bin and /usr/Tests and shuts down the system
in the new self-test boot mode. Also make sure enough basic services are
started in self-test such that the tests will actually run properly.
2021-02-28 18:19:37 +01:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Andreas Kling
c4e2fd8123 Shell: Move to Userland/Shell/ 2021-01-12 12:04:07 +01:00
Andrew Kaster
9e5aa6f794 Meta: Only complain about linter tools if relevant files have changed 2021-01-10 16:39:21 +01:00
Linus Groh
51bcfb5a44 Meta: Update lint-{clang-format,shell-scripts}.sh to take a list of files
This should speed up pre-commit a bit as only files that are staged will
be processed, and clang-format and shellcheck are only invoked once, not
for every file. When no arguments are given (e.g. on CI), it still uses
'git ls-files'.
2020-12-27 21:25:27 +01:00
Linus Groh
a56b3cbf7c Meta: Set 'pipefail' option correctly in shell scripts
This needs '-o' to work correctly. Also update the shebang to bash in
some scripts as shellcheck was complaining about pipefail not being a
POSIX shell thing otherwise.
2020-12-27 21:25:27 +01:00
Brendan Coles
c1bfb8cb0e Meta: lint-shell-scripts: Exit if shellcheck is not installed 2020-11-01 10:29:33 +01:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
AnotherTest
2b80a45f82 Meta: Do not run shellcheck on our Shell's scripts 2020-07-05 15:43:14 +02:00
Emanuele Torre
d963be795d Meta: update lint-shell-scripts.sh so that it does not search in Build/
We now use git-ls-files(1) instead of find(1).
2020-05-29 07:59:45 +02:00
Emanuele Torre
21712ed0a3 Meta: We don't need to ignore run-tests in lint-shell-scripts.sh 2020-05-07 12:20:41 +02:00
Andreas Kling
faa3bf195a Meta: Ignore the LibJS test runner script when linting
Making this work in the absence of bash is more cumbersome than simply
skipping it at the moment.
2020-03-25 16:30:58 +01:00
Shannon Booth
084e67f267 Meta: Integrate Shellcheck into Travis
lint-shell-scripts searches over the repository looking for shell
scripts. On those found, shellcheck is run against them. If any linting
fails print those warnings and exit with a non-zero exit code.

Run this script automatically in Travis.
2020-02-10 10:46:25 +01:00