Skip to content

Commit 7b169af

Browse files
committed
Rename variables to use snakeCase (golang idiomatic)
1 parent 39468e7 commit 7b169af

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Diff for: legacy/builder/container_find_includes.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
352352
}
353353
}
354354

355-
var preproc_err error
356-
var preproc_stderr []byte
355+
var preprocErr error
356+
var preprocStderr []byte
357357

358358
var include string
359359
if unchanged && cache.valid {
@@ -362,16 +362,16 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
362362
ctx.Info(tr("Using cached library dependencies for file: %[1]s", sourcePath))
363363
}
364364
} else {
365-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
365+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
366366
// Unwrap error and see if it is an ExitError.
367-
if preproc_err == nil {
367+
if preprocErr == nil {
368368
// Preprocessor successful, done
369369
include = ""
370-
} else if _, isExitErr := errors.Cause(preproc_err).(*exec.ExitError); !isExitErr || preproc_stderr == nil {
370+
} else if _, isExitErr := errors.Cause(preprocErr).(*exec.ExitError); !isExitErr || preprocStderr == nil {
371371
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
372-
return errors.WithStack(preproc_err)
372+
return errors.WithStack(preprocErr)
373373
} else {
374-
include = IncludesFinderWithRegExp(string(preproc_stderr))
374+
include = IncludesFinderWithRegExp(string(preprocStderr))
375375
if include == "" && ctx.Verbose {
376376
ctx.Info(tr("Error while detecting libraries included by %[1]s", sourcePath))
377377
}
@@ -389,19 +389,19 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
389389
// Library could not be resolved, show error
390390
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
391391
// return errors.WithStack(err)
392-
if preproc_err == nil || preproc_stderr == nil {
392+
if preprocErr == nil || preprocStderr == nil {
393393
// Filename came from cache, so run preprocessor to obtain error to show
394-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
395-
if preproc_err == nil {
394+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
395+
if preprocErr == nil {
396396
// If there is a missing #include in the cache, but running
397397
// gcc does not reproduce that, there is something wrong.
398398
// Returning an error here will cause the cache to be
399399
// deleted, so hopefully the next compilation will succeed.
400400
return errors.New(tr("Internal error in cache"))
401401
}
402402
}
403-
ctx.Stderr.Write(preproc_stderr)
404-
return errors.WithStack(preproc_err)
403+
ctx.Stderr.Write(preprocStderr)
404+
return errors.WithStack(preprocErr)
405405
}
406406

407407
// Add this library to the list of libraries, the

0 commit comments

Comments
 (0)