mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-29 06:35:20 +01:00
Silence non-useful CI whitespace check
This commit is contained in:
25
.github/workflows/whitespace_checks.yml
vendored
25
.github/workflows/whitespace_checks.yml
vendored
@@ -50,29 +50,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# Line endings are already ensured by .gitattributes
|
# Line endings are already ensured by .gitattributes
|
||||||
# Multiple multline comments in one line is not supported by this check
|
# Warning: Multiple multline comments in one line
|
||||||
# and there is no reason to use them
|
# is not supported by this check and may misbehave.
|
||||||
# So lines like: "/* */ /*" or "*/ a = 5; /*" will result in error
|
|
||||||
- name: Check for unsupported multiline comments
|
|
||||||
run: |
|
|
||||||
if git ls-files |\
|
|
||||||
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$' |\
|
|
||||||
xargs grep -n '\*/.*/\*';\
|
|
||||||
then
|
|
||||||
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
|
|
||||||
(exit 1);\
|
|
||||||
else\
|
|
||||||
(exit 0);\
|
|
||||||
fi
|
|
||||||
if git ls-files |\
|
|
||||||
grep -E '\.lua$' |\
|
|
||||||
xargs grep -n -e '\]\].*--\[\[';\
|
|
||||||
then
|
|
||||||
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
|
|
||||||
(exit 1);\
|
|
||||||
else\
|
|
||||||
(exit 0);\
|
|
||||||
fi
|
|
||||||
# This prepare files for final check
|
# This prepare files for final check
|
||||||
# See python script ./util/ci/indent_tab_preprocess.py for details.
|
# See python script ./util/ci/indent_tab_preprocess.py for details.
|
||||||
- name: Preprocess files
|
- name: Preprocess files
|
||||||
|
|||||||
Reference in New Issue
Block a user