-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wangcheng
committed
Feb 28, 2024
1 parent
983a651
commit 8b0e4e3
Showing
5 changed files
with
141 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,28 @@ | ||
diff hunk.go.orig hunk.go | ||
--- hunk.go.orig | ||
+++ hunk.go | ||
@@ -1,12 +1,12 @@ | ||
/* | ||
Copyright 2024 Qiniu Cloud (qiniu.com). | ||
- | ||
+ | ||
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. | ||
diff hunk_test.go.orig hunk_test.go | ||
--- hunk_test.go.orig | ||
+++ hunk_test.go | ||
@@ -1,12 +1,12 @@ | ||
/* | ||
Copyright 2024 Qiniu Cloud (qiniu.com). | ||
- | ||
+ | ||
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 | ||
diff testfile/staticcheck.go.orig testfile/staticcheck.go | ||
--- testfile/staticcheck.go.orig | ||
+++ testfile/staticcheck.go | ||
@@ -4,5 +4,5 @@ | ||
|
||
func testunnuser() { | ||
fmt.Println("unused") | ||
- // wrong format | ||
+ // wrong format | ||
} | ||
diff testfile/test.go.orig testfile/test.go | ||
--- testfile/test.go.orig | ||
+++ testfile/test.go | ||
@@ -3,10 +3,10 @@ | ||
import "fmt" | ||
|
||
func test2() { | ||
- //testerr 33333 | ||
- | ||
- // 222222222 | ||
- //testerr 33333 | ||
+ //testerr 33333 | ||
+ | ||
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. | ||
diff internal/linters/go/golangci-lint/golangci-lint.go.orig internal/linters/go/golangci-lint/golangci-lint.go | ||
--- internal/linters/go/golangci-lint/golangci-lint.go.orig | ||
+++ internal/linters/go/golangci-lint/golangci-lint.go | ||
@@ -17,7 +17,7 @@ | ||
|
||
var lintName = "golangci-lint" | ||
|
||
- // test3333 | ||
+// test3333 | ||
func init() { | ||
linters.RegisterCodeReviewHandler(lintName, golangciLintHandler) | ||
+ // 222222222 | ||
+ //testerr 33333 | ||
|
||
// rrrrrrrrr | ||
} | ||
@@ -33,7 +33,7 @@ | ||
// turn off compile errors by default | ||
linterConfig.Args = append([]string{}, "-debug.no-compile-errors=true", "./...") | ||
} | ||
- //test 4444444 | ||
+ //test 4444444 | ||
output, err := executor.Run(log, linterConfig.Args...) | ||
if err != nil { | ||
log.Errorf("golangci-lint run failed: %v", err) |