koro1FileHeader icon indicating copy to clipboard operation
koro1FileHeader copied to clipboard

函数注释无法识别指针的指针

Open happyTonakai opened this issue 3 years ago • 1 comments

描述bug(必填)

函数注释无法识别指针的指针

注释设置(必填):

VsCode设置:

// 与设置无关,空的配置文件也是这样
    "fileheader.configObj": {
        "autoAdd": true, // 检测文件没有头部注释,自动添加文件头部注释
        "autoAddLine": 100, // 文件超过多少行数 不再自动添加头部注释
        "autoAlready": true, // 只添加插件支持的语言以及用户通过`language`选项自定义的注释
        "beforeAnnotation": {
            "py": "#!/usr/bin/env python\n# coding=UTF-8"
        },
        "colonObj": {
            "c": [
                ":",
                " "
            ]
        }, // 头部注释保留冒号,函数注释去掉冒号,留一个空格
        "createFileTime": true,
        "filePathColon": "/",
        "functionParamAddStr": " ", // 4.8.23 引入
        "headInsertLine": {
            "php": 2
        },
        "language": {
            "m": {
                "end": "%",
                "head": "%",
                "middle": "% "
            },
            "tex": {
                "end": "%",
                "head": "%",
                "middle": "% "
            }
        },
        "specialOptions": {},
        "throttleTime": 10000, // 对同一个文件 需要过10s再次修改文件并保存才会更新注释
        "timeNoDetail": false,
        "typeParamOrder": "param" // 函数注释只显示参数,不显示类型
    },
    "fileheader.cursorMode": {
        "brief": "", // 将Description修改为brief,函数注释生成之后,光标移动到这里失效了
        "param": "", // param 开启函数参数自动提取 需要将光标放在函数行或者函数上方的空白行
        "return": ""
    },
    "fileheader.customMade": {
        "Author": "Your Name",
        "Date": "Do not edit",
        "Description": "",
        "FilePath": "Do not edit",
        "LastEditTime": "Do not edit"
    },

文件后缀(必填):

c

你得到的注释(必填):

你生成的注释为:

/**
 * @description:
 * @param {int} a
 * @param {int} *b
 * @param {int} *
 * @return {*}
 */
void func(int a, int *b, int **c)
{
}

预期的行为(必填):

预期得到的注释/行为:

/**
 * @description:
 * @param {int} a
 * @param {int} *b
 * @param {int} **c
 * @return {*}
 */
void func(int a, int *b, int **c)
{
}

happyTonakai avatar Jun 14 '22 09:06 happyTonakai

我希望预期得到的注释能够识别出指针,并将其体现在类型中;或者至少不在变量名中出现*。如下:

/**
 * @description:
 * @param {int} a
 * @param {int *} b
 * @param {int **} c
 * @return {*}
 */
void func(int a, int *b, int **c)
{
}

kissint8 avatar Jul 11 '22 05:07 kissint8

更新插件,该问题已修复,觉得插件不错的话,点个Star吧~ ❤️

OBKoro1 avatar Jan 29 '23 08:01 OBKoro1