You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/08/24 16:27:13 UTC

[GitHub] [skywalking] mikhail-dr opened a new issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

mikhail-dr opened a new issue #7556:
URL: https://github.com/apache/skywalking/issues/7556


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ X] Bug
   - [ X] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   
   ___
   ### Bug
   I am currently using version 0.1.0 which is also the latest
   
   - Which company or project?
   
   - What happened?
   
   Inserting copyright notice into Python files. License text, specified in .licenserc.yaml isn't taken as-is by the tool. Specifically, the tool adds 1 extra empty line `before` the license text, but `ignores/deletes` empty lines `after` the license text, making it impossible to separate the license text from the code in the file.
   ___
   ### Requirement or improvement
   
   When I specify license text in .licenserc.yaml, I should be able to use mechanisms provided by yaml to specify empty lines before or after the license text, if I want to. The tool should not add anything on its own and should not strip anything out. Yaml provides annotation/markup to control how new line characters and spaces are handled within multi-line values. Specifically, I could use `|+' to specify a multiline value (i.e. License text), and that should include any trailing new line characters or spaces. Those should not be stripped out. However, the tool does strip them out.
   
   So, if in .licenserc.yaml file I have the following License text:
   
   `    content: |+
         Copyright blah blah
   
         All rights reserved.
   
         Some company, Inc. Confidential.
   
         More text here...
   
   
     paths:
   `
   
   then when the tool inserts this text into a Python file, I end up with this:
   
   `#
   # Copyright blah blah
   #
   # All rights reserved.
   #
   # Some company, Inc. Confidential.
   #
   # More text here...
   FIRST LINE OF CODE HERE`
   
   As you can see, the tool added 1 empty line `before` the license text and `stripped` the extra empty line that I have in the yaml file. As a result, the License text is glued right to the first line of code in the file, and I have no way to add an extra empty line commented out with `#` there. I think the tool should honor the exact license text that's in the yaml file. Without adding or deleting anything.
   
   Thanks!
   
   
   
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905127404


   @mikhail-dr thank you for reporting! I think it is reasonable that the tool should respect what user configured 


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905465477


   @mikhail-dr there is no extra new line
   
   the following input
   
   ```python
   if __name__ == '__main__':
       print 'abc'
   ```
   
   generates the following output, tell me where is wrong and what's your expectation?
   
   ```python
   # Licensed to Apache Software Foundation (ASF) under one or more contributor
   # license agreements. See the NOTICE file distributed with
   # this work for additional information regarding copyright
   # ownership. Apache Software Foundation (ASF) licenses this file to you under
   # the Apache License, Version 2.0 (the "License"); you may
   # not use this file except in compliance with the License.
   # You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing,
   # software distributed under the License is distributed on an
   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   # KIND, either express or implied.  See the License for the
   # specific language governing permissions and limitations
   # under the License.
   #
   if __name__ == '__main__':
       print 'abc'
   ```


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905634247


   Hi @mikhail-dr , the 0.2.0 won't be that soon to come out, but we provided "snapshot" Docker images for testing, you can use those images
   
   ```
   docker pull ghcr.io/apache/skywalking-eyes/license-eye:latest
   ```


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905689662


   > @kezhenxu94 yes, i am already using that snapshot image. however, since the only snapshot that is available is the `latest`,
   
   See https://github.com/apache/skywalking-eyes/pkgs/container/skywalking-eyes%2Flicense-eye/versions
   
   and try
   
   ```
   docker pull ghcr.io/apache/skywalking-eyes/license-eye:082ccc7d63f8cde9afdb6eee30843b8f0a8182ed
   ```


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905465980


   Or better, open a pull request to demonstrate your suggestion @mikhail-dr 


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] mikhail-dr commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
mikhail-dr commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905645665


   @kezhenxu94 yes, i am already using that snapshot image. however, since the only snapshot that is available is the `latest`, i have no guarantee that something won't change over time that will break things on my end. it's a moving target. you can update it at any point in time. if you had a fixed version that is separate from the `latest`, then that would be better.  Actually, if I look here: https://hub.docker.com/r/apache/skywalking-eyes, there's a statement that says:
   
   ```
   For users and developers who want to help to test the latest codes on main branch,
   we publish Docker image to GitHub Container Registry for every commit in main
   branch, tagged with the commit sha, if it's the latest commit in main branch, it's also
   tagged with latest.
   ```
   
   but in reality that isn't accurate, as there are no images there tagged with the commit sha, there's only a single image, the latest. thanks.


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] mikhail-dr commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
mikhail-dr commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905446584


   thanks, @kezhenxu94 . However, now the tool is adding an _extra_ empty line after the copyright notice. I think this is because you changed the following line https://github.com/apache/skywalking-eyes/blob/1e5ec5bb1e827531f5b540f5bdbf668ecf925cad/pkg/header/fix.go#L122 but you also need to remove the extra ```\n``` that is added there. It was needed previously, but with your latest change, I think you also need to remove that new line. thanks.


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] mikhail-dr commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
mikhail-dr commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905715469


   that works, thank you!


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] mikhail-dr commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
mikhail-dr commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905568559


   @kezhenxu94 thanks. I've done a bit more testing and I think the behavior (in terms of number of empty lines) _after_ the license content can be controlled by yaml using `|-`, `|`, and `|+'. I should be able to get it to do what I want now, thanks!


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 closed issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
kezhenxu94 closed issue #7556:
URL: https://github.com/apache/skywalking/issues/7556


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] mikhail-dr commented on issue #7556: [INFRA] License text from .licenserc.yaml should be taken as-is by skywaking-eyes

Posted by GitBox <gi...@apache.org>.
mikhail-dr commented on issue #7556:
URL: https://github.com/apache/skywalking/issues/7556#issuecomment-905580217


   @kezhenxu94 any idea when these changes might be available in the official docker registry? thank you.


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org