Skip to content

Commit

Permalink
dump errors to debug log which were found in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Jul 16, 2021
1 parent ba6fc4e commit 6eb960c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rule_pyflakes.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ func (rule *RulePyflakes) VisitStep(n *Step) error {

// Cleanup is callback when visiting finished. This callback is called even if the visiting failed since some callback returned an error
func (rule *RulePyflakes) Cleanup() {
rule.group.Wait() // Ensure all processes ended
if err := rule.group.Wait(); err != nil { // Ensure all processes ended
rule.debug("error found while cleanup: %s", err)
}
}

func (rule *RulePyflakes) isPythonShell(r *ExecRun) bool {
Expand Down
4 changes: 3 additions & 1 deletion rule_shellcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ func (rule *RuleShellcheck) VisitWorkflowPost(n *Workflow) error {

// Cleanup is callback when visiting finished. This callback is called even if the visiting failed since some callback returned an error
func (rule *RuleShellcheck) Cleanup() {
rule.group.Wait() // Ensure all processes ended
if err := rule.group.Wait(); err != nil { // Ensure all processes ended
rule.debug("error found while cleanup: %s", err)
}
}

func (rule *RuleShellcheck) getShellName(exec *ExecRun) string {
Expand Down

0 comments on commit 6eb960c

Please sign in to comment.