diff --git a/pkg/cli/audit.go b/pkg/cli/audit.go index 1fa0b74623b..aff21e5b7f2 100644 --- a/pkg/cli/audit.go +++ b/pkg/cli/audit.go @@ -286,8 +286,6 @@ func runAuditMulti(ctx context.Context, args []string, repoFlag, outputDir strin // isPermissionErrorStr checks if a string contains any known permission/authentication error marker. // This is the canonical union of all auth-error substrings used across the codebase; update here // rather than adding new inline strings.Contains checks in callers. -// -//nolint:errstringmatch // gh auth and gh api permission failures are intentionally classified from gh CLI text here. func isPermissionErrorStr(s string) bool { return strings.Contains(s, "authentication required") || strings.Contains(s, "exit status 4") || diff --git a/pkg/parser/schedule_parser.go b/pkg/parser/schedule_parser.go index 5bbc2c7f0c3..0694b708c42 100644 --- a/pkg/parser/schedule_parser.go +++ b/pkg/parser/schedule_parser.go @@ -12,6 +12,12 @@ import ( var scheduleLog = logger.New("parser:schedule_parser") +// ErrUnsupportedSyntax is returned by ParseSchedule when the input uses a +// recognised schedule syntax that is explicitly not supported (e.g. "daily at +// 2pm"). Callers that need to distinguish this from a completely unrecognised +// input should test with errors.Is. +var ErrUnsupportedSyntax = errors.New("unsupported schedule syntax") + // durationPattern matches short duration format: number followed by unit (pre-compiled for performance) var durationPattern = regexp.MustCompile(`^(\d+)([hdwm]|mo)$`) @@ -354,7 +360,7 @@ func (p *ScheduleParser) parseDailyBase(hasWeekdaysSuffix bool) (string, error) case "around": return p.parseDailyAround(hasWeekdaysSuffix) default: - return "", errors.New("'daily at