Sylwester Lachiewicz created THRIFT-6387:
--------------------------------------------

             Summary: Compiler: option to prepend a license header to every 
generated file
                 Key: THRIFT-6387
                 URL: https://issues.apache.org/jira/browse/THRIFT-6387
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (General)
            Reporter: Sylwester Lachiewicz


Projects that check generated code into their repositories must either add a 
license header to each generated file or exclude the files from license checks:

* Apache Accumulo post-processes every generated Java, C++, Python and Ruby 
file in 
[core/src/main/scripts/generate-thrift.sh|https://github.com/apache/accumulo/blob/main/core/src/main/scripts/generate-thrift.sh]
 to prepend the Apache license header in each language's comment syntax.
* Apache HBase excludes {{**/generated/**}} from RAT in its root pom.xml; 
hbase-thrift checks in 41 generated thrift2 classes.
* Apache Hive checks in 368 generated metastore classes under 
{{standalone-metastore/metastore-common/src/gen/thrift}}.

A compiler option, for example {{--header <file>}}, that writes the given text 
as a comment at the top of every generated file, before the "Autogenerated by 
Thrift Compiler" banner, would remove the post-processing step and the 
exclusions. Each generator already writes that banner in its own comment 
syntax, which is where such a header would go.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to