Skip to content

${now_year}不生效 #522

@DongCX-LDHSP

Description

@DongCX-LDHSP

描述bug(必填)

文件头注释中custom_string_obkoro1的值使用${now_year}不生效

注释设置(必填):

VsCode设置:

"fileheader.customMade": {
    "custom_string_obkoro1":"Company ${now_year}-${now_year}. All rights reserved.",
    // 以下字段在configObj的specialOptions可以重命名,上下顺序可自己改,也可以添加类似的json字段,
    "Description":"TODO: 修改描述",
    "Author":"name",
    "Date": "Do not edit",
},
"fileheader.configObj": {

    "createFileTime": true,
    "language": {
        "languagetest": {
            "head": "/$$",
            "middle": " $ ",
            "end": " $/"
        }
    },
    "autoAdd": true,
    "autoAddLine": 100,
    "autoAlready": true,
    "annotationStr": {
        "head": "/*",
        "middle": " * ",
        "end": " */",
        "use": false
    },
    "headInsertLine": {
        "php": 2,
        "sh": 2
    },
    "beforeAnnotation": {
        "文件后缀": "该文件后缀的头部注释之前添加某些内容"
    },
    "afterAnnotation": {
        "文件后缀": "该文件后缀的头部注释之后添加某些内容"
    },
    "specialOptions": {
        "特殊字段": "自定义比如LastEditTime/LastEditors"
    },
    "switch": {
        "newlineAddAnnotation": true
    },
    "supportAutoLanguage": [
    ],
    "prohibitAutoAdd": [
        "json",
        "txt",
        "md",
    ],
    "folderBlacklist": [
        "node_modules",
        "文件夹禁止自动添加头部注释"
    ],
    "prohibitItemAutoAdd": [
        "项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
    ],
    "moveCursor": true,
    "dateFormat": "YYYY-MM-DD HH:mm:ss",
    "atSymbol": [
        "",
    ],
    "atSymbolObj": {
        "文件后缀": [
            "头部注释@符号",
            "函数注释@符号"
        ]
    },
    "colon": [
        ": ",
        ": "
    ],
    "colonObj": {
        "文件后缀": [
            "头部注释冒号",
            "函数注释冒号"
        ]
    },
    "filePathColon": "路径分隔符替换",
    "showErrorMessage": true,
    "writeLog": false,
    "wideSame": false,
    "wideNum": 13,
    "functionWideNum": 0,
    "CheckFileChange": false,
    "createHeader": true,
    "useWorker": false,
    "designAddHead": false,
    "headDesignName": "random",
    "headDesign": false,
    "cursorModeInternal": false,
    "openFunctionParamsCheck": true,
    "functionParamsShape": "normal"
},
"fileheader.cursorMode": {

}

文件后缀(必填):

.c

你得到的注释(必填):

你生成的注释为:

/*
 * Company ${now_year}-${now_year}. All rights reserved.
 * Description: TODO: 修改描述
 * Author: name
 * Date: 2022-10-08 15:23:18
 */

预期的行为(必填):

预期得到的注释/行为:

/*
 * Company 2022-2022. All rights reserved.
 * Description: TODO: 修改描述
 * Author: name
 * Date: 2022-10-08 15:23:18
 */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions