@@ -332,27 +332,27 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
332
332
f .cache .ExpectFile (sourcePath )
333
333
334
334
includes := f .ctx .IncludeFolders
335
- var preproc_err error
336
- var preproc_stderr []byte
335
+ var preprocErr error
336
+ var preprocStderr []byte
337
337
if unchanged && f .cache .valid {
338
338
include = f .cache .Next ().Include
339
339
if first && f .ctx .Verbose {
340
340
f .ctx .GetLogger ().Println (constants .LOG_LEVEL_INFO , constants .MSG_USING_CACHED_INCLUDES , sourcePath )
341
341
}
342
342
} else {
343
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (f .ctx , sourcePath , targetFilePath , includes )
343
+ preprocStderr , preprocErr = GCCPreprocRunnerForDiscoveringIncludes (f .ctx , sourcePath , targetFilePath , includes )
344
344
// 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 {
347
347
// Preprocessor successful, done
348
348
include = ""
349
- } else if ! is_exit_error || preproc_stderr == nil {
349
+ } else if ! isExitError || preprocStderr == nil {
350
350
// Ignore ExitErrors (e.g. gcc returning
351
351
// non-zero status), but bail out on
352
352
// other errors
353
- return errors .WithStack (preproc_err )
353
+ return errors .WithStack (preprocErr )
354
354
} else {
355
- include = IncludesFinderWithRegExp (string (preproc_stderr ))
355
+ include = IncludesFinderWithRegExp (string (preprocStderr ))
356
356
if include == "" && f .ctx .Verbose {
357
357
f .ctx .GetLogger ().Println (constants .LOG_LEVEL_DEBUG , constants .MSG_FIND_INCLUDES_FAILED , sourcePath )
358
358
}
@@ -370,19 +370,19 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
370
370
// Library could not be resolved, show error
371
371
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
372
372
// return errors.WithStack(err)
373
- if preproc_err == nil || preproc_stderr == nil {
373
+ if preprocErr == nil || preprocStderr == nil {
374
374
// 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 {
377
377
// If there is a missing #include in the cache, but running
378
378
// gcc does not reproduce that, there is something wrong.
379
379
// Returning an error here will cause the cache to be
380
380
// deleted, so hopefully the next compilation will succeed.
381
381
return errors .New ("Internal error in cache" )
382
382
}
383
383
}
384
- os .Stderr .Write (preproc_stderr )
385
- return errors .WithStack (preproc_err )
384
+ os .Stderr .Write (preprocStderr )
385
+ return errors .WithStack (preprocErr )
386
386
}
387
387
388
388
// Add this library to the list of libraries, the
0 commit comments