Shohei Okumiya created HIVE-29245:
-------------------------------------

             Summary: Make license headers compatible with checkstyle
                 Key: HIVE-29245
                 URL: https://issues.apache.org/jira/browse/HIVE-29245
             Project: Hive
          Issue Type: Improvement
    Affects Versions: 4.1.0
            Reporter: Shohei Okumiya


SonarQube often reports that license headers in new files don't have the 
expected format. It is probably because some existing files are not compliant 
with the asf.header, and contributors copy-and-paste the wrong format of 
headers.

> Line does not match expected header line of ' * 
> http://www.apache.org/licenses/LICENSE-2.0'.
Header external_checkstyle:header.HeaderCheck

[https://sonarcloud.io/project/issues?sinceLeakPeriod=true&issueStatuses=OPEN%2CCONFIRMED&pullRequest=6108&id=apache_hive&open=AZmX8jO00mHwehPdTX0p]

 

We can locally check those violations with the following configuration and 
command.
{code:java}
$ cat checkstyle/checkstyle.xml                                
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd";>
<module name="Checker">
  <module name="Header">
    <property name="headerFile" value="${config_loc}/asf.header"/>
  </module>
</module>
$ mvn checkstyle:check{code}
 

In this ticket, we will rewrite incompatible license headers.



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

Reply via email to