Skip to content
This repository was archived by the owner on Dec 17, 2021. It is now read-only.

Commit 46c5bbc

Browse files
mburgoshemyklebost
andauthored
added npm-tasks (#9)
Co-authored-by: Eirik <[email protected]>
1 parent 59092d8 commit 46c5bbc

File tree

8 files changed

+1645
-60
lines changed

8 files changed

+1645
-60
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
fsh-generated
2+
**.jar
23

34
.DS_Store
45
.idea

.vscode/extensions.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"recommendations": [
33
"kmahalingam.vscode-language-fsh",
4-
"ms-azuretools.vscode-docker",
5-
"omartawfik.github-actions-vscode",
6-
"mathiasfrohlich.kotlin",
7-
"sissel.shopify-liquid"
4+
"redhat.vscode-yaml"
85
]
96
}

.vscode/settings.json

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
11
{
2-
"files.exclude": {
3-
"**/build": true,
4-
".idea": true,
5-
".gradle": true,
6-
"gradle": true,
7-
"gradlew": true,
8-
"gradlew.bat": true,
9-
"package-cache": true,
10-
"igs/*/input-cache": true,
11-
"igs/*/temp": true,
12-
"igs/*/template": true,
13-
"igs/*/*.jar": true
14-
},
2+
"editor.tabSize": 2,
3+
"files.eol": "\n",
154
"json.schemas": [
165
{
176
// The schema provides IntelliSense when editing json files containing fhir resources (e.g. StructureDefinition).
187
"fileMatch": [
19-
"igs/*/input/*/*.json",
20-
"igs/*/src/test/resources/*/*.json",
8+
"fsh-generated/**.json",
9+
"test/**.json",
2110
],
2211
"url": "https://www.hl7.org/fhir/fhir.schema.json"
2312
},
24-
{
25-
// The schema provides IntelliSense when editing tests.json files
26-
"fileMatch": [
27-
"igs/*/src/test/resources/tests.json",
28-
],
29-
"url": "./tests.schema.json"
30-
}
3113
],
32-
"editor.tabSize": 2,
33-
"files.eol": "\n"
14+
"yaml.schemas": {
15+
"https://raw.githubusercontent.com/navikt/fhir-validator-junit-engine/main/test-specification.schema.json": "test/**.yaml",
16+
},
3417
}

.vscode/tasks.json

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,76 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Build docker-image",
8-
"type": "shell",
9-
"command": "docker build -t navikt/fhir-ig-dev ${workspaceFolder}/.docker",
10-
"presentation": {
11-
"clear": true
12-
},
13-
"problemMatcher": []
14-
},
15-
{
16-
"label": "SUSHI",
17-
"type": "shell",
18-
"command": "docker run -it --rm -v package-cache:/root/.fhir -v ${fileDirname}:/data navikt/fhir-ig-dev sushi /data",
7+
"type": "npm",
8+
"script": "build",
199
"group": {
2010
"kind": "build",
2111
"isDefault": true
2212
},
2313
"presentation": {
2414
"clear": true
2515
},
26-
"problemMatcher": []
16+
"problemMatcher": [
17+
{
18+
"fileLocation": "absolute",
19+
"pattern": [
20+
{
21+
"regexp": "^(warn|error) (.+)$",
22+
"severity": 1,
23+
"message": 2
24+
},
25+
{
26+
"regexp": "^ File: (.+)$",
27+
"file": 1,
28+
},
29+
{
30+
"regexp": "^ Line: (\\d+)$",
31+
"line": 1,
32+
}
33+
]
34+
},
35+
]
2736
},
2837
{
29-
"label": "Validator",
30-
"type": "shell",
31-
"command": "docker run -it --rm -v package-cache:/root/.fhir -v ${fileDirname}:/data navikt/fhir-ig-dev validator /data/fsh-generated/resources -ig /data/fsh-generated/resources -version 4.0",
32-
"group": "test",
33-
"presentation": {
34-
"clear": true
38+
"type": "npm",
39+
"script": "test",
40+
"group": {
41+
"kind": "test",
42+
"isDefault": true
3543
},
36-
"problemMatcher": []
37-
},
38-
{
39-
"label": "IG Publisher",
40-
"type": "shell",
41-
"command": "docker run -it --rm -v package-cache:/root/.fhir -v ${workspaceFolder}/ig-template:/ig-template:ro -v ${fileDirname}:/data/ig navikt/fhir-ig-dev publisher -ig /data/ig/ig.ini",
4244
"presentation": {
4345
"clear": true
4446
},
4547
"problemMatcher": []
4648
},
4749
{
48-
"label": "Clean",
49-
"type": "shell",
50-
"windows": {
51-
"command": "rm -recurse ${workspaceFolder}\\igs\\*\\fsh-generated, ${workspaceFolder}\\igs\\*\\input-cache, ${workspaceFolder}\\igs\\*\\output, ${workspaceFolder}\\igs\\*\\temp, ${workspaceFolder}\\igs\\*\\template"
52-
},
50+
"type": "npm",
51+
"script": "validate",
5352
"presentation": {
5453
"clear": true
5554
},
56-
"problemMatcher": []
55+
"problemMatcher": [
56+
{
57+
"source": "FHIR Validator",
58+
"pattern": [
59+
{
60+
"regexp": "^-- (.+) -{5,}$",
61+
"file": 1,
62+
},
63+
{
64+
"regexp": "^.*$",
65+
},
66+
{
67+
"regexp": "^ ((?:Info|Warning|Error)).* \\(line ?(\\d+), col ?(\\d+)\\) : (.+)$",
68+
"severity": 1,
69+
"line": 2,
70+
//"column": 3,
71+
"message": 4,
72+
"loop": true
73+
}
74+
]
75+
}
76+
]
5777
}
5878
]
5979
}

0 commit comments

Comments
 (0)