Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ValidateDataStructure error reporting #2366

Merged
merged 8 commits into from
Mar 13, 2019
Merged

Conversation

Cgettys
Copy link
Contributor

@Cgettys Cgettys commented Mar 10, 2019

I was debugging some code and noticed that the ValidationDSProcess code could give me more info than it was with a few minor tweaks (e.g. telling me what the name of the aiNode missing a parent is, etc). I thought these improvements might be handy to others.

I did notice that there doesn't appear to be a unit test for the validation code and was considering starting one. I was wondering if that'd be useful. I'm thinking something along the lines of constructing objects with exactly 1 check that should fail, and then running those objects through the validator to make sure they do. It'd be a fair bit of work, and I'm not sure I'd do all of it at once, but given that it looks like to me that basically every unit test depends on that file to make sure there are no errors, it might be effort well spent. I'm happy to start one that at a minimum covers the cases I modified if that'd be helpful.

@Cgettys
Copy link
Contributor Author

Cgettys commented Mar 10, 2019

@kimkulling could I get some feedback on this, especially with regards to whether there should be a unit test for the validator? Thanks for all the effort you guys have put into the library, it's fantastic.

@kimkulling
Copy link
Member

This pull request introduces 6 alerts when merging 80dffb6 into 5c900d6 - view on LGTM.com

new alerts:

  • 6 for Wrong type of arguments to formatting function

Comment posted by LGTM.com

* Fixed warnings introduced by last commit (hopefully)
* Fixed case fallthrough (due to exception flow, it didn't make a practical difference, but hopefully will remove a warning)
* Minor formatting consistency improvements
@kimkulling
Copy link
Member

This pull request introduces 2 alerts when merging 7bb1303 into 5c900d6 - view on LGTM.com

new alerts:

  • 2 for Wrong type of arguments to formatting function

Comment posted by LGTM.com

@kimkulling
Copy link
Member

This pull request introduces 2 alerts and fixes 1 when merging 27dc922 into 5c900d6 - view on LGTM.com

new alerts:

  • 2 for Wrong type of arguments to formatting function

fixed alerts:

  • 1 for Wrong type of arguments to formatting function

Comment posted by LGTM.com

@kimkulling
Copy link
Member

This pull request fixes 1 alert when merging 5fd9789 into 5c900d6 - view on LGTM.com

fixed alerts:

  • 1 for Wrong type of arguments to formatting function

Comment posted by LGTM.com

@Cgettys
Copy link
Contributor Author

Cgettys commented Mar 12, 2019

Again, I'm happy to start adding unit tests for ValidateDSProcess, as mentioned in the original PR above, but given that I haven't gotten a response and it has no warnings, I'm marking this ready for review.

@Cgettys Cgettys marked this pull request as ready for review March 12, 2019 19:28
@Cgettys Cgettys changed the title [WIP] Improve ValidateDataStructure error reporting Improve ValidateDataStructure error reporting Mar 12, 2019
@kkulling
Copy link
Contributor

Hi,

sorry for my late response. I was busy in my daytime-job. I already start to do a review, but I haven't finished this until now.

Thanks a lot for your help!

Kim

@kimkulling
Copy link
Member

This pull request fixes 1 alert when merging 90dbd8f into 152cdde - view on LGTM.com

fixed alerts:

  • 1 for Wrong type of arguments to formatting function

Comment posted by LGTM.com

@kimkulling kimkulling merged commit 27f3b35 into assimp:master Mar 13, 2019
@kimkulling
Copy link
Member

Merged, thanks a lot for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants