ymotongpoo / vsc-licenser

License handler extension for Visual Studio Code.
Apache License 2.0
45 stars 40 forks source link

Remove Ending Empty Newline on Insertion from Custom License File #111

Open erayerdin opened 3 years ago

erayerdin commented 3 years ago

Runtime environment

Behaviors

Expected behavior

Insert the content from the file set by licenser.customHeaderFile without ending empty newline.

Example file content of LICENSE.txt:

All rights reserved by Eray Erdin.

Expected header:

# All rights reserved by Eray Erdin.

Actual behavior

Inserts the content with ending newline from the source file.

Actual header:

# All rights reserved by Eray Erdin.
# 

Steps to reproduce the issue

  1. CTRL+SHIFT+P > `Preferences: Open Settings (UI)
  2. Search for licens.
  3. Click on Workspace on top.
  4. Set Licenser: Custom Header File to LICENSE.txt (which is present at the project root) and Licenser: License to Custom.
  5. Create a new Python file.
  6. CTRL+SHIFT+P > licenser: Insert License Header
BMBurstein commented 2 years ago

Same here. I always end files with a newline for source control reasons.