Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advance multiroot workspace support #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ GNU 'diff' executable should also be available (can be done by installing [git-f
## Settings
* `checkpatch.checkpatchPath` Path to the checkpatch.pl script
* `checkpatch.checkpatchArgs` checkpatch arguments to use
* `checkpatch.useFolderAsCwd` Relative to multiroot workspace layout. Whether the linter should run in the workspace where the file is from or use the root workspace
* `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.
35 changes: 28 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@
"checkpatch.checkpatchPath": {
"type": "string",
"default": "checkpatch.pl",
"description": "Path to the checkpatch.pl script"
"description": "Path to the checkpatch.pl script. Should be set at least for the root workspace",
"scope": "resource"
},
"checkpatch.checkpatchArgs": {
"type": "array",
"default": [
"--no-tree"
],
"description": "Arguments for the checkpatch script"
"description": "Arguments for the checkpatch script",
"scope": "resource"
},
"checkpatch.run": {
"type": "string",
Expand All @@ -51,12 +53,13 @@
"manual"
],
"default": "onSave",
"description": "Whether the linter is run automatically on save or manually."
"description": "Whether the linter is run automatically on save or manually"
},
"checkpatch.exclude": {
"type": "array",
"default": [],
"description": "Glob patterns for excluding files and folders from automatic checks."
"description": "Glob patterns for excluding files and folders from automatic checks",
"scope": "resource"
},
"checkpatch.diagnosticLevel": {
"type": "string",
Expand All @@ -68,21 +71,31 @@
],
"default": "Information",
"description": "Select the diagnostic level of checkpatch problems"
},
"checkpatch.useFolderAsCwd": {
"type": "boolean",
"default": false,
"description": "Whether the linter should use current folder as cwd or run from root folder instead. Only applies when there `#checkpatch.checkpatchPath#` is not set for current folder",
"scope": "resource"
}
}
},
"commands": [
{
"command": "checkpatch.checkFile",
"title": "Checkpatch Selected File"
"title": "Checkpatch: Check Selected File"
},
{
"command": "checkpatch.checkCommit",
"title": "Checkpatch Commit"
"title": "Checkpatch: Check Commit"
},
{
"command": "checkpatch.toggleAutoRun",
"title": "Toggle Checkpatch for the Current Workspace"
"title": "Checkpatch: Toggle Run Mode For The Current Workspace"
},
{
"command": "checkpatch.cleanDiagnostic",
"title": "Checkpatch: Clean Current Diagnostic"
}
],
"problemMatchers": [
Expand All @@ -103,6 +116,13 @@
"regexp": "#\\d+: FILE: (.*):(\\d+):",
"file": 1,
"line": 2
},
{
"regexp": "(.*):(\\d+): (WARNING|ERROR|CHECK): ?(.+):(.+)",
"file": 1,
"line": 2,
"severity": 3,
"message": 5
}
]
}
Expand Down Expand Up @@ -136,6 +156,7 @@
"@types/vscode": "^1.34.0",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"esbuild": "^0.14.25",
"eslint": "^7.1.0",
"typescript": "^4.0.2"
},
Expand Down
Loading