Showing 90 of 147 total issues
Method Times.RangeLower
has 5 return statements (exceeds 4 allowed). Open
Open
func (ts Times) RangeLower(t time.Time, inclusive bool) (time.Time, error) {
if len(ts) == 0 {
return t, ErrEmptyTimeSlice
}
sortedTS := ts.Dedupe()
Method TimeMore.SeasonMeteorological
has 5 return statements (exceeds 4 allowed). Open
Open
func (tm TimeMore) SeasonMeteorological() Yearquarter {
m := tm.time.Month()
if m < 3 {
return Winter // Starts December 1
} else if m < 6 {
Function UserToAbsolute
has 5 return statements (exceeds 4 allowed). Open
Open
func UserToAbsolute(file string) (string, error) {
file = strings.TrimSpace(file)
parts := strings.Split(file, string(os.PathSeparator))
if len(parts) == 0 {
return file, nil
Method TimeRange.IntersectionDuration
has 5 return statements (exceeds 4 allowed). Open
Open
func (tr *TimeRange) IntersectionDuration(tr2 TimeRange) time.Duration {
tr.Normalize()
tr2.Normalize()
if tr2.Min.After(tr.Max) || tr2.Max.Before(tr.Min) {
// No overlap
Function WriteCSVFiltered
has 5 return statements (exceeds 4 allowed). Open
Open
func WriteCSVFiltered(reader *csv.Reader, writer *csv.Writer, andFilter map[string]stringsutil.MatchInfo, writeHeader bool) error {
csvHeader := CSVHeader{}
i := -1
for {
line, err := reader.Read()
Function NewRequest
has 5 return statements (exceeds 4 allowed). Open
Open
func NewRequest(method, url string, params url.Values, files []FileInfo) (*http.Request, error) {
mb := NewMultipartBuilder()
err := mb.WriteURLValues(params)
if err != nil {
return nil, err
Method Times.RangeUpper
has 5 return statements (exceeds 4 allowed). Open
Open
func (ts Times) RangeUpper(t time.Time, inclusive bool) (time.Time, error) {
if len(ts) == 0 {
return t, ErrEmptyTimeSlice
}
sortedTS := ts.Dedupe()
Function StartEndDT6s
has 5 return statements (exceeds 4 allowed). Open
Open
func StartEndDT6s(dt6s []int32) (int32, int32) {
if len(dt6s) == 0 {
return -1, -1
}
Method RangeFloat64.binarySearch
has 5 return statements (exceeds 4 allowed). Open
Open
func (rng *RangeFloat64) binarySearch(v float64, l, r int32) (int32, error) {
rng.iter += 1
if rng.iter > MaxTries {
return int32(0), fmt.Errorf("too many (%v) binary search iterations", MaxTries)
}
Function RatioInt
has 5 return statements (exceeds 4 allowed). Open
Open
func RatioInt(x1, y1, x2, y2 int) (int, int) {
if x2 > 0 && y2 > 0 {
return x2, y2
} else if x2 <= 0 && y2 <= 0 {
return x1, y1