@@ -108,7 +108,7 @@ func parseInput(r io.Reader) Report {
108108 Severity : severity ,
109109 }
110110
111- if _ , exist := files [fileName ]; exist == false {
111+ if _ , exist := files [fileName ]; exist {
112112 files [fileName ] = & LinterResult {FilePath : fileName }
113113 }
114114
@@ -156,15 +156,15 @@ func handlePush(ctx context.Context, client *github.Client, report Report) error
156156 // find the action's checkrun
157157 checkName := os .Getenv ("ACTION_NAME" )
158158 result , _ , err := client .Checks .ListCheckRunsForRef (ctx , owner , repoName , head , & github.ListCheckRunsOptions {
159- CheckName : github .String (checkName ),
160- Status : github .String ("in_progress" ),
159+ CheckName : github .Ptr (checkName ),
160+ Status : github .Ptr ("in_progress" ),
161161 })
162162 if err != nil {
163163 return err
164164 }
165165
166166 if len (result .CheckRuns ) == 0 {
167- return fmt .Errorf ("Unable to find check run for action: %s" , checkName )
167+ return fmt .Errorf ("unable to find check run for action: %s" , checkName )
168168 }
169169 checkRun := result .CheckRuns [0 ]
170170
@@ -177,12 +177,12 @@ func handlePush(ctx context.Context, client *github.Client, report Report) error
177177 if len (t .AssertionResults ) > 0 {
178178 for _ , a := range t .AssertionResults {
179179 annotations = append (annotations , & github.CheckRunAnnotation {
180- Path : github .String (path ),
181- StartLine : github .Int (a .Line ),
182- EndLine : github .Int (a .Line ),
183- AnnotationLevel : github .String (a .Severity ),
184- Title : github .String ("" ),
185- Message : github .String (a .Message ),
180+ Path : github .Ptr (path ),
181+ StartLine : github .Ptr (a .Line ),
182+ EndLine : github .Ptr (a .Line ),
183+ AnnotationLevel : github .Ptr (a .Severity ),
184+ Title : github .Ptr ("" ),
185+ Message : github .Ptr (a .Message ),
186186 })
187187 }
188188 }
@@ -202,8 +202,8 @@ func handlePush(ctx context.Context, client *github.Client, report Report) error
202202 }
203203
204204 output := & github.CheckRunOutput {
205- Title : github .String ("Result" ),
206- Summary : github .String (summary ),
205+ Title : github .Ptr ("Result" ),
206+ Summary : github .Ptr (summary ),
207207 Annotations : annotations [i :end ],
208208 }
209209
0 commit comments