Skip to content

Commit 5c1e487

Browse files
cmaglieper1234
andauthored
Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
1 parent 49e64ff commit 5c1e487

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: cli/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func NewCommand() *cobra.Command {
6868

6969
func checkFlagsConflicts(command *cobra.Command, args []string) {
7070
if importFile != "" && importDir != "" {
71-
feedback.Errorf(tr("error: %[1]s and %[2]s flags cannot be used together", "--input-file", "--input-dir"))
71+
feedback.Errorf(tr("error: %s and %s flags cannot be used together", "--input-file", "--input-dir"))
7272
os.Exit(errorcodes.ErrBadArgument)
7373
}
7474
}

Diff for: commands/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sk
526526
// Case 1: importFile flag has been specified
527527
if importFile != "" {
528528
if importDir != "" {
529-
return nil, "", fmt.Errorf(tr("%[1]s and %[2]s cannot be used together", "importFile", "importDir"))
529+
return nil, "", fmt.Errorf(tr("%s and %s cannot be used together", "importFile", "importDir"))
530530
}
531531

532532
// We have a path like "path/to/my/build/SketchName.ino.bin". We are going to

Diff for: legacy/builder/resolve_library.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func ResolveLibrary(ctx *types.Context, header string) *libraries.Library {
3131

3232
logger := ctx.GetLogger()
3333
if ctx.Verbose {
34-
logger.Println(constants.LOG_LEVEL_INFO, tr("Alternatives for %s:", header), candidates)
34+
logger.Println(constants.LOG_LEVEL_INFO, tr("Alternatives for %[1]s: %[2]s", header, candidates))
3535
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header))
3636
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> %s: %s", tr("candidates"), candidates))
3737
}

Diff for: legacy/builder/wipeout_build_path_if_build_options_changed.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
4646

4747
var prevOpts *properties.Map
4848
if err := json.Unmarshal([]byte(previousBuildOptionsJson), &prevOpts); err != nil || prevOpts == nil {
49-
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, ", "+tr("rebuilding all"), constants.BUILD_OPTIONS_FILE)
49+
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, tr("{0} invalid, rebuilding all"), constants.BUILD_OPTIONS_FILE)
5050
return doCleanup(ctx.BuildPath)
5151
}
5252

0 commit comments

Comments
 (0)