From d854de9d681267c1f0211fd75a29bbb4bf74d74d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 20 Jan 2024 17:22:09 +0000 Subject: [PATCH] Add missing DRC checks for footprint attributes. Requires string change, but it's a bug, and worse, a DRC bug. I did minimize the changes by using a single error message string that then has the various settings (which are already translated) put into it. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16671 --- .../drc/drc_test_provider_library_parity.cpp | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index e04cced954..9972ab5194 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -548,10 +548,31 @@ bool FOOTPRINT::FootprintNeedsUpdate( const FOOTPRINT* aLibFP, REPORTER* aReport TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), (FP_THROUGH_HOLE | FP_SMD), _( "Footprint types differ." ) ); + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_ALLOW_SOLDERMASK_BRIDGES, - _( "Allow bridged solder mask apertures between pads settings differ." ) ); + wxString::Format( _( "'%s' settings differ." ), + _( "Allow bridged solder mask apertures between pads" ) ) ); + + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_BOARD_ONLY, + wxString::Format( _( "'%s' settings differ." ), + _( "Not in schematic" ) ) ); + + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_EXCLUDE_FROM_POS_FILES, + wxString::Format( _( "'%s' settings differ." ), + _( "Exclude from position files" ) ) ); + + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_EXCLUDE_FROM_BOM, + wxString::Format( _( "'%s' settings differ." ), + _( "Exclude from bill of materials" ) ) ); + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_ALLOW_MISSING_COURTYARD, - _( "Exempt from courtyard requirement settings differ." ) ); + wxString::Format( _( "'%s' settings differ." ), + _( "Exempt From Courtyard Requirement" ) ) ); + + TEST_ATTR( GetAttributes(), aLibFP->GetAttributes(), FP_DNP, + wxString::Format( _( "'%s' settings differ." ), + _( "Do not populate" ) ) ); + // Clearance and zone connection overrides are as likely to be set at the board level as in // the library.