Xiaoven / codegex

A light-weight tools like spotbugs
GNU Lesser General Public License v2.1
1 stars 0 forks source link

FPs for NM_METHOD_NAMING_CONVENTION #128

Closed Xiaoven closed 3 years ago

Xiaoven commented 3 years ago

Comments

parser 的问题,整个 hunk 都是 * 开头的

// https://github.com/r4b3rt/pinpoint/pull/233/files
@@ -223,8 +232,11 @@
 * <tr><td>9202</td><td>ElasticsearchBBossExecutor</td></tr>
Xiaoven commented 3 years ago

Annotation

// https://github.com/MinecraftForge/MinecraftForge/pull/7645/files#diff-8ccb17ffaecc997c4d70299d890a13793f48f6ada8376b26256a58c140943f33R30
@Mod.EventBusSubscriber(value = Dist.CLIENT)

// https://github.com/MinecraftForge/MinecraftForge/pull/7621/files
@Mod.EventBusSubscriber(modid = MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
// https://github.com/Alisios/2020-05-otus-spring-Platunova/pull/15/files/d86389706e23357a353366b932a0bcf96e448059#diff-efd4cc3280d4897f41a2c57c97b6a38932fdecb3d3afa66a2dfe900bfbb003d5R56
public void add(@RequestBody
                    @io.swagger.v3.oas.annotations.parameters.RequestBody( description = "Сектор компании для записи в БД", required = true,
                             content = @Content(schema = @Schema(implementation = StockType.class),
                                     mediaType = "application/json"))
Xiaoven commented 3 years ago

String

// https://github.com/Lv-567-TAQC/CodeWars567/pull/168/files
case 6:
                return new String[]{
                        "Build a pile of Cubes",
                        "Easy balance checking",
                        "Floating-point Approximation (I)",   // 估计是这里
                        "Rainfall",
                        "Ranking NBA",
                        "Help the bookseller!"
                };
Xiaoven commented 3 years ago

Constructor

// https://github.com/Afftobus/hibernate-homework/pull/5/files#diff-ef85d140e02bf03b40dc7a4eb08ff0b221f690c7e82ede252a5f15b24de43049R32
  Resume() {}
// https://github.com/aws-amplify/amplify-android/pull/1126/files/a6e9afcf17200d88d379c7e0ea80d555fa65660e#diff-12842a61e48255982b2b5b52f7dd090c79689edd679ef2a0faf842c5bc8d238aR48

    StorageObserver(
            @NonNull MutationOutbox mutationOutbox,
             @NonNull QueryPredicateProvider queryPredicateProvider) {
Xiaoven commented 3 years ago

Enum

package JdiHomework.main.entities;

 public enum headerMenuData {
    Home("Home"),
// https://github.com/CERN/apvs/pull/846
@@ -16,9 +16,9 @@
public enum Ternary implements Serializable, IsSerializable {
    True("True"), False("False"), Unknown("Unknown");
Xiaoven commented 3 years ago

看到有回复 This method is from the IoT Device SDK v2. We don't get to choose the name of the method as it is part of the library. , 我想到两个措施:

  1. 检测到 method definition 时给 medium priority,如果只是 use,就 low
  2. 在留言这个步骤前,增加可以根据用户提供的 mehtod name whitelist 来过滤
Xiaoven commented 3 years ago

Constructor

// https://github.com/aws-amplify/amplify-android/pull/1126/files/a6e9afcf17200d88d379c7e0ea80d555fa65660e#diff-12842a61e48255982b2b5b52f7dd090c79689edd679ef2a0faf842c5bc8d238aR48

    StorageObserver(
            @NonNull MutationOutbox mutationOutbox,
             @NonNull QueryPredicateProvider queryPredicateProvider) {

The parser divides @NonNull MutationOutbox mutationOutbox, as a single statement