-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Racket linting using raco #2146
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex test looks good. Add a test for the executable and command. See :help ale-development
.
call ale#assert#TearDownLinterTest() | ||
|
||
Execute(The default command and executable should be correct): | ||
AssertLinter 'raco', 'raco expand %s' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially just plugged my code from what was in the docs. However, the ale#Escape function wasn't working for me.
I assumed that this was because I was calling raco expand %s
directly in ale#linter#Define
under "command".
Execute(The default command should be correct):
" AssertLinter checks the executable and command.
" Pass expected_executable, expected_command
AssertLinter 'some-command', ale#Escape('some-command') . ' --foo'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ale#Escape
is used for a single file, not multiple separate arguments. In this case, it would be ale#Escape("raco")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I tried that first.
AssertLinter 'raco', ale#Escape('raco') . ' expand %s'
Unfortunately, that gives me an error. Is there something I'm doing wrong?
Starting Vader: /testplugin/test/command_callback/test_racket_raco_command_callback.vader
(1/1) [EXECUTE] The default command and executable should be correct
(1/1) [EXECUTE] (X) ['raco', 'raco expand %s'] should be equal to ['raco', '''raco'' expand %s']
Co-Authored-By: aqui18 <aqui18@users.noreply.github.com>
Ok I've reverted the test back to |
Cheers! 🍻 |
Simple 'linter' that uses the same approach as neomake using
raco expand
and regular expressions to match output.Will probably look into racket language server in the future.