@@ -352,8 +352,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
352
352
}
353
353
}
354
354
355
- var preproc_err error
356
- var preproc_stderr []byte
355
+ var preprocErr error
356
+ var preprocStderr []byte
357
357
358
358
var include string
359
359
if unchanged && cache .valid {
@@ -362,16 +362,16 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
362
362
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
363
363
}
364
364
} else {
365
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
365
+ preprocStderr , preprocErr = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
366
366
// Unwrap error and see if it is an ExitError.
367
- if preproc_err == nil {
367
+ if preprocErr == nil {
368
368
// Preprocessor successful, done
369
369
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 {
371
371
// 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 )
373
373
} else {
374
- include = IncludesFinderWithRegExp (string (preproc_stderr ))
374
+ include = IncludesFinderWithRegExp (string (preprocStderr ))
375
375
if include == "" && ctx .Verbose {
376
376
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
377
377
}
@@ -389,19 +389,19 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
389
389
// Library could not be resolved, show error
390
390
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
391
391
// return errors.WithStack(err)
392
- if preproc_err == nil || preproc_stderr == nil {
392
+ if preprocErr == nil || preprocStderr == nil {
393
393
// 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 {
396
396
// If there is a missing #include in the cache, but running
397
397
// gcc does not reproduce that, there is something wrong.
398
398
// Returning an error here will cause the cache to be
399
399
// deleted, so hopefully the next compilation will succeed.
400
400
return errors .New (tr ("Internal error in cache" ))
401
401
}
402
402
}
403
- ctx .Stderr .Write (preproc_stderr )
404
- return errors .WithStack (preproc_err )
403
+ ctx .Stderr .Write (preprocStderr )
404
+ return errors .WithStack (preprocErr )
405
405
}
406
406
407
407
// Add this library to the list of libraries, the
0 commit comments