You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2021/03/23 01:23:36 UTC
[skywalking-eyes] branch main updated: Support ini extension (#24)
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 a99620b Support ini extension (#24)
a99620b is described below
commit a99620b8188a00d1aaaa345783e7a691ebaac0d7
Author: Shiwen Cheng <ch...@gmail.com>
AuthorDate: Tue Mar 23 09:23:29 2021 +0800
Support ini extension (#24)
---
assets/languages.yaml | 1 +
assets/styles.yaml | 5 +++++
pkg/license/norm.go | 1 +
test/testdata/include_test/with_license/testcase.ini | 17 +++++++++++++++++
test/testdata/include_test/without_license/testcase.ini | 1 +
5 files changed, 25 insertions(+)
diff --git a/assets/languages.yaml b/assets/languages.yaml
index 7ac1fd9..8099dce 100644
--- a/assets/languages.yaml
+++ b/assets/languages.yaml
@@ -2334,6 +2334,7 @@ INI:
codemirror_mode: properties
codemirror_mime_type: text/x-properties
language_id: 163
+ comment_style_id: Semicolon
IRC log:
type: data
aliases:
diff --git a/assets/styles.yaml b/assets/styles.yaml
index 216232f..a79eb6c 100644
--- a/assets/styles.yaml
+++ b/assets/styles.yaml
@@ -59,3 +59,8 @@
start: '"'
middle: '"'
end: '"'
+
+- id: Semicolon
+ start: ';'
+ middle: ';'
+ end: ';'
diff --git a/pkg/license/norm.go b/pkg/license/norm.go
index 0bc056b..cc21552 100644
--- a/pkg/license/norm.go
+++ b/pkg/license/norm.go
@@ -45,6 +45,7 @@ var (
regexp.MustCompile(`(?m)^\s*//+`), // //
regexp.MustCompile(`(?m)^\s*"""+`), // """
regexp.MustCompile(`(?m)^\s*\(\*+`), // (*
+ regexp.MustCompile(`(?m)^\s*;+`), // ;
regexp.MustCompile(`(?m)^\s*/\*+`), // /*
regexp.MustCompile(`(?m)^\s*\*+/`), // */
diff --git a/test/testdata/include_test/with_license/testcase.ini b/test/testdata/include_test/with_license/testcase.ini
new file mode 100644
index 0000000..f4101df
--- /dev/null
+++ b/test/testdata/include_test/with_license/testcase.ini
@@ -0,0 +1,17 @@
+; 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.
+
+; program config file
diff --git a/test/testdata/include_test/without_license/testcase.ini b/test/testdata/include_test/without_license/testcase.ini
new file mode 100644
index 0000000..7e8513c
--- /dev/null
+++ b/test/testdata/include_test/without_license/testcase.ini
@@ -0,0 +1 @@
+; program config file