We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e279f70 commit 841abaeCopy full SHA for 841abae
4 files changed
.custom-gcl.yml
@@ -1,4 +1,4 @@
1
-version: v2.6.1
+version: v2.7.0
2
plugins:
3
- module: "github.com/google/go-github/v79/tools/fmtpercentv"
4
path: ./tools/fmtpercentv
.gitignore
@@ -18,3 +18,4 @@ vendor/
18
19
# golangci-lint -v custom generates the following local file:
20
custom-gcl
21
+custom-gcl.exe
script/lint.sh
@@ -5,7 +5,7 @@
5
6
set -e
7
8
-GOLANGCI_LINT_VERSION="2.6.1"
+GOLANGCI_LINT_VERSION="2.7.0"
9
10
CDPATH="" cd -- "$(dirname -- "$0")/.."
11
BIN="$(pwd -P)"/bin
@@ -22,7 +22,7 @@ fail() {
22
# install golangci-lint and custom-gcl in ./bin if they don't exist with the correct version
23
if ! "$BIN"/custom-gcl --version 2> /dev/null | grep -q "$GOLANGCI_LINT_VERSION"; then
24
GOBIN="$BIN" go install "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v$GOLANGCI_LINT_VERSION"
25
- "$BIN"/golangci-lint custom && mv ./custom-gcl "$BIN"
+ "$BIN"/golangci-lint custom --name custom-gcl --destination "$BIN"
26
fi
27
28
MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort)"
tools/gen-release-notes/main.go
@@ -96,8 +96,8 @@ func splitIntoPRs(text string) []string {
96
97
func stripPRHTML(text string) string {
98
_, innerText := getTagSequence(text)
99
- if i := strings.Index(text, "</a>"); i > 0 {
100
- newText := text[:i] + strings.Join(innerText, "")
+ if before, _, ok := strings.Cut(text, "</a>"); ok {
+ newText := before + strings.Join(innerText, "")
101
newText = strings.ReplaceAll(newText, "…", "")
102
newText = newlinesRE.ReplaceAllString(newText, "\n ")
103
return newText
@@ -138,8 +138,8 @@ func getTagSequence(text string) (tagSeq, innerText []string) {
138
tagSeq = append(tagSeq, s)
139
continue
140
}
141
- if i := strings.Index(s, " "); i > 0 {
142
- tagSeq = append(tagSeq, s[0:i])
+ if before, _, ok := strings.Cut(s, " "); ok {
+ tagSeq = append(tagSeq, before)
143
} else {
144
145
0 commit comments