question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for license boilerplate text

See original GitHub issue

I’m submitting a…

  • Bug report.
  • Feature request.

Feature request

Describe the problem you’re trying to solve.

Some licenses (such as GNU General Public License v3.0) suggests to include license information for every source code file in the project. Currently if you include license boilerplate into script files it ends up as description for the class.

Tell us which solutions you’ve explored, the solution you would pick, and why you think it would be the best for everyone.

I tried formatting the license boilerplate text with single #, double ## and """ but with every format it seems to end up as class description.

Other

Solution suggestion

In your guidelines there is a suggestion to have the class docstring starting with double ##. I would suggest that the class description is picked from the first block that starts with double ## so one could have boilerplate text/comments on top of the script file without it affecting the class description.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NathanLovatocommented, Sep 4, 2021

Alright, thanks

1reaction
NathanLovatocommented, Sep 4, 2021

Whichever is fine. You could also remove the licenses with a one-line sed command in the generated documents like

sed --in-place '1,13d' deletes the first 13 lines, which corresponds to one version of GPL comments + new line. You could change the range to target exactly where it’ll end up, which should be consistent across files.

Or a regex search and replace would do too, something like sed -iE 's|This file is part of.+If not, see <https://www.gnu.org/licenses/>\.\n||

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for Apache-2.0 boilerplate notice · Issue #393 - GitHub
The text in question is to include in source files, not as a project's LICENSE file. 1
Read more >
How to license application generated from boilerplate code?
How to license application generated from boilerplate code? · Merge the two licenses into a single license, putting myself and the Clementine.
Read more >
Sample EULA Template - TermsFeed
An End-User License Agreement (EULA) is an agreement put in place between someone who purchases, installs, or downloads software, ...
Read more >
License Boilerplate - Mozilla.org
The "LICENSE BLOCK" strings facilitate automated checking of source files to verify that they are licensed correctly. The "The Original Code is" ...
Read more >
MIT License
Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found