Skip to content

Commit 1a75a4a

Browse files
author
Maksim Sadym
committed
Add checks
1 parent c67515e commit 1a75a4a

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,12 @@ jobs:
4949
with:
5050
name: cddl
5151
path: "*.cddl"
52+
no-split-vars:
53+
runs-on: ubuntu-20.04
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: actions/setup-node@v1
57+
with:
58+
node-version: 14.x
59+
- name: Check no break lines inside blocks
60+
run: node ./scripts/formatter/no_split_var.js

scripts/formatter/no_split_var.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const specLines = fs.readFileSync(specPath, 'utf-8')
88
.split('\n');
99

1010
let failed = [];
11-
const openClosePairs = [["[=", "=]"], ["<dfn", "</dfn"], ["<var", "</var"], ["[", "]"], ["<code", "</code"]];
11+
const openClosePairs = [["[=", "=]"], ["<dfn", "</dfn"], ["<var", "</var"],
12+
["[", "]"], ["<code", "</code"]];
1213

1314
for (let i = 0; i < specLines.length; i++) {
1415
const line = specLines[i];

scripts/test.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ $ROOT/scripts/cddl/generate.js
1919

2020
cddl compile-cddl --cddl local.cddl
2121
cddl compile-cddl --cddl remote.cddl
22-
23-
# Check break lines inside blocks.
24-
$ROOT/scripts/formatter/no_split_var.js

0 commit comments

Comments
 (0)