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

Change the linter match to a regex in the file name when "domatch=true" #3159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taconi
Copy link
Contributor

@taconi taconi commented Mar 1, 2024

Previously, the match was done with a lua pattern in the file type.
The change is for the pattern to be a regular expression that will match the full file path.

This way, linters can be added to files that do not have a type defined in the micro editor and allow the user to use regular expressions.

Example of a linter for files ending with .rb:

function init()
  linter.makeLinter(
    'rubocop',                      -- name
    '\\.rb$',  -- filetype
    'rubocop',                      -- cmd
    { '--format', 'emacs', '%f' },  -- args
    '%f:%l:%c: C: %m',              -- errorformat
    {},                             -- os
    false,                          -- whitelist
    true       -- domatch: filetype will be a regex pattern that will match the file path.
  )
end

closes #3156

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

Successfully merging this pull request may close these issues.

[feature request] linter plugin matches the file name when using domatch
1 participant