Unverified Commit 1d95e7c7 authored by Xin.Zh's avatar Xin.Zh Committed by GitHub

Merge pull request #41 from zaihang365/featrue/license

Add: license checker
parents 9077f6bf d92c700c
...@@ -12,7 +12,12 @@ env: ...@@ -12,7 +12,12 @@ env:
install: true install: true
script: script:
# license-check
- echo 'start license check'
- sh before_validate_license.sh
- chmod u+x /tmp/tools/license/license-header-checker
- go fmt ./... && [[ -z `git status -s` ]] - go fmt ./... && [[ -z `git status -s` ]]
- /tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]]
- go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic - go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic
after_success: after_success:
......
#
# 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.
remoteLicenseCheckerPath="https://github.com/dubbogo/resources/raw/master/tools/license"
remoteLicenseCheckerName="license-header-checker"
remoteLicenseCheckerURL="${remoteLicenseCheckerPath}/${remoteLicenseCheckerName}"
remoteLicenseName="license.txt"
remoteLicenseURL="${remoteLicenseCheckerPath}/${remoteLicenseName}"
licensePath="/tmp/tools/license"
mkdir -p ${licensePath}
wget -P "${licensePath}" ${remoteLicenseCheckerURL}
wget -P "${licensePath}" ${remoteLicenseURL}
/****************************************************** /*
# DESC : getty client * Licensed to the Apache Software Foundation (ASF) under one or more
# MAINTAINER : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# LICENCE : Apache License 2.0 * this work for additional information regarding copyright ownership.
# EMAIL : alexstocks@foxmail.com * The ASF licenses this file to You under the Apache License, Version 2.0
# MOD : 2016-09-01 21:32 * (the "License"); you may not use this file except in compliance with
# FILE : client.go * 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.
*/
package getty package getty
......
/*
* 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.
*/
package getty package getty
import ( import (
......
/****************************************************** /*
# DESC : tcp/websocket connection * Licensed to the Apache Software Foundation (ASF) under one or more
# MAINTAINER : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# LICENCE : Apache License 2.0 * this work for additional information regarding copyright ownership.
# EMAIL : alexstocks@foxmail.com * The ASF licenses this file to You under the Apache License, Version 2.0
# MOD : 2016-08-17 11:21 * (the "License"); you may not use this file except in compliance with
# FILE : connection.go * 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.
*/
package getty package getty
......
/****************************************************** /*
# DESC : const properties * Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 * this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 * The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com * (the "License"); you may not use this file except in compliance with
# MOD : 2018-03-17 16:54 * the License. You may obtain a copy of the License at
# FILE : const.go *
******************************************************/ * 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.
*/
package getty package getty
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package hello package hello
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package hello package hello
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package hello package hello
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package hello package hello
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package main package main
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package tcp package tcp
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package main package main
......
// +build linux /*
* Licensed to the Apache Software Foundation (ASF) under one or more
/****************************************************** * contributor license agreements. See the NOTICE file distributed with
# MAINTAINER : wongoo * this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 * The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : gelnyang@163.com * (the "License"); you may not use this file except in compliance with
# MOD : 2019-06-11 * 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.
*/
package util package util
......
// +build !linux /*
* Licensed to the Apache Software Foundation (ASF) under one or more
/****************************************************** * contributor license agreements. See the NOTICE file distributed with
# MAINTAINER : wongoo * this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 * The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : gelnyang@163.com * (the "License"); you may not use this file except in compliance with
# MOD : 2019-06-11 * 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.
*/
package util package util
......
/****************************************************** /*
# MAINTAINER : Alex Stocks * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : alexstocks@foxmail.com * this work for additional information regarding copyright ownership.
# MOD : 2019-07-25 * 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.
*/
package util package util
......
/****************************************************** /*
# MAINTAINER : wongoo * Licensed to the Apache Software Foundation (ASF) under one or more
# LICENCE : Apache License 2.0 * contributor license agreements. See the NOTICE file distributed with
# EMAIL : gelnyang@163.com * this work for additional information regarding copyright ownership.
# MOD : 2019-06-11 * 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.
*/
package util package util
......
/****************************************************** /*
# DESC : getty interface * Licensed to the Apache Software Foundation (ASF) under one or more
# MAINTAINER : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# LICENCE : Apache License 2.0 * this work for additional information regarding copyright ownership.
# EMAIL : alexstocks@foxmail.com * The ASF licenses this file to You under the Apache License, Version 2.0
# MOD : 2016-08-17 11:20 * (the "License"); you may not use this file except in compliance with
# FILE : getty.go * 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.
*/
package getty package getty
...@@ -100,7 +108,7 @@ const ( ...@@ -100,7 +108,7 @@ const (
) )
///////////////////////////////////////// /////////////////////////////////////////
// connection interface // connection
///////////////////////////////////////// /////////////////////////////////////////
type Connection interface { type Connection interface {
...@@ -129,7 +137,7 @@ type Connection interface { ...@@ -129,7 +137,7 @@ type Connection interface {
} }
///////////////////////////////////////// /////////////////////////////////////////
// Session interface // Session
///////////////////////////////////////// /////////////////////////////////////////
var ( var (
...@@ -175,7 +183,7 @@ type Session interface { ...@@ -175,7 +183,7 @@ type Session interface {
} }
///////////////////////////////////////// /////////////////////////////////////////
// EndPoint interface // EndPoint
///////////////////////////////////////// /////////////////////////////////////////
type EndPoint interface { type EndPoint interface {
......
/*
* 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.
*/
package getty package getty
import ( import (
......
/****************************************************** /*
# DESC : getty client/server options * Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 * this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 * The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com * (the "License"); you may not use this file except in compliance with
# MOD : 2018-03-17 21:12 * the License. You may obtain a copy of the License at
# FILE : options.go *
******************************************************/ * 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.
*/
package getty package getty
......
/*
* 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.
*/
package getty package getty
import ( import (
......
/****************************************************** /*
# DESC : getty server * Licensed to the Apache Software Foundation (ASF) under one or more
# MAINTAINER : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# LICENCE : Apache License 2.0 * this work for additional information regarding copyright ownership.
# EMAIL : alexstocks@foxmail.com * The ASF licenses this file to You under the Apache License, Version 2.0
# MOD : 2016-08-17 11:21 * (the "License"); you may not use this file except in compliance with
# FILE : server.go * 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.
*/
package getty package getty
......
/*
* 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.
*/
package getty package getty
import ( import (
......
/****************************************************** /*
# DESC : session * Licensed to the Apache Software Foundation (ASF) under one or more
# MAINTAINER : Alex Stocks * contributor license agreements. See the NOTICE file distributed with
# LICENCE : Apache License 2.0 * this work for additional information regarding copyright ownership.
# EMAIL : alexstocks@foxmail.com * The ASF licenses this file to You under the Apache License, Version 2.0
# MOD : 2016-08-17 11:21 * (the "License"); you may not use this file except in compliance with
# FILE : session.go * 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.
*/
package getty package getty
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment