Visual Studio Code extension for using linux kernel checkpatch tool to lint code.
checkpatch.pl script should be either exposed through $PATH or
pointed out by the checkpatch.checkpatchPath configuration.
Linux / WSL Remote Development
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.plcmd as administrator:
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.
*.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 and adding it to PATH).
checkpatch.checkFileCheck selected file (if the run mode is manual)checkpatch.checkCommitSelect specific commit to be testedcheckpatch.toggleAutoRunToggle automatic checkpatch for the current workspace
checkpatch.checkpatchPathPath to the checkpatch.pl scriptcheckpatch.checkpatchArgscheckpatch arguments to usecheckpatch.runControl whether the linting is automatic on save or manually triggered using thecheckpatch.checkFilecommand.checkpatch.excludeGlob patterns for excluding files and folders from automatic checks.checkpatch.diagnosticLevelDiagnostic level of checkpatch errors.