Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++按照谷歌编程格式函数无法提取参数 #325

Closed
NoneShell opened this issue May 24, 2021 · 5 comments
Closed

C++按照谷歌编程格式函数无法提取参数 #325

NoneShell opened this issue May 24, 2021 · 5 comments

Comments

@NoneShell
Copy link

描述bug
在vscode中设置了google编程格式,但是使用这个格式,对于C++函数参数,尤其是对于指针类型参数,无法正确提取参数
你得到的注释(必填):
如果C++使用Google编程格式,如下,无法正确解析函数参数

/**
 * @description: 
 * @param {*}
 * @return {*}
 */
char test(char* temp) {
    cout << temp << endl;
}

你生成的注释为:

预期的行为(必填):
如果使用如下,可以正确解析出来函数参数

/**
 * @description: 
 * @param {char} *temp
 * @return {*}
 */
char test(char *temp) {
    cout << temp << endl;
}

错误日志(选填):

@humourous94
Copy link

humourous94 commented Jun 21, 2021

我使用的C,我也遇到同样的问题
而且如果是结构体参数是 例如:
void my_func(struct my_type t){
/* code */
};

生成的内容是

/**
 * @param {stuct} my_type
 */

@OBKoro1
Copy link
Owner

OBKoro1 commented Jun 25, 2021

我使用的C,我也遇到同样的问题
而且如果是结构体参数是 例如:
void my_func(struct my_type t){
/* code */
};

生成的内容是

/**
 * @param {stuct} my_type
 */

没毛病啊 正确的情况应该是什么样的?

@OBKoro1
Copy link
Owner

OBKoro1 commented Jun 28, 2021

该问题已修复,如果觉得插件做的还不错的话,就点个Star吧~

@OBKoro1 OBKoro1 closed this as completed Jun 28, 2021
@humourous94
Copy link

humourous94 commented Aug 18, 2021

我使用的C,我也遇到同样的问题
而且如果是结构体参数是 例如:
void my_func(struct my_type t){
/* code */
};
生成的内容是

/**
 * @param {stuct} my_type
 */

没毛病啊 正确的情况应该是什么样的?

struct my_type 是一个自己定义的结构体,参数名称应该是t
我期望的内容应该是这样的... (但其实还好,我把所有的struct 都 typedef 就好了,现在已经习惯了,插件很好用)

/**
* @param {struct my_type} t
*/

@OBKoro1
Copy link
Owner

OBKoro1 commented Aug 23, 2021

我使用的C,我也遇到同样的问题
而且如果是结构体参数是 例如:
void my_func(struct my_type t){
/* code */
};
生成的内容是

/**
 * @param {stuct} my_type
 */

没毛病啊 正确的情况应该是什么样的?

struct my_type 是一个自己定义的结构体,参数名称应该是t
我期望的内容应该是这样的... (但其实还好,我把所有的struct 都 typedef 就好了,现在已经习惯了,插件很好用)

/**
* @param {struct my_type} t
*/

更新插件,该问题已修复,如果觉得插件还不错的话,就给我点个Star吧~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants