Skip to content

Commit 9b26e71

Browse files
committed
Correct readme filename regular expression
Missing parentheses resulted in the regular expression matching files that are not recognized as a readme by GitHub.
1 parent 15c986b commit 9b26e71

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Diff for: internal/rule/rulefunction/rulefunction.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Type func() (result ruleresult.Type, output string)
3535
// MissingReadme checks if the project has a readme that will be recognized by GitHub.
3636
func MissingReadme() (result ruleresult.Type, output string) {
3737
// https://github.com/github/markup/blob/master/README.md
38-
readmeRegexp := regexp.MustCompile(`(?i)^readme\.(markdown)|(mdown)|(mkdn)|(md)|(textile)|(rdoc)|(org)|(creole)|(mediawiki)|(wiki)|(rst)|(asciidoc)|(adoc)|(asc)|(pod)|(txt)$`)
38+
readmeRegexp := regexp.MustCompile(`(?i)^readme\.((markdown)|(mdown)|(mkdn)|(md)|(textile)|(rdoc)|(org)|(creole)|(mediawiki)|(wiki)|(rst)|(asciidoc)|(adoc)|(asc)|(pod)|(txt))$`)
3939

4040
// https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-readmes#about-readmes
4141
if pathContainsRegexpMatch(projectdata.ProjectPath(), readmeRegexp) ||

0 commit comments

Comments
 (0)