keep edit
This commit is contained in:
64
test_comment_removal.m
Normal file
64
test_comment_removal.m
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// TestFile.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by Test on 2025/01/27.
|
||||
// Copyright © 2025 Company. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TestFile.h"
|
||||
|
||||
// 这是一个普通注释,应该被删除
|
||||
@implementation TestFile
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
/// 这是一个文档注释
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
// TODO: 实现初始化逻辑 - 这个应该保留
|
||||
NSString *url = @"https://example.com"; // URL中的//会被保护
|
||||
|
||||
/*
|
||||
这是一个多行注释
|
||||
应该被删除
|
||||
除非包含重要关键字
|
||||
*/
|
||||
|
||||
/* FIXME: 这个多行注释包含FIXME,应该保留 */
|
||||
|
||||
NSLog(@"// 字符串中的注释符号会被保护");
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Public Methods
|
||||
|
||||
// 普通方法注释 - 会被删除
|
||||
- (void)doSomething {
|
||||
// 实现细节注释 - 会被删除
|
||||
NSString *test = @"test"; // 行尾注释 - 会被删除
|
||||
int count = 0; // 计数器
|
||||
|
||||
// NOTE: 重要说明 - 会被保留
|
||||
[self helper];
|
||||
}
|
||||
|
||||
// Helper method
|
||||
- (void)helper {
|
||||
// 简单注释
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
多行注释测试
|
||||
这个会被删除
|
||||
*/
|
||||
- (void)anotherMethod {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
// 文件末尾的注释 - 会被删除
|
Reference in New Issue
Block a user