Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
idanpa committed Mar 10, 2019
0 parents commit 0c3906e
Show file tree
Hide file tree
Showing 15 changed files with 2,383 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out
node_modules
.vscode-test/
*.vsix
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${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"
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
10 changes: 10 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Change Log

## 0.0.1

- Initial release
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Checkpatch Lint

[Visual Studio Code](https://github.com/Microsoft/vscode) extension for using linux kernel checkpatch tool to lint code.

## Installation

checkpatch.pl script should be installed on your machine. It should be either exposed through $PATH or
pointed out by the `checkpatch.checkpatchPath` configuration.
You can download the checkpatch script from the latest linux kernel by:
```bash
KERNEL_RAW_URL="https://raw.githubusercontent.com/torvalds/linux/master"
sudo wget -O /usr/bin/checkpatch.pl "${KERNEL_RAW_URL}/scripts/checkpatch.pl"
sudo wget -O /usr/bin/spelling.txt "${KERNEL_RAW_URL}/scripts/spelling.txt"
sudo chmod 755 /usr/bin/checkpatch.pl
```

### Windows users

Beside the above - a perl interpreter should also be installed. Tested successfully with [ActivePerl Community Edition](https://www.activestate.com/products/activeperl/downloads/).
*.pl files should be configured to be opened by the interpreter.
GNU 'diff' executable should also be available (can be done by installing git-for-windows and adding it to PATH).
Out-of-the-box WSL support is waiting for this issue - [#63155](https://github.com/Microsoft/vscode/issues/63155).

## Usage

Either have checkpatch.pl available in PATH, or set `checkpatch.checkpatchPath` configuration to your checkpatch.pl path.
Use `checkpatch.checkpatchArgs` to add arguments such as `--ignore BLOCK_COMMENT_STYLE`, `--max-line-length=120`
Loading

0 comments on commit 0c3906e

Please sign in to comment.