refactor: fix some golangci-lint warnings (#638) · boyter/scc@0471608
@@ -1257,27 +1257,27 @@ func calculateCocomoSLOCCount(sumCode int64, str *strings.Builder) {
1257125712581258p := gmessage.NewPrinter(glanguage.Make(os.Getenv("LANG")))
125912591260-p.Fprintf(str, "Total Physical Source Lines of Code (SLOC) = %d\n", sumCode)
1261-p.Fprintf(str, "Development Effort Estimate, Person-Years (Person-Months) = %.2f (%.2f)\n", estimatedEffort/12, estimatedEffort)
1262-p.Fprintf(str, " (Basic COCOMO model, Person-Months = %.2f*(KSLOC**%.2f)*%.2f)\n", projectType[CocomoProjectType][0], projectType[CocomoProjectType][1], EAF)
1263-p.Fprintf(str, "Schedule Estimate, Years (Months) = %.2f (%.2f)\n", estimatedScheduleMonths/12, estimatedScheduleMonths)
1264-p.Fprintf(str, " (Basic COCOMO model, Months = %.2f*(person-months**%.2f))\n", projectType[CocomoProjectType][2], projectType[CocomoProjectType][3])
1265-p.Fprintf(str, "Estimated Average Number of Developers (Effort/Schedule) = %.2f\n", estimatedPeopleRequired)
1266-p.Fprintf(str, "Total Estimated Cost to Develop = %s%.0f\n", CurrencySymbol, estimatedCost)
1267-p.Fprintf(str, " (average salary = %s%d/year, overhead = %.2f)\n", CurrencySymbol, AverageWage, Overhead)
1260+_, _ = p.Fprintf(str, "Total Physical Source Lines of Code (SLOC) = %d\n", sumCode)
1261+_, _ = p.Fprintf(str, "Development Effort Estimate, Person-Years (Person-Months) = %.2f (%.2f)\n", estimatedEffort/12, estimatedEffort)
1262+_, _ = p.Fprintf(str, " (Basic COCOMO model, Person-Months = %.2f*(KSLOC**%.2f)*%.2f)\n", projectType[CocomoProjectType][0], projectType[CocomoProjectType][1], EAF)
1263+_, _ = p.Fprintf(str, "Schedule Estimate, Years (Months) = %.2f (%.2f)\n", estimatedScheduleMonths/12, estimatedScheduleMonths)
1264+_, _ = p.Fprintf(str, " (Basic COCOMO model, Months = %.2f*(person-months**%.2f))\n", projectType[CocomoProjectType][2], projectType[CocomoProjectType][3])
1265+_, _ = p.Fprintf(str, "Estimated Average Number of Developers (Effort/Schedule) = %.2f\n", estimatedPeopleRequired)
1266+_, _ = p.Fprintf(str, "Total Estimated Cost to Develop = %s%.0f\n", CurrencySymbol, estimatedCost)
1267+_, _ = p.Fprintf(str, " (average salary = %s%d/year, overhead = %.2f)\n", CurrencySymbol, AverageWage, Overhead)
12681268}
1269126912701270func calculateCocomo(sumCode int64, str *strings.Builder) {
12711271estimatedCost, estimatedScheduleMonths, estimatedPeopleRequired := esstimateCostScheduleMonths(sumCode)
1272127212731273p := gmessage.NewPrinter(glanguage.Make(os.Getenv("LANG")))
127412741275-p.Fprintf(str, "Estimated Cost to Develop (%s) %s%d\n", CocomoProjectType, CurrencySymbol, int64(estimatedCost))
1276-p.Fprintf(str, "Estimated Schedule Effort (%s) %.2f months\n", CocomoProjectType, estimatedScheduleMonths)
1275+_, _ = p.Fprintf(str, "Estimated Cost to Develop (%s) %s%d\n", CocomoProjectType, CurrencySymbol, int64(estimatedCost))
1276+_, _ = p.Fprintf(str, "Estimated Schedule Effort (%s) %.2f months\n", CocomoProjectType, estimatedScheduleMonths)
12771277if math.IsNaN(estimatedPeopleRequired) {
1278-p.Fprintf(str, "Estimated People Required 1 Grandparent\n")
1278+_, _ = p.Fprintf(str, "Estimated People Required 1 Grandparent\n")
12791279 } else {
1280-p.Fprintf(str, "Estimated People Required (%s) %.2f\n", CocomoProjectType, estimatedPeopleRequired)
1280+_, _ = p.Fprintf(str, "Estimated People Required (%s) %.2f\n", CocomoProjectType, estimatedPeopleRequired)
12811281 }
12821282}
12831283