Skip to content

Commit

Permalink
Lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
inferno-chromium authored and naveensrinivasan committed Jan 15, 2021
1 parent b5096bf commit bcaa2e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checks/packaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func Packaging(c checker.Checker) checker.CheckResult {
func isPackagingWorkflow(s string, fp string, c checker.Checker) bool {
// nodejs packages
if strings.Contains(s, "uses: actions/setup-node@") {
r1, _ := regexp.Compile("(?s)registry-url.*https://registry\\.npmjs\\.org")
r2, _ := regexp.Compile("(?s)npm.*publish")
r1, _ := regexp.Compile(`(?s)registry-url.*https://registry\.npmjs\.org`)
r2, _ := regexp.Compile(`(?s)npm.*publish`)

if r1.MatchString(s) && r2.MatchString(s) {
c.Logf("found node packaging workflow using npm: %s", fp)
Expand All @@ -84,14 +84,14 @@ func isPackagingWorkflow(s string, fp string, c checker.Checker) bool {

if strings.Contains(s, "uses: actions/setup-java@") {
// java packages with maven
r1, _ := regexp.Compile("(?s)mvn.*deploy")
r1, _ := regexp.Compile(`(?s)mvn.*deploy`)
if r1.MatchString(s) {
c.Logf("found java packaging workflow using maven: %s", fp)
return true
}

// java packages with gradle
r2, _ := regexp.Compile("(?s)gradle.*publish")
r2, _ := regexp.Compile(`(?s)gradle.*publish`)
if r2.MatchString(s) {
c.Logf("found java packaging workflow using gradle: %s", fp)
return true
Expand Down

0 comments on commit bcaa2e7

Please sign in to comment.