Browse Source

Fix up erc json a little

newinvert
Marek Roszko 2 years ago
parent
commit
87d36dbfd8
  1. 2
      common/rc_item.cpp
  2. 2
      eeschema/erc_report.cpp
  3. 4
      include/rc_json_schema.h

2
common/rc_item.cpp

@ -162,7 +162,7 @@ void RC_ITEM::GetJsonViolation( RC_JSON::VIOLATION& aViolation, UNITS_PROVIDER*
wxString severity = getSeverityString( aSeverity );
aViolation.severity = severity;
aViolation.description = GetViolatingRuleDesc();
aViolation.description = GetErrorMessage();
aViolation.type = GetSettingsKey();
EDA_ITEM* mainItem = nullptr;

2
eeschema/erc_report.cpp

@ -129,7 +129,7 @@ bool ERC_REPORT::WriteJsonReport( const wxString& aFullFileName )
{
RC_JSON::ERC_SHEET jsonSheet;
jsonSheet.path = sheetList[i].PathHumanReadable();
jsonSheet.uuid = sheetList[i].Path().AsString();
jsonSheet.uuid_path = sheetList[i].Path().AsString();
for( SCH_ITEM* aItem : sheetList[i].LastScreen()->Items().OfType( SCH_MARKER_T ) )
{

4
include/rc_json_schema.h

@ -81,12 +81,12 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( DRC_REPORT, source, date, kicad_version, vio
struct ERC_SHEET
{
wxString uuid;
wxString uuid_path;
wxString path;
std::vector<VIOLATION> violations;
};
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( ERC_SHEET, uuid, path, violations )
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( ERC_SHEET, uuid_path, path, violations )
struct ERC_REPORT : REPORT_BASE
{

Loading…
Cancel
Save