Skip to content

Commit 518d860

Browse files
committed
two final fixes
Signed-off-by: Callum Styan <[email protected]>
1 parent 673df61 commit 518d860

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmd/readmevalidation/coderresources.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ func validateCoderResourceReadmeBody(body string) []error {
125125
lineNum := 0
126126
isInsideCodeBlock := false
127127
isInsideTerraform := false
128-
nextLine := ""
129128

130129
lineScanner := bufio.NewScanner(strings.NewReader(trimmed))
131130
for lineScanner.Scan() {
132131
lineNum++
133-
nextLine = lineScanner.Text()
132+
nextLine := lineScanner.Text()
134133

135134
// Code assumes that invalid headers would've already been handled by the base validation function, so we don't
136135
// need to check deeper if the first line isn't an h1.

cmd/readmevalidation/repostructure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func validateRegistryDirectory() []error {
112112
func validateRepoStructure() error {
113113
var errs []error
114114
if vrdErrs := validateRegistryDirectory(); len(vrdErrs) != 0 {
115-
errs = append(errs, errs...)
115+
errs = append(errs, vrdErrs...)
116116
}
117117

118118
if _, err := os.Stat("./.icons"); err != nil {

0 commit comments

Comments
 (0)