Skip to content

Commit

Permalink
Remove linting from the makeref command
Browse files Browse the repository at this point in the history
Linting is migrated to GitHub Actions and runs for every pushed change,
so it's not necessary to repeat it during the `makeref` command. We
don't do this for other bot commands either, and removing it simplifies
the code and shortens the runtime.
  • Loading branch information
timvandermeij committed May 31, 2024
1 parent a514bbf commit 93f8df0
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions on_cmd_makeref.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
var botio = require(process.env['BOTIO_MODULE']);
require('shelljs/global');

var fail = false;

exec('npm install', {async:true}, function() {

silent(true);

//
// Lint
//
echo();
echo('>> Linting');

// Using {async} to avoid unnecessary CPU usage
exec('gulp lint', {silent:false, async:true}, function(error, output) {
var successMatch = output.match('files checked, no errors found');

if (successMatch) {
botio.message('+ **Lint:** Passed');
} else {
botio.message('+ **Lint:** FAILED');
fail = true; // non-fatal, continue
}
silent(true);

//
// Get PDFs from local cache
Expand Down Expand Up @@ -80,9 +60,5 @@ exec('gulp lint', {silent:false, async:true}, function(error, output) {
echo('>> Updating local PDF cache')
mkdir('-p', __dirname+'/pdf-cache');
cp('./test/pdfs/*.pdf', __dirname+'/pdf-cache');

if (fail)
exit(1);
}); // exec makeref
}); // exec lint
}); // npm install

0 comments on commit 93f8df0

Please sign in to comment.