This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git


The following commit(s) were added to refs/heads/main by this push:
     new da0aa5d  fix: not ignore *.txt to make sure files like CMakeLists.txt 
can be checked (#141)
da0aa5d is described below

commit da0aa5d51adacfcb7d00cf2749246353a62501e4
Author: Yingchun Lai <[email protected]>
AuthorDate: Tue Sep 27 09:04:01 2022 +0800

    fix: not ignore *.txt to make sure files like CMakeLists.txt can be checked 
(#141)
---
 pkg/header/config.go                                     |  2 --
 test/testdata/include_test/with_license/CMakeLists.txt   | 16 ++++++++++++++++
 .../testdata/include_test/without_license/CMakeLists.txt |  0
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/pkg/header/config.go b/pkg/header/config.go
index c77b679..59764a3 100644
--- a/pkg/header/config.go
+++ b/pkg/header/config.go
@@ -158,8 +158,6 @@ func (config *ConfigHeader) Finalize() error {
 
        comments.OverrideLanguageCommentStyle(config.Languages)
 
-       config.PathsIgnore = append(config.PathsIgnore, "**/*.txt")
-
        logger.Log.Debugln("License header is:", config.NormalizedLicense())
 
        if p := config.NormalizedPattern(); p != nil {
diff --git a/test/testdata/include_test/with_license/CMakeLists.txt 
b/test/testdata/include_test/with_license/CMakeLists.txt
new file mode 100644
index 0000000..13a8339
--- /dev/null
+++ b/test/testdata/include_test/with_license/CMakeLists.txt
@@ -0,0 +1,16 @@
+# 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.
diff --git a/test/testdata/include_test/without_license/CMakeLists.txt 
b/test/testdata/include_test/without_license/CMakeLists.txt
new file mode 100644
index 0000000..e69de29

Reply via email to