Skip to content

Commit

Permalink
Merge branch 'linter'
Browse files Browse the repository at this point in the history
  • Loading branch information
alevalv committed Apr 16, 2019
2 parents f49d3f8 + 2d627d6 commit f9036c6
Show file tree
Hide file tree
Showing 13 changed files with 679 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
out/
*.vsix
.vscode-test
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ os: linux
language: node_js
node_js: 8

before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi

install:
- npm install
- npm run vscode:prepublish

script:
- npm ci;
- npm test --silent;
- ./node_modules/.bin/vsce package;

deploy:
Expand Down
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsc.autoDetect": "off"
}
8 changes: 8 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
node_modules/**
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ The usual shortcuts are implemented to evaluate code fragments:
- `ctrl+. ctrl+b` (feed file)
- `ctrl+. ctrl+r` (feed selection)
- `ctrl+alt+x` (feed paragraph)

Linter
------

To use the linter included in this extension set `oz.enableLinter` to `true`. This linter will only show any error or warning when feeding code to the engine for the current file.
9 changes: 9 additions & 0 deletions coverconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"enabled": true,
"relativeSourcePath": "../src",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": ["**/node_modules/**"],
"includePid": false,
"reports": ["json", "html", "lcov"],
"verbose": false
}
175 changes: 168 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 22 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"displayName": "Oz",
"description": "Mozart-Oz OPI for Visual Studio Code",
"icon": "images/icon.png",
"version": "0.0.5",
"galleryBanner": {
"color": "#fcaf3e",
"theme": "light"
},
"version": "1.0.0",
"engines": {
"vscode": "^1.31.0"
},
Expand Down Expand Up @@ -61,6 +65,16 @@
"type": "string",
"description": "Absolute path to the ozengine binary",
"default": "ozengine"
},
"oz.enableLinter": {
"type": "boolean",
"default": false,
"description": "Enables the linting of Oz files"
},
"oz.showCompilerOutput": {
"type": "boolean",
"default": true,
"description": "Shows the compiler output in the output tab"
}
}
},
Expand Down Expand Up @@ -165,13 +179,16 @@
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/node": "^11.11.7",
"typescript": "^2.0.3",
"@types/node": "^11.13.4",
"@types/mocha": "^2.2.42",
"typescript": "^3.4.3",
"vsce": "^1.59.0",
"vscode": "^1.1.33"
"vscode": "^1.1.33",
"tslint": "^5.12.1"
},
"dependencies": {}
}
Loading

0 comments on commit f9036c6

Please sign in to comment.