var gutil = require('gulp-util');
var fs = require('fs');

function requireGulp(config) {
  try {

    var req = config._require || require;
    return req('gulp');

  } catch (e) {

    function log(msg) {
      config.log(gutil.colors.red(msg));
    }
  
    log('Fatal error in gulp-parameterized:');
    log('');
    log('  Couldn\'t require the gulp instance.');
    log('');
    log('You might have to pass the gulp instance explicitly like this:')
    log('');
    log('  var gulp = require(\'gulp\');');
    log('  var parameterized = require(\'gulp-parameterized\');');
    log('  parameterized = parameterized.withGulp(gulp);');
    log('');
    log('Aborting, because there\'s nothing we can do.');
  
    var error = new gutil.PluginError(
      'gulp-parameterized', 
      'Couldn\'t require the gulp instance.'
    );
    error.showStack = false;
    throw error;
  }
}

module.exports = requireGulp;

@@ -30,32 +30,8 @@
 l');
-%0Avar fs = require('fs');
 %0A%0Afu
@@ -155,16 +155,26 @@
 ) %7B%0A%0A   
+ var log =
  functio
@@ -174,20 +174,16 @@
 function
- log
 (msg) %7B%0A
@@ -228,16 +228,17 @@
 );%0A    %7D
+;
 %0A  %0A    
@@ -349,32 +349,32 @@
 );%0A    log('');%0A
-
     log('You mig
@@ -430,16 +430,17 @@
  this:')
+;
 %0A    log

Fix codacy issues