Support for license boilerplate text
See original GitHub issueI’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:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Alright, thanks
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||