Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idanpa/vscode-checkpatch
Visual Studio Code extension for using linux kernel checkpatch tool to lint code.
https://github.com/idanpa/vscode-checkpatch
checkpatch lint linux linux-kernel-checkpatch vscode-extension
Last synced: about 2 months ago
JSON representation
Visual Studio Code extension for using linux kernel checkpatch tool to lint code.
- Host: GitHub
- URL: https://github.com/idanpa/vscode-checkpatch
- Owner: idanpa
- License: mit
- Created: 2018-12-17T13:28:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-30T09:45:46.000Z (6 months ago)
- Last Synced: 2024-07-01T22:38:08.645Z (6 months ago)
- Topics: checkpatch, lint, linux, linux-kernel-checkpatch, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=idanp.checkpatch
- Size: 135 KB
- Stars: 11
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Checkpatch Lint
[Visual Studio Code](https://github.com/Microsoft/vscode) extension for using linux kernel checkpatch tool to lint code.
## Installation
[checkpatch.pl](https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl) script should be either exposed through $PATH or
pointed out by the `checkpatch.checkpatchPath` configuration.### Linux / [WSL Remote Development](https://code.visualstudio.com/docs/remote/wsl)
```bash
sudo wget -O /usr/bin/checkpatch.pl "https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl"
sudo wget -O /usr/bin/spelling.txt "https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt"
sudo chmod 755 /usr/bin/checkpatch.pl
```### Windows
cmd as administrator:
```bash
curl -o %WINDIR%/System32/checkpatch.pl "https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl"
curl -o %WINDIR%/System32/spelling.txt "https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt"
```
On windows, a perl interpreter should also be installed - tested with [ActivePerl Community Edition](https://www.activestate.com/products/activeperl/downloads/).
*.pl files should be configured to be opened by the interpreter by default (double click on any *.pl file and choose ActivePerl as the default program).
GNU 'diff' executable should also be available (can be done by installing [git-for-windows](https://git-scm.com/download/win) and adding it to PATH).## Commands
* `checkpatch.checkFile` Check selected file (if the run mode is manual)
* `checkpatch.checkCommit` Select specific commit to be tested
* `checkpatch.toggleAutoRun` Toggle automatic checkpatch for the current workspace## Settings
* `checkpatch.checkpatchPath` Path to the checkpatch.pl script
* `checkpatch.checkpatchArgs` checkpatch arguments to use
* `checkpatch.run` Control whether the linting is automatic on save or manually triggered using the `checkpatch.checkFile` command.
* `checkpatch.exclude` Glob patterns for excluding files and folders from automatic checks.
* `checkpatch.diagnosticLevel` Diagnostic level of checkpatch errors.