[ 
https://issues.apache.org/jira/browse/HBASE-27026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539763#comment-17539763
 ] 

Jan Hentschel commented on HBASE-27026:
---------------------------------------

Did you try it out? Based on the documentation I would be surprised if adding 
it after the license wouldn't work as examples in the Rubocop documentation 
leave the impression that you can put it anywhere in a file, marking kind of 
the starting point, multiple times. I would prefer handling the warning instead 
of ignoring it. I would recommend to put # frozen_string_literal: true after 
the Apache license header in your existing PR and just give it a try.

> Disable Style/FrozenStringLiteralComment for ruby
> -------------------------------------------------
>
>                 Key: HBASE-27026
>                 URL: https://issues.apache.org/jira/browse/HBASE-27026
>             Project: HBase
>          Issue Type: Task
>            Reporter: Tao Li
>            Assignee: Tao Li
>            Priority: Major
>
> By default Style/FrozenStringLiteralComment is enabled in rubocop. If we 
> update a ruby file, rubocop prompts `Missing frozen string literal comment` 
> (see 
> [https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4416/2/artifact/yetus-general-check/output/diff-patch-rubocop.txt)|https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4416/2/artifact/yetus-general-check/output/diff-patch-rubocop.txt].
> To address this warn, we need to add `# frozen_string_literal: true` to the 
> top of the ruby file(see 
> [https://github.com/rubocop/rubocop/blob/master/config/default.yml#L3631]), 
> which will be added to the top of the `Apache License` and will look strange.
> I don't think this `FrozenStringLiteralComment` check is very necessary. We 
> can disable it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to