Showing 87 of 144 total issues
Method SliceFloat64.BuildStats
has 6 return statements (exceeds 4 allowed). Open
Open
func (sf64 *SliceFloat64) BuildStats() (SliceFloat64Stats, error) {
stats := NewSliceFloat64Stats()
stats.Len = sf64.Len()
max, err := sf64.Max()
if err != nil {
Function ToBool
has 6 return statements (exceeds 4 allowed). Open
Open
func ToBool(v any) bool {
if v == nil {
return false
} else if valBool, ok := v.(bool); ok {
return valBool
Function ValidAlphabets
has 6 return statements (exceeds 4 allowed). Open
Open
func ValidAlphabets(a1, a2 string, a2optional bool) error {
if a1 == "" {
return errors.New("alphabet 1 cannot be empty")
} else if !stringsutil.UniqueRunes(a1) {
return errors.New("alphabet 1 chars are not unique")
Consider simplifying this complex logical expression. Open
Open
if !(inclExists && inclNotExists) &&
((!inclExists && exists) || (!inclNotExists && !exists)) {
Function AddFileToArchive
has 6 return statements (exceeds 4 allowed). Open
Open
func AddFileToArchive(tw *tar.Writer, filename, archivename string) error {
// Open the file which will be written into the archive
file, err := os.Open(filename)
if err != nil {
return err
Function CopyFile
has 6 return statements (exceeds 4 allowed). Open
Open
func CopyFile(src, dst string) error {
r, err := os.Open(src)
if err != nil {
return err
}
Consider simplifying this complex logical expression. Open
Open
if t.Before(tr.Min) || t.After(tr.Max) ||
(!inclusiveMin && t.Equal(tr.Min)) ||
(!inclusiveMax && t.Equal(tr.Max)) {
Function AnyStringToQuarterTime
has 6 return statements (exceeds 4 allowed). Open
Open
func AnyStringToQuarterTime(yyyyqSrcStr string) time.Time {
yyyyqSrcStr = strings.TrimSpace(yyyyqSrcStr)
// If not a string, return now time.
if len(yyyyqSrcStr) != 5 {
return time.Now().UTC()
Function AddFileToZip
has 6 return statements (exceeds 4 allowed). Open
Open
func AddFileToZip(zipWriter *zip.Writer, filename string, removePaths bool) error {
fileToZip, err := os.Open(filename)
if err != nil {
return err
}
Function DT6sToString
has 6 return statements (exceeds 4 allowed). Open
Open
func DT6sToString(startDT6, endDT6 int32, layout, presentText, prefixText, joinText, suffixText string) (string, error) {
if startDT6 <= 0 && endDT6 <= 0 {
return "", nil
}
startText, endText, err := DT6sToStrings(startDT6, endDT6, layout, presentText)
Function TimeDeltaDowString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDowString(base time.Time, wantDowS string, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Function TimeDeltaDowInt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDowInt(base time.Time, wantDow time.Weekday, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Method RegexpSet.FindAllString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (set *RegexpSet) FindAllString(pattern string, s string, n int, useStore bool, key string) []string {
Method RegexpSet.FindAllStringSubmatch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (set *RegexpSet) FindAllStringSubmatch(pattern string, s string, n int, useStore bool, key string) [][]string {
Function BuildGifAnimationSimpleRead
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func BuildGifAnimationSimpleRead(src *gif.GIF, delay int, names []string, f ToPalettedFunc, consistentSize bool) (*gif.GIF, error) {
Function TimeDeltaDow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDow(base time.Time, wantDow time.Weekday, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Function ReadCSVFileSingleColumnValuesString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ReadCSVFileSingleColumnValuesString(filename string, sep rune, hasHeader, trimSpace bool, colIdx uint, condenseUniqueSort bool) ([]string, error) {
Function MergeFilterCSVFiles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func MergeFilterCSVFiles(inPaths []string, outPath string, inComma rune, inStripBom bool, andFilter map[string]stringsutil.MatchInfo) error {
Function ReadCSVFilesSingleColumnValuesString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ReadCSVFilesSingleColumnValuesString(files []string, sep rune, hasHeader, trimSpace bool, colIdx uint, condenseUniqueSort bool) ([]string, error) {
Function JoinInterface
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func JoinInterface(arr []any, sep string, stripRepeatedSep bool, stripEmbeddedSep bool, altSep string) string {