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 2020/12/24 14:42:35 UTC

[skywalking-eyes] branch main updated (2a54886 -> 5bffd2c)

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

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


    from 2a54886  Add more known comment styles (#9)
     new ce3f048  Add script to build release tars and move licenses to belonging subproject
     new bdfdff0  Ignore cases when comment indicators contain alphabets
     new cedf44a  Also add *.txt to ignore paths because plain text format can not have comments
     new aecc801  Add more known comment styles
     new 5bffd2c  Add more known comment styles

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 LICENSE                                            |  9 ------
 license-eye/CHANGES.md                             |  6 ++++
 LICENSE => license-eye/LICENSE                     |  0
 license-eye/Makefile                               | 35 +++++++++++++++++++---
 license-eye/assets/languages.yaml                  | 18 +++++++++++
 {dist => license-eye/dist}/LICENSE                 |  0
 {dist => license-eye/dist}/NOTICE                  |  0
 .../dist}/licenses/LICENSE-doublestar.txt          |  0
 .../dist}/licenses/LICENSE-go-github.txt           |  0
 .../dist}/licenses/LICENSE-golang-oauth2.txt       |  0
 .../dist}/licenses/LICENSE-linguist.txt            |  0
 .../dist}/licenses/LICENSE-logrus.txt              |  0
 .../dist}/licenses/LICENSE-yaml.v3.txt             |  0
 .../licenses}/LICENSE-linguist                     |  0
 license-eye/pkg/header/config.go                   |  2 +-
 license-eye/pkg/license/norm.go                    |  4 +--
 16 files changed, 58 insertions(+), 16 deletions(-)
 create mode 100644 license-eye/CHANGES.md
 copy LICENSE => license-eye/LICENSE (100%)
 rename {dist => license-eye/dist}/LICENSE (100%)
 rename {dist => license-eye/dist}/NOTICE (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-doublestar.txt (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-go-github.txt (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-golang-oauth2.txt (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-linguist.txt (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-logrus.txt (100%)
 rename {dist => license-eye/dist}/licenses/LICENSE-yaml.v3.txt (100%)
 rename {licenses => license-eye/licenses}/LICENSE-linguist (100%)


[skywalking-eyes] 05/05: Add more known comment styles

Posted by ke...@apache.org.
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

commit 5bffd2c3e47d8d0125bb0edd07654a69c61b3186
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Dec 24 22:07:07 2020 +0800

    Add more known comment styles
---
 license-eye/assets/languages.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/license-eye/assets/languages.yaml b/license-eye/assets/languages.yaml
index 7466c48..7ac1fd9 100644
--- a/license-eye/assets/languages.yaml
+++ b/license-eye/assets/languages.yaml
@@ -6704,3 +6704,18 @@ xBase:
   tm_scope: source.harbour
   ace_mode: text
   language_id: 421
+
+# Customize
+github pull request template:
+  type: prose
+  filenames:
+    - PULL_REQUEST_TEMPLATE
+  language_id: 4000
+  comment_style_id: AngleBracket
+
+github issue template:
+  type: prose
+  filenames:
+    - ISSUE_TEMPLATE
+  language_id: 4001
+  comment_style_id: AngleBracket


[skywalking-eyes] 01/05: Add script to build release tars and move licenses to belonging subproject

Posted by ke...@apache.org.
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

commit ce3f0489fccadb5d42209e90dc7b7cb39ecfcc1c
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Dec 24 21:39:00 2020 +0800

    Add script to build release tars and move licenses to belonging subproject
---
 LICENSE                                            |  9 ------
 license-eye/CHANGES.md                             |  6 ++++
 LICENSE => license-eye/LICENSE                     |  0
 license-eye/Makefile                               | 35 +++++++++++++++++++---
 {dist => license-eye/dist}/LICENSE                 |  0
 {dist => license-eye/dist}/NOTICE                  |  0
 .../dist}/licenses/LICENSE-doublestar.txt          |  0
 .../dist}/licenses/LICENSE-go-github.txt           |  0
 .../dist}/licenses/LICENSE-golang-oauth2.txt       |  0
 .../dist}/licenses/LICENSE-linguist.txt            |  0
 .../dist}/licenses/LICENSE-logrus.txt              |  0
 .../dist}/licenses/LICENSE-yaml.v3.txt             |  0
 .../licenses}/LICENSE-linguist                     |  0
 13 files changed, 37 insertions(+), 13 deletions(-)

diff --git a/LICENSE b/LICENSE
index e4b71ce..67c185f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -208,12 +208,3 @@ The Apache SkyWalking Eyes project contains subcomponents with separate copyrigh
 notices and license terms. Your use of the source code for the these
 subcomponents is subject to the terms and conditions of the following
 licenses.
-
-========================================================================
-MIT licenses
-========================================================================
-
-The following components are provided under the MIT license. See project link for details.
-The text of each license is also included at licenses/LICENSE-[project].txt.
-
-    languages.yaml from GitHub: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml MIT
diff --git a/license-eye/CHANGES.md b/license-eye/CHANGES.md
new file mode 100644
index 0000000..7e84869
--- /dev/null
+++ b/license-eye/CHANGES.md
@@ -0,0 +1,6 @@
+## 0.1.0
+
+- License Header
+  + Add `check` and `fix` command.
+  + `check` results can be reported to pull request as comments.
+  + `fix` suggestions can be filed on pull request as edit suggestions.
diff --git a/LICENSE b/license-eye/LICENSE
similarity index 100%
copy from LICENSE
copy to license-eye/LICENSE
diff --git a/license-eye/Makefile b/license-eye/Makefile
index 96d060f..e11f136 100644
--- a/license-eye/Makefile
+++ b/license-eye/Makefile
@@ -19,16 +19,12 @@
 PROJECT = license-eye
 VERSION ?= latest
 OUT_DIR = bin
-CURDIR := $(shell pwd)
-FILES := $$(find .$$($(PACKAGE_DIRECTORIES)) -name "*.go")
-FAIL_ON_STDOUT := awk '{ print } END { if (NR > 0) { exit 1 } }'
 ARCH := $(shell uname)
 OSNAME := $(if $(findstring Darwin,$(ARCH)),darwin,linux)
 
 GO := GO111MODULE=on go
 GO_PATH = $(shell $(GO) env GOPATH)
 GO_BUILD = $(GO) build
-GO_GET = $(GO) get
 GO_TEST = $(GO) test
 GO_LINT = $(GO_PATH)/bin/golangci-lint
 GO_BUILD_LDFLAGS = -X github.com/apache/skywalking-eyes/license-eye/commands.version=$(VERSION)
@@ -39,6 +35,9 @@ PLATFORMS := windows linux darwin
 os = $(word 1, $@)
 ARCH = amd64
 
+RELEASE_BIN = skywalking-license-eye-$(VERSION)-bin
+RELEASE_SRC = skywalking-license-eye-$(VERSION)-src
+
 all: clean lint license test build
 
 .PHONY: lint
@@ -81,3 +80,31 @@ clean:
 	-rm -rf bin
 	-rm -rf assets/*.gen.go
 	-rm -rf coverage.txt
+	-rm -rf "$(RELEASE_BIN)"*
+	-rm -rf "$(RELEASE_SRC)"*
+
+.PHONY: verify
+verify: clean license lint test
+
+release-src: clean
+	-mkdir $(RELEASE_SRC)
+	-cp ../NOTICE $(RELEASE_SRC)
+	-rsync -av . $(RELEASE_SRC) --exclude $(RELEASE_SRC) --exclude .DS_Store
+	-tar -zcvf $(RELEASE_SRC).tgz $(RELEASE_SRC)
+	-rm -rf "$(RELEASE_SRC)"
+
+release-bin: build
+	-mkdir $(RELEASE_BIN)
+	-cp -R bin $(RELEASE_BIN)
+	-cp -R dist/* $(RELEASE_BIN)
+	-cp -R CHANGES.md $(RELEASE_BIN)
+	-cp -R README.adoc $(RELEASE_BIN)
+	-cp -R ../NOTICE $(RELEASE_BIN)
+	-tar -zcvf $(RELEASE_BIN).tgz $(RELEASE_BIN)
+	-rm -rf "$(RELEASE_BIN)"
+
+release: verify release-src release-bin
+	gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
+	shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
+	gpg --batch --yes --armor --detach-sig $(RELEASE_BIN).tgz
+	shasum -a 512 $(RELEASE_BIN).tgz > $(RELEASE_BIN).tgz.sha512
diff --git a/dist/LICENSE b/license-eye/dist/LICENSE
similarity index 100%
rename from dist/LICENSE
rename to license-eye/dist/LICENSE
diff --git a/dist/NOTICE b/license-eye/dist/NOTICE
similarity index 100%
rename from dist/NOTICE
rename to license-eye/dist/NOTICE
diff --git a/dist/licenses/LICENSE-doublestar.txt b/license-eye/dist/licenses/LICENSE-doublestar.txt
similarity index 100%
rename from dist/licenses/LICENSE-doublestar.txt
rename to license-eye/dist/licenses/LICENSE-doublestar.txt
diff --git a/dist/licenses/LICENSE-go-github.txt b/license-eye/dist/licenses/LICENSE-go-github.txt
similarity index 100%
rename from dist/licenses/LICENSE-go-github.txt
rename to license-eye/dist/licenses/LICENSE-go-github.txt
diff --git a/dist/licenses/LICENSE-golang-oauth2.txt b/license-eye/dist/licenses/LICENSE-golang-oauth2.txt
similarity index 100%
rename from dist/licenses/LICENSE-golang-oauth2.txt
rename to license-eye/dist/licenses/LICENSE-golang-oauth2.txt
diff --git a/dist/licenses/LICENSE-linguist.txt b/license-eye/dist/licenses/LICENSE-linguist.txt
similarity index 100%
rename from dist/licenses/LICENSE-linguist.txt
rename to license-eye/dist/licenses/LICENSE-linguist.txt
diff --git a/dist/licenses/LICENSE-logrus.txt b/license-eye/dist/licenses/LICENSE-logrus.txt
similarity index 100%
rename from dist/licenses/LICENSE-logrus.txt
rename to license-eye/dist/licenses/LICENSE-logrus.txt
diff --git a/dist/licenses/LICENSE-yaml.v3.txt b/license-eye/dist/licenses/LICENSE-yaml.v3.txt
similarity index 100%
rename from dist/licenses/LICENSE-yaml.v3.txt
rename to license-eye/dist/licenses/LICENSE-yaml.v3.txt
diff --git a/licenses/LICENSE-linguist b/license-eye/licenses/LICENSE-linguist
similarity index 100%
rename from licenses/LICENSE-linguist
rename to license-eye/licenses/LICENSE-linguist


[skywalking-eyes] 03/05: Also add *.txt to ignore paths because plain text format can not have comments

Posted by ke...@apache.org.
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

commit cedf44a793a7f58006b97dc3a91281ab27a1c384
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Dec 24 21:52:25 2020 +0800

    Also add *.txt to ignore paths because plain text format can not have comments
---
 license-eye/pkg/header/config.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/license-eye/pkg/header/config.go b/license-eye/pkg/header/config.go
index 5549a24..df2d630 100644
--- a/license-eye/pkg/header/config.go
+++ b/license-eye/pkg/header/config.go
@@ -100,7 +100,7 @@ func (config *ConfigHeader) Finalize() error {
 		config.Paths = []string{"**"}
 	}
 
-	config.PathsIgnore = append(config.PathsIgnore, ".git")
+	config.PathsIgnore = append(config.PathsIgnore, ".git", "**/*.txt")
 
 	if file, err := os.Open(".gitignore"); err == nil {
 		defer func() { _ = file.Close() }()


[skywalking-eyes] 02/05: Ignore cases when comment indicators contain alphabets

Posted by ke...@apache.org.
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

commit bdfdff0332b3c06d3392b77d9e2de5f688add5b6
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Dec 24 21:47:58 2020 +0800

    Ignore cases when comment indicators contain alphabets
---
 license-eye/pkg/license/norm.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/license-eye/pkg/license/norm.go b/license-eye/pkg/license/norm.go
index 771f2b2..6cd5612 100644
--- a/license-eye/pkg/license/norm.go
+++ b/license-eye/pkg/license/norm.go
@@ -56,8 +56,8 @@ var (
 		regexp.MustCompile(`(?m)^\s*{-+`), // {-
 		regexp.MustCompile(`(?m)^\s*-}+`), // -}
 
-		regexp.MustCompile(`(?m)^\s*::`),   // ::
-		regexp.MustCompile(`(?m)^\s*@REM`), // @REM
+		regexp.MustCompile(`(?m)^\s*::`),    // ::
+		regexp.MustCompile(`(?mi)^\s*@REM`), // @REM
 	}
 
 	flattenSpace = regexp.MustCompile(`\s+`)


[skywalking-eyes] 04/05: Add more known comment styles

Posted by ke...@apache.org.
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

commit aecc80167db981d73291ea575bc9c4e7380d0d78
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Dec 24 21:57:49 2020 +0800

    Add more known comment styles
---
 license-eye/assets/languages.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/license-eye/assets/languages.yaml b/license-eye/assets/languages.yaml
index c9f8aab..7466c48 100644
--- a/license-eye/assets/languages.yaml
+++ b/license-eye/assets/languages.yaml
@@ -1878,6 +1878,7 @@ Git Config:
   codemirror_mime_type: text/x-properties
   tm_scope: source.gitconfig
   language_id: 807968997
+  comment_style_id: Hashtag
 Glyph:
   type: programming
   color: "#c1ac7f"
@@ -2385,6 +2386,7 @@ Ignore List:
   codemirror_mode: shell
   codemirror_mime_type: text/x-sh
   language_id: 74444240
+  comment_style_id: Hashtag
 Inform 7:
   type: programming
   wrap: true
@@ -5567,6 +5569,7 @@ TOML:
   codemirror_mode: toml
   codemirror_mime_type: text/x-toml
   language_id: 365
+  comment_style_id: Hashtag
 TSQL:
   type: programming
   extensions: