-
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
Verilator current file search path #3500
Verilator current file search path #3500
Conversation
ba9f6c4
to
48b57e6
Compare
74d74c7
to
7bfabff
Compare
This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See |
7bfabff
to
0a4f9f1
Compare
4f94da6
to
3b5021b
Compare
@w0rp Any hint about the error that I am getting here and which I can't reproduce locally?
|
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 left some comments here. I have pushed a commit which should fix another test which wasn't cleaning up its state properly.
@@ -0,0 +1,27 @@ | |||
Before: | |||
" We edit a dummyy file to have valid bufnr/filename | |||
let g:fileDummy = tempname() . '.v' |
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.
let g:fileDummy = tempname() . '.v' | |
let g:file_dummy = tempname() . '.v' |
Use snake_case
for variable names.
ale_linters/verilog/verilator.vim
Outdated
return 'verilator --lint-only -Wall -Wno-DECLFILENAME ' | ||
\ . ' -I' . l:buffer_abs_path . ' ' |
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.
Use %s:h
in the command instead, which is replaced with the absolute path to the directory of the file by ALE, and which can be replaced with a mapped filename if you're using something like Docker with the g:ale_filename_mappings
option. See :help ale-command-format-strings
and :help g:ale_filename_mappings
for more information.
@@ -0,0 +1,27 @@ | |||
Before: |
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.
See :help ale-dev
for information on writing tests for linter definitions. Try to structure this more like other linter tests, such as test/command_callback/test_iverilog_command_callback.vader
,
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 should have read the doc earlier...
3b5021b
to
e937041
Compare
e937041
to
4e2f94d
Compare
4e2f94d
to
6c0aa8c
Compare
Cheers! 🍻 |
👍 |
Adds the current edited file path to the linter search path.
As we are using a temporary file with verilator, we need to se the search path to the directory containing the original file.