Skip to content

Commit

Permalink
ci: replace license header checker and formatter (#1077)
Browse files Browse the repository at this point in the history
This refers to #1075.

korandoru/hawkeye can auto-format all the incoming files at once.

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Aug 15, 2023
1 parent 50015d3 commit 8828c01
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 135 deletions.
2 changes: 0 additions & 2 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
# 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
Expand All @@ -15,7 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

github:
description: "Apache Pulsar Go Client Library"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make lint
- name: Check license header
run: docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 check
- name: Run golangci-lint
run: make lint

integration-tests:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
# 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
Expand All @@ -15,7 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

# Explicit version of Pulsar and Golang images should be
# set via the Makefile or CLI
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/certs/generate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
#
# 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
Expand All @@ -16,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


export CA_HOME=$(pwd)
echo $CA_HOME
Expand Down
118 changes: 0 additions & 118 deletions integration-tests/license_test.go

This file was deleted.

3 changes: 1 addition & 2 deletions integration-tests/pb/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
#
# 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
Expand All @@ -16,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


PROJECT_DIR=$(git rev-parse --show-toplevel)
SOURCE_PATH="$PROJECT_DIR/integration-tests/pb"
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/pb/hello.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* 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
Expand All @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

syntax = "proto3";
package prototest;

Expand Down
19 changes: 19 additions & 0 deletions integration-tests/pb/hi.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* 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.
*/

syntax = "proto3";
package prototest;

Expand Down
25 changes: 25 additions & 0 deletions licenserc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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.

headerPath = "Apache-2.0-ASF.txt"

excludes = [
"*.txt",
]

[mapping.DOUBLESLASH_STYLE]
extensions = ["go"]
3 changes: 2 additions & 1 deletion pulsar/internal/pulsar_proto/PulsarApi.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* 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
Expand All @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

syntax = "proto2";

package pulsar.proto;
Expand Down
3 changes: 1 addition & 2 deletions scripts/pulsar-test-service-start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
#
# 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
Expand All @@ -16,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


set -e

Expand Down
3 changes: 1 addition & 2 deletions scripts/pulsar-test-service-stop.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
#
# 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
Expand All @@ -16,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


set -e

Expand Down
3 changes: 1 addition & 2 deletions scripts/run-ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
#
# 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
Expand All @@ -16,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


set -e -x

Expand Down

0 comments on commit 8828c01

Please sign in to comment.