Skip to content

Commit 055e396

Browse files
committed
Some variable rename to make linter happy
1 parent f5386ca commit 055e396

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

legacy/builder/container_find_includes.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -332,27 +332,27 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
332332
f.cache.ExpectFile(sourcePath)
333333

334334
includes := f.ctx.IncludeFolders
335-
var preproc_err error
336-
var preproc_stderr []byte
335+
var preprocErr error
336+
var preprocStderr []byte
337337
if unchanged && f.cache.valid {
338338
include = f.cache.Next().Include
339339
if first && f.ctx.Verbose {
340340
f.ctx.GetLogger().Println(constants.LOG_LEVEL_INFO, constants.MSG_USING_CACHED_INCLUDES, sourcePath)
341341
}
342342
} else {
343-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(f.ctx, sourcePath, targetFilePath, includes)
343+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(f.ctx, sourcePath, targetFilePath, includes)
344344
// Unwrap error and see if it is an ExitError.
345-
_, is_exit_error := errors.Cause(preproc_err).(*exec.ExitError)
346-
if preproc_err == nil {
345+
_, isExitError := errors.Cause(preprocErr).(*exec.ExitError)
346+
if preprocErr == nil {
347347
// Preprocessor successful, done
348348
include = ""
349-
} else if !is_exit_error || preproc_stderr == nil {
349+
} else if !isExitError || preprocStderr == nil {
350350
// Ignore ExitErrors (e.g. gcc returning
351351
// non-zero status), but bail out on
352352
// other errors
353-
return errors.WithStack(preproc_err)
353+
return errors.WithStack(preprocErr)
354354
} else {
355-
include = IncludesFinderWithRegExp(string(preproc_stderr))
355+
include = IncludesFinderWithRegExp(string(preprocStderr))
356356
if include == "" && f.ctx.Verbose {
357357
f.ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_FIND_INCLUDES_FAILED, sourcePath)
358358
}
@@ -370,19 +370,19 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
370370
// Library could not be resolved, show error
371371
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
372372
// return errors.WithStack(err)
373-
if preproc_err == nil || preproc_stderr == nil {
373+
if preprocErr == nil || preprocStderr == nil {
374374
// Filename came from cache, so run preprocessor to obtain error to show
375-
preproc_stderr, preproc_err = GCCPreprocRunnerForDiscoveringIncludes(f.ctx, sourcePath, targetFilePath, includes)
376-
if preproc_err == nil {
375+
preprocStderr, preprocErr = GCCPreprocRunnerForDiscoveringIncludes(f.ctx, sourcePath, targetFilePath, includes)
376+
if preprocErr == nil {
377377
// If there is a missing #include in the cache, but running
378378
// gcc does not reproduce that, there is something wrong.
379379
// Returning an error here will cause the cache to be
380380
// deleted, so hopefully the next compilation will succeed.
381381
return errors.New("Internal error in cache")
382382
}
383383
}
384-
os.Stderr.Write(preproc_stderr)
385-
return errors.WithStack(preproc_err)
384+
os.Stderr.Write(preprocStderr)
385+
return errors.WithStack(preprocErr)
386386
}
387387

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

0 commit comments

Comments
 (0)