mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
CppLanguageServer: Put cpp test files in /home/anon/cpp-tests/
This is similar to the LibJS test data that resides in /home/anon/js-tests. It's more convenient than storing the test programs as raw strings in the code.
This commit is contained in:
parent
28ed518142
commit
eeb98335d5
8 changed files with 47 additions and 37 deletions
|
@ -12,7 +12,7 @@ cd "$script_path/.." || exit 1
|
|||
# */
|
||||
GOOD_LICENSE_HEADER_PATTERN=$'^/\*\n( \* Copyright \(c\) [0-9]{4}(-[0-9]{4})?, .*\n)+ \*\n \* SPDX-License-Identifier: BSD-2-Clause\n \*/\n\n'
|
||||
BAD_LICENSE_HEADER_ERRORS=()
|
||||
LICENSE_HEADER_CHECK_EXCUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h)
|
||||
LICENSE_HEADER_CHECK_EXCLUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*)
|
||||
|
||||
# We check that "#pragma once" is present
|
||||
PRAGMA_ONCE_PATTERN='#pragma once'
|
||||
|
@ -28,7 +28,7 @@ LIBM_MATH_H_INCLUDE_ERRORS=()
|
|||
|
||||
while IFS= read -r f; do
|
||||
file_content="$(< "$f")"
|
||||
if [[ ! "${LICENSE_HEADER_CHECK_EXCUDES[*]} " =~ $f ]]; then
|
||||
if [[ ! "${LICENSE_HEADER_CHECK_EXCLUDES[*]} " =~ $f ]]; then
|
||||
if [[ ! "$file_content" =~ $GOOD_LICENSE_HEADER_PATTERN ]]; then
|
||||
BAD_LICENSE_HEADER_ERRORS+=("$f")
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue