Meta: Lint .mm files with lint-clang-format.sh

This commit is contained in:
Junior Rantila 2023-09-19 16:49:21 +02:00 committed by Andrew Kaster
parent 4ff4ac11b9
commit f15d46fb8b
2 changed files with 4 additions and 4 deletions

View file

@ -7,8 +7,8 @@
#include <LibWebView/History.h> #include <LibWebView/History.h>
#import <Application/ApplicationDelegate.h> #import <Application/ApplicationDelegate.h>
#import <LibWebView/UserAgent.h>
#import <LibWeb/Loader/ResourceLoader.h> #import <LibWeb/Loader/ResourceLoader.h>
#import <LibWebView/UserAgent.h>
#import <UI/LadybirdWebView.h> #import <UI/LadybirdWebView.h>
#import <UI/Tab.h> #import <UI/Tab.h>
#import <UI/TabController.h> #import <UI/TabController.h>
@ -489,7 +489,6 @@ enum class IsHistoryNavigation {
return YES; return YES;
} }
#pragma mark - NSToolbarDelegate #pragma mark - NSToolbarDelegate
- (NSToolbarItem*)toolbar:(NSToolbar*)toolbar - (NSToolbarItem*)toolbar:(NSToolbar*)toolbar

View file

@ -10,6 +10,7 @@ if [ "$#" -eq "1" ]; then
git ls-files -- \ git ls-files -- \
'*.cpp' \ '*.cpp' \
'*.h' \ '*.h' \
'*.mm' \
':!:Base' \ ':!:Base' \
':!:Kernel/FileSystem/Ext2FS/Definitions.h' \ ':!:Kernel/FileSystem/Ext2FS/Definitions.h' \
':!:Userland/Libraries/LibCodeComprehension/Cpp/Tests/*' \ ':!:Userland/Libraries/LibCodeComprehension/Cpp/Tests/*' \
@ -19,7 +20,7 @@ if [ "$#" -eq "1" ]; then
else else
files=() files=()
for file in "${@:2}"; do for file in "${@:2}"; do
if [[ "${file}" == *".cpp" || "${file}" == *".h" ]]; then if [[ "${file}" == *".cpp" || "${file}" == *".h" || "${file}" == *".mm" ]]; then
files+=("${file}") files+=("${file}")
fi fi
done done
@ -60,5 +61,5 @@ if (( ${#files[@]} )); then
"${CLANG_FORMAT}" -style=file -i "${files[@]}" "${CLANG_FORMAT}" -style=file -i "${files[@]}"
echo "Maybe some files have changed. Sorry, but clang-format doesn't indicate what happened." echo "Maybe some files have changed. Sorry, but clang-format doesn't indicate what happened."
else else
echo "No .cpp or .h files to check." echo "No .cpp, .h or .mm files to check."
fi fi