barvhaim / map-my-shifter

Mapping generator for STIX Shifter
Apache License 2.0
0 stars 0 forks source link

Coverage statistics for "From STIX" #13

Closed barvhaim closed 3 years ago

barvhaim commented 3 years ago

@idohersko Functionality is incorrect, see issue #13 screenshot (1 of 20 = 5%), it is showing (1 of 16 = 100%) image

barvhaim commented 3 years ago

@idohersko Functionality is incorrect, see issue #13 screenshot (1 of 20 = 5%), it is showing (1 of 16 = 100%) image

The percentage is currently showing the number of official object over the total number of objects added (custom and not custom), because if i have for example, 30 custom objects and 15 out of 16 official objects, As i understood, the percentage is not suppose to be (15/16*100 = 93.75), instead, it is suppose to take into account the 30 custom objects and therefor to be much less, Am i missing something ?

Official STIX objects percentage = Number of unique official objects in mapping out of number of total unique official objects in current selected STIX version

Custom STIX percentage = Number of unique custom STIX object / (Number of unique custom STIX objects + Number of unique official STIX objects)

barvhaim commented 3 years ago

Off-topic comment - @idohersko I recommend this book, it can improving coding style to be more readable - https://www.bookdepository.com/Clean-Code-Robert-Martin/9780132350884?redirected=true&utm_medium=Google&utm_campaign=Base1&utm_source=IL&utm_content=Clean-Code&selectCurrency=ILS&w=AFF9AU99Z98D6CA8VRYN&gclid=CjwKCAjwo4mIBhBsEiwAKgzXOLEvPUMeoS7k8vKa9M7tQqJEERnbp5WADqFD7SKQH_EW4DQXVeJmDxoCB_IQAvD_BwE