The linebreak behind the last line in a license template results
in another, empty line being added to the generated license header.
Which is assumed to be never intended, but only a result of
additional line formatting in the license template.
Details
Details
Diff Detail
Diff Detail
- Repository
- R33 KDevPlatform
- Branch
- fixemptylicenselineingeneratedheader
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
Not really sure about this one. Alternative approaches could be:
a) completely trim the license text from any leading and trailing empty lines, not just a last linebreak
b) fix the existing license templates to not end with a linebreak
What do you think?
Comment Actions
I just fixing up the license text after having loaded them is fine. Wouldn't touch the license files, as otherwise Git complains about files not having a new line at the EOF.
plugins/filetemplates/licensepage.cpp | ||
---|---|---|
251 ↗ | (On Diff #17530) | I think the additional newline should be rather stripped inside LicensePagePrivate::readLicense, not here. I just tested this:
-> We just need to fix the contents of the presets after they were loaded from disk. |