Details
"linter.linters": {
"brakeman": {
"capabilities": [],
"command": [
[
"$isBundler",
"bundle",
"exec"
],
"brakeman",
"--format",
"json",
"--no-progress",
"--quiet",
"--absolute-paths",
[
"$config",
"--config-file",
"$config"
],
"$rootDir"
],
"configFiles": [
"brakeman.yml",
"config/brakeman.yml",
".brakeman/config.yml"
],
"enabled": true,
"languages": [
"ruby",
"ruby-puma",
"ruby-bundler",
"ruby-test",
"erb"
],
"name": "brakeman",
"url": "https://brakemanscanner.org/",
"when": [
"$isRails"
]
},
"credo": {
"capabilities": [
"ignore-line",
"ignore-file"
],
"command": [
"mix",
"credo",
"--format",
"json",
"--read-from-stdin",
"--all-priorities",
"$file"
],
"configFiles": [],
"enabled": true,
"languages": [
"elixir"
],
"name": "credo",
"url": "https://hexdocs.pm/credo/"
},
"dart": {
"capabilities": [],
"command": [
"dart",
"analyze",
"$file"
],
"configFiles": [],
"enabled": true,
"languages": [
"dart"
],
"name": "dart",
"url": "https://dart.dev/tools/linter-rules"
},
"eslint": {
"capabilities": [
"ignore-line",
"ignore-file",
"fix-one",
"fix-all",
"fix-inline"
],
"command": [
"eslint",
"--format",
"json",
[
"$config",
"--config",
"$config"
],
[
"$debug",
"--loglevel",
"debug",
"--debug"
],
[
"$fixAll",
"--fix-dry-run"
],
[
"$fixOne",
"--fix-dry-run"
],
"--stdin-filename",
"$file",
"--stdin"
],
"configFiles": [
".eslintrc.js",
".eslintrc.cjs",
".eslintrc.yaml",
".eslintrc.yml",
".eslintrc.json",
".eslintrc"
],
"enabled": true,
"languages": [
"javascript",
"jsx",
"typescript",
"typescriptreact"
],
"name": "eslint",
"url": "https://eslint.org"
},
"hadolint": {
"capabilities": [
"ignore-line"
],
"command": [
"hadolint",
"--format",
"json",
[
"$config",
"--config",
"$config"
],
"-"
],
"configFiles": [
".hadolint.yml",
".hadolint.yaml"
],
"enabled": true,
"languages": [
"dockerfile"
],
"name": "hadolint",
"url": "https://github.com/hadolint/hadolint"
},
"language-tool": {
"capabilities": [],
"command": [
"languagetool",
"--json",
"--autoDetect"
],
"configFiles": [],
"enabled": true,
"languages": [
"markdown",
"html",
"plaintext"
],
"name": "language-tool",
"url": "https://github.com/languagetool-org/languagetool"
},
"luacheck": {
"capabilities": [],
"command": [
"luacheck",
"--formatter",
"plain",
"--codes",
"--ranges",
[
"$config",
"--config",
"$config"
],
"-"
],
"configFiles": [
".luacheckrc"
],
"enabled": true,
"languages": [
"lua"
],
"name": "luacheck",
"url": "https://luacheck.readthedocs.io/en/stable/"
},
"markdownlint": {
"capabilities": [
"fix-inline"
],
"command": [
"markdownlint",
"--json",
[
"$fixAll",
"--fix"
],
[
"$config",
"--config",
"$config"
],
"--stdin"
],
"configFiles": [
".markdownlint.json",
".markdownlint.yaml",
".markdownlint.yml",
".markdownlintrc"
],
"enabled": true,
"languages": [
"markdown"
],
"name": "markdownlint",
"url": "https://github.com/DavidAnson/markdownlint"
},
"php-code-sniffer": {
"capabilities": [],
"command": [
"phpcs",
"--report",
"json",
[
"$config",
"--standard",
"$config"
],
[
"!$config",
"--standard",
"PSR12"
],
"--stdin-path",
"$file",
"-q",
"-"
],
"configFiles": [
".phpcs.xml",
"phpcs.xml",
".phpcs.xml.dist",
"phpcs.xml.dist"
],
"enabled": true,
"languages": [
"php"
],
"name": "php-code-sniffer",
"url": "https://github.com/squizlabs/PHP_CodeSniffer"
},
"proselint": {
"capabilities": [
"fix-inline"
],
"command": [
"proselint",
"--json",
[
"$config",
"--config",
"$config"
],
"-"
],
"configFiles": [
".proselintrc"
],
"enabled": true,
"languages": [
"markdown",
"html",
"plaintext"
],
"name": "proselint",
"url": "https://github.com/amperser/proselint/"
},
"pylint": {
"capabilities": [
"ignore-file"
],
"command": [
"pylint",
"--from-stdin",
"--output-format",
"json",
[
"$config",
"--rcfile",
"$config"
],
"$file"
],
"configFiles": [
".pylintrc"
],
"enabled": true,
"languages": [
"python"
],
"name": "pylint",
"url": "https://www.pylint.org"
},
"reek": {
"capabilities": [
"ignore-line"
],
"command": [
"reek",
"--format",
"json",
"--no-progress",
[
"$config",
"--config",
"$config"
],
"--stdin-filename",
"$file"
],
"configFiles": [
".reek.yml"
],
"enabled": true,
"languages": [
"ruby",
"ruby-test",
"ruby-puma",
"ruby-bundler"
],
"name": "reek",
"url": "https://github.com/troessner/reek"
},
"rubocop": {
"capabilities": [
"ignore-eol",
"fix-category",
"fix-all"
],
"command": [
[
"$isBundler",
"bundle",
"exec"
],
"rubocop",
[
"$lint",
"--format",
"json",
"--extra-details"
],
[
"$config",
"--config",
"$config"
],
[
"$debug",
"--debug"
],
[
"$fixAll",
"--auto-correct-all",
"--stderr"
],
[
"$fixCategory",
"--auto-correct-all",
"--only",
"$code",
"--stderr"
],
"--stdin",
"$file"
],
"configFiles": [
".rubocop.yml"
],
"enabled": true,
"languages": [
"ruby",
"ruby-test",
"ruby-puma",
"ruby-bundler"
],
"name": "rubocop",
"url": "https://rubocop.org"
},
"ruby": {
"capabilities": [],
"command": [
"ruby",
"-c",
"-w"
],
"configFiles": [],
"enabled": true,
"languages": [
"ruby",
"ruby-test",
"ruby-puma",
"ruby-bundler"
],
"name": "ruby",
"url": "https://www.ruby-lang.org"
},
"shellcheck": {
"args": {
"$bash": {
"extensions": [
".bash"
]
},
"$shellscript": {
"languages": [
"shellscript"
]
}
},
"capabilities": [],
"command": [
"shellcheck",
"--format",
"json",
"--enable",
"all",
"-"
],
"configFiles": [],
"enabled": true,
"languages": [
"shellscript",
"bash"
],
"name": "shellcheck",
"url": "https://github.com/koalaman/shellcheck"
},
"sqlfluff": {
"args": {
"$mysql": {
"languages": [
"mysql"
]
},
"$postgres": {
"languages": [
"postgres"
]
}
},
"capabilities": [
"fix-all",
"ignore-eol"
],
"command": [
"sqlfluff",
[
"$lint",
"lint",
"--format",
"json"
],
[
"$fixAll",
"fix"
],
[
"$postgres",
"--dialect",
"postgres"
],
[
"$mysql",
"--dialect",
"mysql"
],
"-"
],
"configFiles": [
".sqlfluff"
],
"enabled": true,
"languages": [
"mysql",
"postgres"
],
"name": "sqlfluff",
"url": "https://docs.sqlfluff.com/en/stable/index.html"
},
"stylelint": {
"capabilities": [
"fix-all"
],
"command": [
"stylelint",
"--formatter",
"json",
[
"$fixAll",
"--fix"
],
[
"$config",
"--config",
"$config"
],
"--stdin-filename",
"$file",
"--stdin"
],
"configFiles": [
"stylelint.config.js",
".stylelintrc.json",
".stylelintrc.yml",
".stylelintrc.yaml",
".stylelintrc.js"
],
"enabled": true,
"languages": [
"css",
"css-in-js",
"html",
"less",
"markdown",
"sass",
"scss",
"sugarss"
],
"name": "stylelint",
"url": "https://stylelint.io"
},
"swiftlint": {
"capabilities": [
"ignore-line",
"ignore-file"
],
"command": [
"swiftlint",
"--use-stdin",
"--reporter",
"json",
[
"$fixAll",
"--fix",
"--format"
],
[
"$config",
"--config",
"$config"
]
],
"configFiles": [
".swiftlint.yml",
".swiftlint.yaml"
],
"enabled": true,
"languages": [
"swift"
],
"name": "swiftlint",
"url": "https://realm.github.io/SwiftLint/"
},
"textlint": {
"capabilities": [
"fix-inline"
],
"command": [
"textlint",
"--format",
"json",
[
"$debug",
"--debug"
],
[
"$config",
"--config",
"$config"
],
"--stdin",
"--stdin-filename",
"$file"
],
"configFiles": [
".textlintrc",
".textlintrc.js",
".textlintrc.json",
".textlintrc.yaml",
".textlintrc.yml"
],
"enabled": true,
"languages": [
"markdown",
"plaintext",
"html"
],
"name": "textlint",
"url": "https://textlint.github.io"
},
"vale": {
"capabilities": [],
"command": [
"vale",
"--output",
"JSON",
[
"$config",
"--config",
"$config"
],
"--ext",
"$extension"
],
"configFiles": [
".vale.ini"
],
"enabled": true,
"languages": [
"markdown",
"plaintext",
"html"
],
"name": "vale",
"url": "https://github.com/errata-ai/vale"
},
"yamllint": {
"capabilities": [
"ignore-line"
],
"command": [
"yamllint",
"--format",
"parsable",
[
"$config",
"--config-file",
"$config"
],
"-"
],
"configFiles": [
".yamllint.yml",
".yamllint.yaml",
".yamllint"
],
"enabled": true,
"languages": [
"yaml"
],
"name": "yamllint",
"url": "https://github.com/adrienverge/yamllint"
}
}
Output linter
[02/11/2022, 10:21:37] No linters found for "Log"
[02/11/2022, 10:21:37] Reading from cache? false
When searching for tools on Windows the path is incorrect. It seems to be using Linux's path separator :
, instead of Windows' ;
.
Sample output:
[5/19/2022, 4:43:12 PM] The yamllint binary couldn't be found within $PATH: [
"C",
"\\Program Files\\PowerShell\\7;C",
"\\Windows\\System32;C",
"\\Windows;C",
...
I have set up a simple custom linter according to the instructions here.
It worked just fine until I removed the configFiles
property from the configuration in package.json
.
When it's missing, the plugin builds, get loaded (it's listed in "available linters" log entry), but it never gets executed. No errors or warnings are issues anywhere (or at least in all places I searched for).
This is very counter-intuitive - some simple linters may not require or even support configuration files.
Adding an empty list: "configFiles": []
resolves the issue, but I spent quite some time to find it out.
- Do i replace Stylelint extension?
- Does it read my .Stylelintrc
- How run it and get the output (npx run linter ?)
- How to make it work with Prettier ?
I'm not seeing clearly laid out in the documentation how I should go about tweaking the global lint rules for a given linter (say to have yamllint
ignore document-start
globally or use a different default line-length
)?
When using the linter plugin on 0.0.13, I get the following output
[1/13/2023, 11:56:00 AM] {
"rootDir": "/Users/My.User/projects/my_root_path",
"configFile": "",
"command": [
"/absolute/path/to/linting_script.rb",
"--",
"--format",
"json",
"--extra-details",
"/absolute/path/to/target_file.rb",
]
}
[1/13/2023, 11:56:01 AM] rubocop's command took 1528ms
After which, linting errors correctly populate in my IDE.
But when I upgrade to 0.0.14 or later, get the following error:
Searched for any of /absolute/path/to/linting_script.rb; couldn't be found within $PATH: [
"/opt/homebrew/bin",
// ...
"/usr/local/share/dotnet",
"~/.dotnet/tools"
]
rubocop's command took 0ms
My guess is that one of windows compatibility fixes caused an issue for Unix systems.
The tagline for the package in VSCode reads:
An extension for VSCode that provides linting for multiple languages in on package.
It should say,
An extension for VSCode that provides linting for multiple languages in >>> one <<< package.
Right now the only place to get this extension is via MS marketplace. Due to licensing issues VSCodium and other open source versions are unable to use that store.
Please register this extension in https://open-vsx.org/
In the documentation it says I can disable linters as such:
{
"linter.linters": {
"ruby": {
"enabled": false
}
}
}
I've tried adding the above to VSCode's settings.json
, but that didn't have any effect. Where and how is Linter supposed to be configured?
thanks for making this. but i'm wondering, why are the default config files for eslint set to prettier? it should be eslint config files. also, why is it linting the console/log window?
About this Issue
Currently, the extension will assume the shell script is written in purely dash (aka POSIX mode for bash), even through there's an explict usage of shebang pointing to bash.
Could you please tell me how can I specify config for yamllint in VScode?
At first, the debugging console said that the executable could not be found in $PATH
after adding it, I was getting the following error:
Error while running "yamllint": spawnSync yamllint ENOENT
yamllint's command took 4ms
I realized that it is not working because for Windows users, the only possible way is through pip
(docs). Due to this, executable is not a normal "binary" but a python script. And I guess this is where the plugin struggles. Potential solutions are:
- Is there a quick fix I can do on my side for it? Right now I am calling
yamllint
with python3 -m yamllint
. While in Ubuntu
I did not need the python3 -m
part, in Windows I do. I also tried defining an alias but of course it is not working.
- About the fix in this repository, is there a possibility to call for
python3 -m yamllint
if calling yamllint
throws this error?
- I have also integrated linters into other IDEs by using these type of plugins. Few of them had the possibility to override the default command to avoid these issues. I think this would be the best option. With this, I could define in my
settings.json
from VSCode that I do not want to use the yamllint
command but python3 -m yamllint
. This will also solve potential problems that will arise with other plugins, as it provides with good enough flexibility.
I cannot think about any other possible solutions
Thanks!
I've noticed that this extension will
- delay a file from being saved until linters run
- block GitHub copilot from making inline suggestions
Are there any plans to address these things? I've started to read in the code to see if I can figure out where these things happen but I'm not super savvy with VSCode extensions (recently converted from vim). Happy to try and work on these things if someone pointed me in the right direction on where to start!
Hi,
I tested this extension on a shell script
It worked when i opened a folder containing the script
But it didn't worked when i opened a workspace (with only 1 folder) containing this folder
Hello:
I have sqlfluff
installed but when I save my postgres
migration file with .sql
extension, linter reports No linters found for "sql"
.
Does it need extra configuration? What should I do to work it around? Please lend a hand!
I am using this extension on VS Code in Windows with gherkin-lint and am having some issues. If I look at the output, I get something like this:
Language id: cucumber
Matching linters: [
"gherkin-lint"
]
Reading from cache? false
Linter config: {
"capabilities": [],
"command": [
"gherkin-lint",
"--config",
"$config",
"--format",
"json",
"$file"
],
"configFiles": [
".gherkin-lintrc"
],
"enabled": true,
"languages": [
"cucumber"
],
"name": "gherkin-lint",
"url": "https://github.com/vsiakka/gherkin-lint"
}
Args: {
"$rootDir": "c:\Projects\AyaHealthcare\Applications\QaAutomation",
"$file": "/c:/Projects/AyaHealthcare/Applications/QaAutomation/cypress/e2e/smoke/travelx/ticketing-smoke-tests.feature",
"$extension": ".feature",
"$extensionBare": "feature",
"$config": "c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"$debug": false,
"$lint": true,
"$language": "cucumber",
"$shebang": ""
}
{
"rootDir": "c:\Projects\AyaHealthcare\Applications\QaAutomation",
"configFile": "c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"command": [
"gherkin-lint",
"--config",
"c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"--format",
"json",
"/c:/Projects/AyaHealthcare/Applications/QaAutomation/cypress/e2e/smoke/travelx/ticketing-smoke-tests.feature"
]
}
Error while running "gherkin-lint": spawnSync gherkin-lint ENOENT
gherkin-lint's command took 37ms
Just trying to throw things at the wall and see what would stick, I customized the command used in my settings.json so that it would add the .cmd extension to it, and that does cause it to at least no longer return the error running the command.
"linter.linters": {
"gherkin-lint": {
"command": [
"gherkin-lint.cmd",
"--config",
"$config",
"--format",
"json",
"$file"
]
}
},
But it doesn't return any issues, even if there are issues reported running gherkin-lint directly. I noticed the $file path generated always seems to have a / at the beginning, and I'm thinking perhaps that's causing a problem?
Language id: cucumber
Matching linters: [
"gherkin-lint"
]
Reading from cache? false
Linter config: {
"capabilities": [],
"command": [
"gherkin-lint.cmd",
"--config",
"$config",
"--format",
"json",
"$file"
],
"configFiles": [
".gherkin-lintrc"
],
"enabled": true,
"languages": [
"cucumber"
],
"name": "gherkin-lint",
"url": "https://github.com/vsiakka/gherkin-lint"
}
Args: {
"$rootDir": "c:\Projects\AyaHealthcare\Applications\QaAutomation",
"$file": "/c:/Projects/AyaHealthcare/Applications/QaAutomation/cypress/e2e/smoke/travelx/ticketing-smoke-tests.feature",
"$extension": ".feature",
"$extensionBare": "feature",
"$config": "c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"$debug": false,
"$lint": true,
"$language": "cucumber",
"$shebang": ""
}
{
"rootDir": "c:\Projects\AyaHealthcare\Applications\QaAutomation",
"configFile": "c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"command": [
"gherkin-lint.cmd",
"--config",
"c:\Projects\AyaHealthcare\Applications\QaAutomation\.gherkin-lintrc",
"--format",
"json",
"/c:/Projects/AyaHealthcare/Applications/QaAutomation/cypress/e2e/smoke/travelx/ticketing-smoke-tests.feature"
]
}
gherkin-lint's command took 493ms
If I run the command exactly as it is laid out in the output directly in my terminal, but without that slash at the beginning of the file path, gherkin-lint runs successfully and returns the list of issues:
gherkin-lint.cmd --config c:\Projects\AyaHealthcare\Applications\QaAutomation.gherkin-lintrc --format json c:/Projects/AyaHealthcare/Applications/QaAutomation/cypress/e2e/smoke/travelx/ticketing-smoke-tests.feature
[{"filePath":"c:\Projects\AyaHealthcare\Applications\QaAutomation\cypress\e2e\smoke\travelx\ticketing-smoke-tests.feature","errors":[{"message":"Missing Feature name","rule":"no-unnamed-features","line":1},{"message":"Forbidden tag @Focus on Scenario","rule":"no-restricted-tags","line":3}]}]
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google ❤️ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-