Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add license header check for .tpl files #332

Closed

Conversation

michaeljmarshall
Copy link
Member

Motivation

Expand license checks

Modifications

  • Check .tpl files

@@ -64,6 +64,25 @@ var otherCheck = regexp.MustCompile(`#
#
`)

var tplCheck = regexp.MustCompile(`{/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a regex pattern I tried and can match license header in .tpl file, I think current regex forget to escape some special characters.

	var tplCheck = regexp.MustCompile(`{\/\*
Licensed to the 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\.  The 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\.
\*\/}`)

@lhotari
Copy link
Member

lhotari commented Jan 17, 2024

should be addressed while handling #417

@lhotari lhotari closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants