mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
autofix all violations
This commit is contained in:
parent
a3553c924d
commit
8e9a8a84dc
4245 changed files with 87774 additions and 82935 deletions
|
@ -21,28 +21,38 @@ import fs from 'fs';
|
|||
import path from 'path';
|
||||
|
||||
export default function checkPlugins(grunt) {
|
||||
grunt.registerTask('checkPlugins', 'Checks for plugins which may disrupt tests', function checkPlugins() {
|
||||
const done = this.async();
|
||||
const pluginsDir = path.resolve('./plugins/');
|
||||
grunt.registerTask(
|
||||
'checkPlugins',
|
||||
'Checks for plugins which may disrupt tests',
|
||||
function checkPlugins() {
|
||||
const done = this.async();
|
||||
const pluginsDir = path.resolve('./plugins/');
|
||||
|
||||
fs.readdir(pluginsDir, (err, files) => {
|
||||
if (!files) {
|
||||
return done();
|
||||
}
|
||||
fs.readdir(pluginsDir, (err, files) => {
|
||||
if (!files) {
|
||||
return done();
|
||||
}
|
||||
|
||||
const plugins = files.filter(file => {
|
||||
return fs.statSync(path.join(pluginsDir, file)).isDirectory();
|
||||
});
|
||||
|
||||
if (plugins.length) {
|
||||
grunt.log.error('===================================================================================================');
|
||||
plugins.forEach(plugin => {
|
||||
grunt.log.error(`The ${plugin} plugin may disrupt the test process. Consider removing it and re-running your tests.`);
|
||||
const plugins = files.filter(file => {
|
||||
return fs.statSync(path.join(pluginsDir, file)).isDirectory();
|
||||
});
|
||||
grunt.log.error('===================================================================================================');
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
if (plugins.length) {
|
||||
grunt.log.error(
|
||||
'==================================================================================================='
|
||||
);
|
||||
plugins.forEach(plugin => {
|
||||
grunt.log.error(
|
||||
`The ${plugin} plugin may disrupt the test process. Consider removing it and re-running your tests.`
|
||||
);
|
||||
});
|
||||
grunt.log.error(
|
||||
'==================================================================================================='
|
||||
);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue