-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
apache/skywalking-eyes
#94Labels
bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!license eye
Milestone
Description
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
License Tools (apache/skywalking-eyes)
What happened
# EXC0013 revive: Annoying issue about not having a comment. The rare codebase has such comments
- package comment should be of the form "(.+)...
When I fixed License header using license-eyes -c .licenserc.yaml header fix, but I got some lint issues as below when I checked code style using golangci-lint.
Running [/home/runner/golangci-lint-1.41.1-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
Warning: package-comments: package comment should be of the form "Package devops ..." (revive)
Warning: package-comments: package comment should be of the form "Package common ..." (revive)
Warning: package-comments: package comment should be of the form "Package template ..." (revive)
Warning: package-comments: package comment should be of the form "Package template ..." (revive)
Warning: package-comments: package comment should be of the form "Package v1alpha1 ..." (revive)BTW, the result snippet license-eyes fixed is as follows:
// Copyright 2022 KubeSphere Authors
//
// Licensed 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 mypkgWhat you expected to happen
The result snippet license-eyes fixed should be as follows:
// Copyright 2022 KubeSphere Authors
//
// Licensed 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 mypkg is great
package mypkgor
// Copyright 2022 KubeSphere Authors
//
// Licensed 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 mypkg is great
package mypkgHow to reproduce
-
Create main.go
go mod init test go mod tidy// Package test is awesome package test import "fmt" func main() { fmt.Println(Hello World) }
-
Header fix
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest license-eyes header fix
-
Got the unexpected result
// 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 test is awesome package test import "fmt" func main() { fmt.Println(Hello World) }
-
Lint code
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0 golangci-lint run -E revive --exclude-use-default=false ./...
-
See error
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!license eye