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
Notes: sideshowbarker 2024-07-17 04:21:32 +09:00
2 changed files with 4 additions and 4 deletions

View file

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

View file

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