Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szhu/sublimelinter-cs162
Lint UC Berkeley CS 162 Pintos projects.
https://github.com/szhu/sublimelinter-cs162
Last synced: about 2 months ago
JSON representation
Lint UC Berkeley CS 162 Pintos projects.
- Host: GitHub
- URL: https://github.com/szhu/sublimelinter-cs162
- Owner: szhu
- License: mit
- Created: 2015-12-11T18:03:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T23:51:55.000Z (about 9 years ago)
- Last Synced: 2024-04-11T15:52:57.385Z (9 months ago)
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SublimeLinter-cs162
=========================This linter plugin for SublimeLinter provides an interface to any C compiler output served at http://192.168.162.162:16280.
It is intended to be used with the Pintos VM from UC Berkeley's CS 162 course, so that you can see compile-time errors without needing to run make manually. Here's a screenshot:
To use this, you need to follow these steps:
## Installing
Short version: this plugin has the following dependency tree:
- **SublimeLinter-cs162**
- requires **Package Decontrol** to install
- requires **SublimeLinter3** to run
- requires **Package Control** to install
- requires **Sublime Text 3** to runLong version:
1. Make sure you are on **Sublime Text 3** (for SublimeLinter3 to work).
If not, [download it here]().2. Make sure you have **Package Control** installed (for installing SublimeLinter3).
If not, follow [the instructions here]() to install.3. Make sure you have **SublimeLinter3** installed (for this plugin to work).
If not, go to **Tools** > **Command Palette…**, select **Package Control: Install Package**, then select **SublimeLinter**.4. Make sure you have **Package Decontrol** installed (for installing this plugin).
If not, follow [the instructions here]() to install.5. Make sure you have this plugin installed!
If not, go to **Tools** > **Command Palette…**, select **Package Decontrol: Install from GitHub**, then enter **szhu/SublimeLinter-cs162**.## Using
This linter repeatedly tries to fetch http://192.168.162.162:16280 and tries to parse it as GCC/Clang error output. To make this work, one last step is required. Inside your VM, you need to enter
```shell
curl -fsL http://git.io/v0Yzx | python
```and you need to keep this running as long as you want the linter to work. `^C` to stop this.
Alternatives:
- Want to run this in the background?
`screen -d -m -- bash -c 'curl -fsL http://git.io/v0Yzx | python'` should do it.
`screen -R` to switch to the screen where the server is running, and then `^C` to stop it.- Don't want to use Python? Here's an alternative that works almost perfectly… but because it doesn't support concurrent requests, the linter will sometimes show your errors after a subsequent save.
`bash -c 'while true; do make -j 2>&1 | nc -l 16280 > /dev/null; done'`- The script at http://git.io/v0Yzx takes command line arguments. The syntax is:
`curl -fsL http://git.io/v0Yzx | python - 'COMMAND TO RUN' PORT`
where all three arguments are optional but must appear in that order.## Credit
Original idea by [@szhu]().
Plugin structure and regex from [nirm03/SublimeLinter-clang]().