doi / fileheadercomment

visual studio code editor extension
MIT License
21 stars 17 forks source link

Default header incorrect #12

Closed GimignanoF closed 4 years ago

GimignanoF commented 5 years ago

I've installed the extension and configured the template like this "fileHeaderComment.parameter": { "*": { "comment": "//", "company": "My company", "license": [ "${comment} Licensed under the Apache License, Version 2.0 (the \"License\");", "${comment} you may not use this file except in compliance with the License.", "${comment} You may obtain a copy of the License at", "${comment}", "${comment} http://www.apache.org/licenses/LICENSE-2.0", "${comment}", "${comment} Unless required by applicable law or agreed to in writing, software", "${comment} distributed under the License is distributed on an \"AS IS\" BASIS,", "${comment} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", "${comment} See the License for the specific language governing permissions and", "${comment} limitations under the License." ] } }, "fileHeaderComment.template": { "*" : [ "${comment} Copyright ${year} ${company}", "${comment}", "${license}", "" ] }

However when i insert the template in any file it shows up like this `// Copyright 2019 My company // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.

`

It adds a * on the license lines and i don't know why. There's something i suppose to do to remove this?

doi commented 4 years ago

overwrite commentprefix to "" in fileHeaderComment.parameter setting like

"fileHeaderComment.parameter":{
  "*": {
    "commentprefix: ""
  }
}
GimignanoF commented 4 years ago

Thanks, that did the trick! :D