Skip to content

Commit 872d8c2

Browse files
committed
Rename variable 'include' -> 'missingIncludeH'
1 parent 7b169af commit 872d8c2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: legacy/builder/container_find_includes.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
355355
var preprocErr error
356356
var preprocStderr []byte
357357

358-
var include string
358+
var missingIncludeH string
359359
if unchanged && cache.valid {
360-
include = cache.Next().Include
360+
missingIncludeH = cache.Next().Include
361361
if first && ctx.Verbose {
362362
ctx.Info(tr("Using cached library dependencies for file: %[1]s", sourcePath))
363363
}
@@ -366,25 +366,25 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
366366
// Unwrap error and see if it is an ExitError.
367367
if preprocErr == nil {
368368
// Preprocessor successful, done
369-
include = ""
369+
missingIncludeH = ""
370370
} 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
372372
return errors.WithStack(preprocErr)
373373
} else {
374-
include = IncludesFinderWithRegExp(string(preprocStderr))
375-
if include == "" && ctx.Verbose {
374+
missingIncludeH = IncludesFinderWithRegExp(string(preprocStderr))
375+
if missingIncludeH == "" && ctx.Verbose {
376376
ctx.Info(tr("Error while detecting libraries included by %[1]s", sourcePath))
377377
}
378378
}
379379
}
380380

381-
if include == "" {
381+
if missingIncludeH == "" {
382382
// No missing includes found, we're done
383383
cache.ExpectEntry(sourcePath, "", nil)
384384
return nil
385385
}
386386

387-
library := ResolveLibrary(ctx, include)
387+
library := ResolveLibrary(ctx, missingIncludeH)
388388
if library == nil {
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})
@@ -408,7 +408,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
408408
// include path and queue its source files for further
409409
// include scanning
410410
ctx.ImportedLibraries = append(ctx.ImportedLibraries, library)
411-
appendIncludeFolder(ctx, cache, sourcePath, include, library.SourceDir)
411+
appendIncludeFolder(ctx, cache, sourcePath, missingIncludeH, library.SourceDir)
412412
sourceDirs := library.SourceDirs()
413413
for _, sourceDir := range sourceDirs {
414414
queueSourceFilesFromFolder(ctx, ctx.CollectedSourceFiles, library, sourceDir.Dir, sourceDir.Recurse)

0 commit comments

Comments
 (0)