Skip to content

Commit 28378b6

Browse files
committed
Rename variables to use snakeCase (golang idiomatic)
1 parent 50b01b6 commit 28378b6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

legacy/builder/container_find_includes.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
332332
}
333333
}
334334

335-
var preproc_err error
336-
var preproc_stderr []byte
335+
var preprocErr error
336+
var preprocStderr []byte
337337

338338
var include string
339339
if unchanged && cache.valid {
@@ -342,16 +342,16 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
342342
ctx.Info(tr("Using cached library dependencies for file: %[1]s", sourcePath))
343343
}
344344
} else {
345-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
345+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
346346
// Unwrap error and see if it is an ExitError.
347-
if preproc_err == nil {
347+
if preprocErr == nil {
348348
// Preprocessor successful, done
349349
include = ""
350-
} else if _, isExitErr := errors.Cause(preproc_err).(*exec.ExitError); !isExitErr || preproc_stderr == nil {
350+
} else if _, isExitErr := errors.Cause(preprocErr).(*exec.ExitError); !isExitErr || preprocStderr == nil {
351351
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
352-
return errors.WithStack(preproc_err)
352+
return errors.WithStack(preprocErr)
353353
} else {
354-
include = IncludesFinderWithRegExp(string(preproc_stderr))
354+
include = IncludesFinderWithRegExp(string(preprocStderr))
355355
if include == "" && ctx.Verbose {
356356
ctx.Info(tr("Error while detecting libraries included by %[1]s", sourcePath))
357357
}
@@ -369,19 +369,19 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
369369
// Library could not be resolved, show error
370370
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
371371
// return errors.WithStack(err)
372-
if preproc_err == nil || preproc_stderr == nil {
372+
if preprocErr == nil || preprocStderr == nil {
373373
// Filename came from cache, so run preprocessor to obtain error to show
374-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
375-
if preproc_err == nil {
374+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(ctx, sourcePath, targetFilePath, includeFolders)
375+
if preprocErr == nil {
376376
// If there is a missing #include in the cache, but running
377377
// gcc does not reproduce that, there is something wrong.
378378
// Returning an error here will cause the cache to be
379379
// deleted, so hopefully the next compilation will succeed.
380380
return errors.New(tr("Internal error in cache"))
381381
}
382382
}
383-
ctx.Stderr.Write(preproc_stderr)
384-
return errors.WithStack(preproc_err)
383+
ctx.Stderr.Write(preprocStderr)
384+
return errors.WithStack(preprocErr)
385385
}
386386

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

0 commit comments

Comments
 (0)