Skip to content

Commit

Permalink
Experiment with format
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Sadym committed Dec 2, 2022
1 parent 1a75a4a commit 5251878
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions scripts/formatter/no_split_var.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,25 @@ for (let i = 0; i < specLines.length; i++) {
const line = specLines[i];
for (let pair of openClosePairs) {
if (line.lastIndexOf(pair[0]) > line.lastIndexOf(pair[1])) {
failed.push(
const message =
`Unclosed ${line.substring(line.lastIndexOf(pair[0]))} at line ${i
+ 1}`)
+ 1}`;
failed.push(message);

console.log(`L${i}: ${line}`);
console.log(message);
}
}

if ((line.split("|") - 1).length % 2) {
failed.push(
`Unclosed ${line.substring(line.lastIndexOf("|"))} at line ${i + 1}`)
const message = `Unclosed ${line.substring(
line.lastIndexOf("|"))} at line ${i + 1}`;
failed.push(message);

failed.push(message);

console.log(`L${i}: ${line}`);
console.log(message);
}
}

Expand Down

0 comments on commit 5251878

Please sign in to comment.