Skip to content

Commit 11e4da3

Browse files
committed
these regex should be equivalent, but using backticks we can avoid having to double escape
Signed-off-by: Callum Styan <[email protected]>
1 parent 8ab9fe9 commit 11e4da3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/readmevalidation/coderresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var (
2121
// TODO: This is a holdover from the validation logic used by the Coder Modules repo. It gives us some assurance, but
2222
// realistically, we probably want to parse any Terraform code snippets, and make some deeper guarantees about how it's
2323
// structured. Just validating whether it *can* be parsed as Terraform would be a big improvement.
24-
terraformVersionRe = regexp.MustCompile("^\\s*\\bversion\\s+=")
24+
terraformVersionRe = regexp.MustCompile(`^\s*\bversion\s+=`)
2525
)
2626

2727
type coderResourceFrontmatter struct {

cmd/readmevalidation/readmefiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const (
3333
var (
3434
supportedAvatarFileFormats = []string{".png", ".jpeg", ".jpg", ".gif", ".svg"}
3535
// Matches markdown headers, must be at the beginning of a line, such as "# " or "### ".
36-
readmeHeaderRe = regexp.MustCompile("^(#{1,})(\\s*)")
36+
readmeHeaderRe = regexp.MustCompile(`^(#{1,})(\s*)`)
3737
)
3838

3939
// validationPhase represents a specific phase during README validation. It is expected that each phase is discrete, and

0 commit comments

Comments
 (0)