This is a atom-linter provider that parses vcs output so that it can be used as a linter. This means it is compatible with everything vcs is, incl. systemverilog, verilog and vhdl.
- A makefile with a silent target
linter
(add.SILENT: linter
to the makefile) that:- Prints the directory in which vcs is run. This is necessary as the makefile can
cd
into another directory and this directory should be known. This should be the first output ofmake linter
. (For this reason, the target should be silent) - Runs vcs, with
2>&1 || true
appended to the command so that errors are not considered as a failed linter run. - Is located in the directory of the source (rtl) files, or any parent directory.
- Prints the directory in which vcs is run. This is necessary as the makefile can
- vcs, available in
PATH
- python (tested with 3.6), available in
PATH
- Atom text editor with linter package installed. You probably want language packages for your hdl languages as well.
- copy code into atom-vcs-linter subdirectory (create it, or let git do it) of atom's packages directory (linux: ~/.atom/packages)
cd
into folder- run
apm
install. With portable atom, this is available in<atom_install_dir>/resources/app/apm/bin
- Get the readme in package settings (this works sometimes but not consistently)
- support more errors and warnings
- support displaying of line-breaks in error messages. This might be something to fix at a higher level (atom-linter / atom).
- normal installation process
- Q: Why is it slow? A: it is about as fast as
make linter
, so speed up that. If you're not doing already, make sure you use incremental builds withvcs
. - Q: Why do I have to do this complex installation procedure? A: because I don't know how to simplify it and am too lazy to find out. If you know, please tell me or fix it yourself and send a pull request.
- Q: It shows an error/warning/... on the first line of a wrong file, instead of at the correct location mentioned in the error. A: Please file an issue with the output of
make linter
(you can strip confidential parts if you want, just make sure the lines with and around the error/warning/... are still in there) and mention where you would like the error/warning/... to be shown (file and line). The code uses general regexes to extract this data, which might fail sometimes asvcs
errors/warnings/... do not follow a strict template that I can parse.