Closed minecraft2048 closed 6 years ago
Syntastic doesn't care about file extensions.
Well this happens:
counter-ex.sv and counter-ex.v:
//Toggle flip flop
`ifndef COUNTER_SV
`define COUNTER_SV
`default_nettype none
module tff (q, clk, reset);
output reg q;
input clk, reset;
always @(posedge reset or posedge clk) begin
if (reset) begin
q <= 1'b0;
end else begin
q <= ~q;
end
end
endmodule
`endif
If I run :SyntasticInfo
on counter-ex.sv:
Syntastic version: 3.9.0-6 (Vim 801, Linux)
Info for filetype: systemverilog
Global mode: active
Filetype systemverilog is active
The current file will be checked automatically
Available checkers: -
Currently enabled checkers: -
Press ENTER or type command to continue
If I rename counter-ex.sv to counter-ex.v and run :SyntasticInfo
on counter-ex.v:
Syntastic version: 3.9.0-6 (Vim 801, Linux)
Info for filetype: verilog
Global mode: active
Filetype verilog is active
The current file will be checked automatically
Available checkers: iverilog verilator
Currently enabled checker: verilator
Press ENTER or type command to continue
So the thing that prevents syntastic from checking it is that .sv instead of .v
That's the expected behavior:
filetype
s, not file extensionsfiletype
s are set by Vim (or by other plugins), not by syntasticfiletype
systemverylog
.Please see #2088.
Both Verilog linters (Verilator, Icarus Verilog) that syntastic uses supports at least some SystemVerilog, and the only thing that stops .sv file from being checked by both of them is that .sv file extension