redb0 opened a new issue, #12886:
URL: https://github.com/apache/skywalking/issues/12886

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   License Tools (apache/skywalking-eyes)
   
   ### What happened
   
   When using the fix command, the new license is simply added, not updated. 
   
   ### What you expected to happen
   
   When executing the fix command, the license is updated if it is not valid.
   
   ### How to reproduce
   
   I use config:
   
   ```yaml
   header:
     license:
       copyright-owner: My
       software-name: Test
       content: |
         Project: [software-name]
         -----
         Copyright (C) [year] [owner], All Rights Reserved
   
     paths:
       - '**/test.py'
      
     comment: on-failure
   
     license-location-threshold: 10
   
     language:
       Python:
         extensions:
           - ".py"
   ```
   
   My `test.py` file:
   
   ```python
   print('foo')
   ```
   
   when I use the fix command for the first time, the license is added normally:
   
   ```python
   # Project: Test
   # -----
   # Copyright (C) 2024 My, All Rights Reserved
   
   print('foo')
   ```
   
   Next, I fix the license manually, for example, I replace Test with Test123. 
And I run the fix command again. 
   
   ```python
   # Project: Test
   # -----
   # Copyright (C) 2024 My, All Rights Reserved
   
   # Project: Test123
   # -----
   # Copyright (C) 2024 My, All Rights Reserved
   
   print('foo')
   ```
   
   Is it possible to make the license updated instead of adding a new one?
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to