ansys / ansys/pre-commit-hooks

Add multi-line support for license headers

Open
#411 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
5
Forks
1
Avg merge
4h 21m
Merged PRs (30d)
9

Description

### 📝 Description of the feature

Hello team,

I would like to be able to have a multiline phrase as a license header.

Example:

```
/*
* custom copyright phrase
* that is multiline
*/
```

# How to reproduce
I have tried something like this but the `\n` is ignored unfortunately.
```
- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.6.0
hooks:
- id: add-license-headers
args:
- --custom_copyright="custom copyright phrase \n that is multiline"
```

my jinja2 file is just
```
{% for copyright_line in copyright_lines %}
{{ copyright_line }}
{% endfor %}
```

Thanks a lot!

### 💡 Steps for implementing the feature

_No response_

### 🔗 Useful links and references

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.