ERC: recognize undefined netclasses
Description
With Kicad v7 (current nightly) it's possible to assign netclasses visually:
- with netclass-directive
- with additional netclass-field attached to a standard label
It's possible to write undefined netclass-strings into these netclass-directive / netclass-field. In this case the netclass of the wire resolves to the standard "default"-class, although it looks like a custom netclass is applied.
The ERC should catch these situation - normally it's either a mistake in writing or a forgotten netclass-definition.
Steps to reproduce
- open attached project, open schematic: ERC_netclass.zip
- look into Schematic Setup-->Project-->netclasses: there are 4 netclasses defined:
- Default
- netclass_A
- netclass_B
- netclass_C
- close schematic-setup
- look at the wire at R102: labeled "locallabel01", netclass-directive assigned with "netclass_01" --> this netclass is not defined! Select wire and look at statusbar --> netclass resolves to "Default"
- look at the wire at R108: labeled "locallabel02", additional netclassfield attached with "useless_netclass" --> this netclass is not defined! Select wire and look at statusbar --> netclass also resolves to "Default"
- run ERC - no complain regarding the netclasses
KiCad Version
Application: KiCad Schematic Editor (64-bit)
Version: (6.99.0-3433-g545212eb13), release build
Libraries:
wxWidgets 3.1.7
FreeType 2.11.1
HarfBuzz 4.2.0
FontConfig 2.14.0
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
wxWidgets: 3.1.7 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.83.1-DEV
ngspice: 37
Compiler: Visual C++ 1929 without C++ ABI
Build settings:
KICAD_SPICE=ON