Commit graph

14 commits

Author SHA1 Message Date
Brian Gianforcaro f91bfe8009 Meta: pre-commit should run lint-ports.py only when Ports change
Most of the existing lint-ing shell scripts have the ability
to only run on the files which have actually changed.
The new port lint-ing script doesn't have this functionality
unfortunately. This forces us to lint ALL the ports on every
single change to any other file in the system if you have
the pre-commit hook setup for your git clone locally.

Instead we can use pre-commit's feature to only run a hook
if certain files have changed to reduce the situations in
which we would run the Meta/lint-ports.py script.
2021-04-30 21:24:22 +02:00
Ben Wiederhake ad4d9eaaf9 Meta: Lint AvailablePorts.md
As requested by popular demand ;)
https://github.com/SerenityOS/serenity/pull/5325#discussion_r575657614
2021-02-15 07:41:16 +01:00
Ben Wiederhake d47ed35801 Meta: Add script that checks consistency of keymaps 2021-02-01 09:54:32 +01:00
Jonathan Turner 0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Andrew Kaster b5078530d5 Meta: Add flake8 to lint python files 2021-01-09 19:22:23 +01:00
Emanuele Torre 6abba493b2 Meta: Rewrite the check-newlines-at-eof script in python
The bash version takes around 15 seconds to run; that is way too slow.
This python3 version should take less than one second to run. :^)

Also, the script will now also check .py files and .txt CMake files.
2021-01-03 23:58:54 +01:00
Emanuele Torre f9f571aa7f Meta: Add a script that makes sure files end in a newline.
This script checks .html, .css, .js, .cpp, .h, .gml and .sh files.

It also makes sure that there are no black lines at the end of the
files checked.
2021-01-03 17:12:50 +01:00
Linus Groh fec7501d1a Meta: Run lint-prettier.sh on CI 2020-12-27 21:25:27 +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
AnotherTest 3dcdee75be Meta: Make lint-shell-scripts.sh happy
`${FAILURES}` -> `"${FAILURES}"`
2020-12-26 11:54:54 +01:00
Lenny Maiorani 1db5276c05 Meta: Run all lint checks and report failures together
Problem:
- The first lint check that fails results in all subsequent checks not
  being run.

Solution:
- Run all the lint checks aggregating the number of failures.
- Return a non-0 exit code if any have failed.
2020-12-24 21:00:35 +01:00
Lenny Maiorani d46de3aeb4 Meta: Verify all AK test files are listed in CMake
Problem:
- It is possible for a new test file to be added to the `AK/Tests`
  directory without being added to the corresponding
  `CMakeLists.txt`. This results in the tests not being run.

Solution:
- As part of CI linting, verify that all the `AK/Tests/Test*.cpp`
  files are mentioned in the `CMakeLists.txt`.
2020-12-24 21:00:10 +01:00
Ben Wiederhake e85aad6acc Meta: Always check completeness of ALL_THE_DEBUG_MACROS 2020-12-01 11:06:53 +01:00
Ben Wiederhake 3cd39097f6 Meta: Add script that runs all lints 2020-11-08 09:58:55 +01:00