AC-FuSa-Tools / nav

navigate kernel database
GNU General Public License v2.0
3 stars 4 forks source link

Wave of fixes #12

Closed Darth-Mera closed 1 year ago

Darth-Mera commented 1 year ago

Removes redundant types, simplifies (*conf).XYZ to conf.XYZ, fixes struct fields order for more effective memory consumption, replaces deprecated io/ioutils package with io, adds Close() error handling, etc.

There are still issues being reported by static analysis, this is just one wave of fixes.

Signed-off-by: Veronika Fuxova vfuxova@redhat.com

Darth-Mera commented 1 year ago

Note: Test check is failing here because I've fixed the TestConfig function name - in one of the previous commits (https://github.com/alessandrocarminati/nav/commit/21b3e582ea7c8bdfe34fd79e3b66dde6f3fad4e3#diff-79ce3229c13921b79b1175dcb211336aaf84dfd8edcf19c07698934d4fe70e5eL62) the name was changed to testConfig, causing this function to not being run as test for some time. Consequentially, a bug was introduced somewhere along the way that failed to be detected by the test, since it wasn't run, and I have yet to identify what exactly is the problem.

alessandrocarminati commented 1 year ago

t_files/test1.json, the test file for the configuration, was impacted by the fact that the constants changed their case. In addition to this, when the "Excluded" field separated in "ExcludedBefore" and "ExcludedAfter" the test didn't follow. 1e324b8ed3eacc9f7d8c9e0059f79acc7681da0a should fix the test failure.

alessandrocarminati commented 1 year ago

looks good. Thank you!