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

Can this be used to enable arbitrary linters? #14

Open
DJMcMayhem opened this issue Sep 13, 2023 · 0 comments
Open

Can this be used to enable arbitrary linters? #14

DJMcMayhem opened this issue Sep 13, 2023 · 0 comments

Comments

@DJMcMayhem
Copy link

Hello,

I'm trying to use this extension to enable linting with the qmllint tool. The qmllint executable is stored in a folder that is in my %PATH%. Here is my .multilinterrc.json file, which I have stored in my user folder.

{
  "qmllint": {
    "enabled": true,
    "fileExtensions": "qml",
    "exectuable": "qmllint.exe",
    "additionalArguments": "--json -",
    "installationType": "global"
  }
}

From the debug output, it seems that this file is being loaded, but it never finds the linter for this file type. And it is listing all of the linters that in the default config.json file, which makes me think that when it loads my multilinterrc file, it only looks at the linters under the "known" names, and I can't add something with a new name. Is that correct?

Loading user defined tool configs...
Loading default tool configs from internal resources...
Default tool configs loaded from internal resources...
Searching config file in directory "C:\Project\Qml"
Searching config file in directory "C:\Project"
Searching config file in directory "C:\"
Searching config file in directory "C:\Users\DJ"
Config file found in path "C:\Users\DJ\.multilinterrc.json"
User defined tool configs loaded...


Formatter Name = prettier

            Enabled = false
         Executable = "prettier.cmd"
          Arguments = "--write "{filePath}""
     StdInArguments = "--stdin-filepath "{filePath}""
AdditionalArguments = ""
   InstallationType = "local"

Formatter Name = beautify

            Enabled = false
         Executable = "beautify.cmd"
          Arguments = "--file "{filePath}" --replace"
     StdInArguments = ""
AdditionalArguments = ""
   InstallationType = "local"

Linter Name = eslint

            Enabled = false
         Executable = "eslint.cmd"
          Arguments = ""{filePath}" -f json"
     StdInArguments = "--stdin --stdin-filename="{filePath}" -f json"
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = "https://eslint.org/docs/rules/{ruleId}"
    ResultsSelector = "$[0].messages"
     SourceSelector = "source"
       LineSelector = "line"
     ColumnSelector = "column"
    EndLineSelector = "endLine"
  EndColumnSelector = "endColumn"
    IsFatalSelector = "isFatal"
    MessageSelector = "message"
     RuleIdSelector = "ruleId"
RuleHelpUrlSelector = ""
   SeveritySelector = "severity"

Linter Name = stylelint

            Enabled = false
         Executable = "stylelint.cmd"
          Arguments = ""{filePath}" -f json"
     StdInArguments = "--stdin-filename="{filePath}" -f json"
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = "https://stylelint.io/user-guide/rules/{ruleId}"
    ResultsSelector = "$[0].warnings"
     SourceSelector = ""
       LineSelector = "line"
     ColumnSelector = "column"
    EndLineSelector = ""
  EndColumnSelector = ""
    IsFatalSelector = ""
    MessageSelector = "text"
     RuleIdSelector = "rule"
RuleHelpUrlSelector = ""
   SeveritySelector = "severity"

Linter Name = csslint

            Enabled = false
         Executable = "csslint.cmd"
          Arguments = ""{filePath}" --format=json"
     StdInArguments = ""
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = ""
    ResultsSelector = "$.messages"
     SourceSelector = "evidence"
       LineSelector = "line"
     ColumnSelector = "col"
    EndLineSelector = ""
  EndColumnSelector = ""
    IsFatalSelector = ""
    MessageSelector = "message"
     RuleIdSelector = "rule.id"
RuleHelpUrlSelector = "rule.url"
   SeveritySelector = "type"

Linter Name = jslint

            Enabled = false
         Executable = "jslint.cmd"
          Arguments = ""{filePath}" --json"
     StdInArguments = ""
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = ""
    ResultsSelector = "$[1]"
     SourceSelector = "evidence"
       LineSelector = "line"
     ColumnSelector = "character"
    EndLineSelector = ""
  EndColumnSelector = ""
    IsFatalSelector = ""
    MessageSelector = "reason"
     RuleIdSelector = "id"
RuleHelpUrlSelector = ""
   SeveritySelector = "id"

Linter Name = jshint

            Enabled = false
         Executable = "jshint.cmd"
          Arguments = ""{filePath}" --reporter "%APPDATA%\npm\node_modules\jshint-json\json.js""
     StdInArguments = ""
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = ""
    ResultsSelector = "$.data[0].functions"
     SourceSelector = ""
       LineSelector = "line"
     ColumnSelector = "character"
    EndLineSelector = "last"
  EndColumnSelector = "lastcharacter"
    IsFatalSelector = ""
    MessageSelector = ""
     RuleIdSelector = ""
RuleHelpUrlSelector = ""
   SeveritySelector = ""

Linter Name = sass-lint

            Enabled = false
         Executable = "sass-lint.cmd"
          Arguments = ""{filePath}" -v -f json"
     StdInArguments = ""
AdditionalArguments = ""
   InstallationType = "local"
     FileExtensions = ""
        RuleHelpUrl = ""
    ResultsSelector = "$[0].messages"
     SourceSelector = ""
       LineSelector = "line"
     ColumnSelector = "column"
    EndLineSelector = ""
  EndColumnSelector = ""
    IsFatalSelector = ""
    MessageSelector = "message"
     RuleIdSelector = "ruleId"
RuleHelpUrlSelector = ""
   SeveritySelector = "severity"

Searching linters to be used for file extension ".qml"
No linters found to be used for file extension "qml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant