manucorporat / linter-verilog

Atom linter for Verilog, using icarus verilog.
https://atom.io/packages/linter-verilog
MIT License
9 stars 7 forks source link

Linter message from non-active file causes crash #9

Open pistoletpierre opened 6 years ago

pistoletpierre commented 6 years ago

Let's say I have a directory with several files files in it and my linter lints everything in the directory that's referred to (directly or indirectly from the file I have open (part1.sv).

my_project/audio_and_video_config.v (more than 175 lines) my_project/part1.sv (172 lines)

If I lint part1.sv, the linter may return a warning from the audio_and_video_config.v file.

%Warning-PINCONNECTEMPTY: my_project/audio_and_video_config.v:175: Cell pin connected by name with empty reference: rising_edge

linter-verilog (an Atom package that makes use of linter) pushes a message with filePath set to my_project/audio_and_video_config.v and range corresponding to the offending line (175).

This message causes the linter to crash since part1.sv, the active file has less than 175 lines

"[Linter] Error running Verilog Error: Line number (174) greater than maximum line (171) at Object.rangeFromLineNumber"

a2k-hanlon commented 3 years ago

Hi @pistoletpierre,

linter-verilog no longer seems to be maintained (as you know from #3), but I have put together a new package based on it that I believe fixes this issue, and adds several other features. If you give it a try, please let me know if you still have this issue! https://atom.io/packages/linter-veriloghdl