/srv/osrm/osrm-backend/scripts
NameSizeModeActions
ci/-0755rm
analyze.sh7910755editdlrm
bisect_cucumber.sh7810755editdlrm
build_api_docs.sh15810755editdlrm
check_taginfo.py15180755editdlrm
error_on_dirty.sh2430755editdlrm
format.sh9890755editdlrm
gdb_printers.py192960644editdlrm
md5sum.js22460755editdlrm
modernize.sh5350755editdlrm
node_install.sh4030755editdlrm
osm2cucumber.js15680644editdlrm
osrm-runner.js65310755editdlrm
poly2req.js33160755editdlrm
tidy.sh5230755editdlrm
timer.js4840755editdlrm
update_dependencies.sh14910755editdlrm
validate_changelog.js14870644editdlrm
Edit: /srv/osrm/osrm-backend/scripts/validate_changelog.js (1487B)
var linereader = require('readline').createInterface( { input: require('fs').createReadStream(require('path').join(__dirname, '..', 'CHANGELOG.md')) }); var done = false; var linenum = 0; var has_errors = false; linereader.on('line', function(line) { linenum += 1; // Only validate the `# UNRELEASED` section if (line.match(/^# [^U]/)) done = true; if (done) return; var line_errors = []; if (line.match(/^ {6}/)) { if (!line.match(/^ {6}- (ADDED|FIXED|CHANGED|REMOVED): /)) { line_errors.push("ERROR: changelog entries must start with '- (ADDED|FIXED|CHANGED|REMOVED): '"); } if (!line.match(/\[#[0-9]+\]\(http.*\)$/)) { line_errors.push("ERROR: changelog entries must end with an issue or PR link in Markdown format"); } } if (line_errors.length > 0) { has_errors = true; // Coloured output if it's directly on an interactive terminal if (process.stdout.isTTY) { console.log('\x1b[31mERROR ON LINE %d\x1b[0m: %s', linenum, line); for (var i = 0; i