xbmc / addon-check

Automatic checks for new repository submissions
GNU General Public License v3.0
52 stars 42 forks source link

add argument --allow-folder-id-mismatch to report addon_xml_matches_folder as INFO #157

Closed anxdpanic closed 5 years ago

anxdpanic commented 5 years ago

w/ arg: INFO: Addon id and folder name does not match. Ensure folder name is <addon_id> when submitting a PR to Kodi's official repository.

w/o arg: ERROR: Addon id and folder name does not match.

razzeee commented 5 years ago

Should be fine for the kodi repo usecases, but probably won't work for the ci of single repos.

Rechi commented 5 years ago

I don't like this autodetection mode. Actually --PR argument should be renamed to --higher-version-required or something like that. If the folder id check should be ignored, it needs it's own command line argument. ~But as this is only reported as warning, I don't see the actual need. This warning (alone) will never result in a non zero exit code.~ (Edit only looked at he new code)

anxdpanic commented 5 years ago

Should I change this to have it's own argument --skip-folder-matches-id and change the warning to info?

Rechi commented 5 years ago

Yes it should be changed to have it's own argument. The name --skip-folder-matches-id would make me think that actually executing the addon_xml_matches_folder function is completely skipped, not that reports a warning or info instead of an error. But that's nothing I care much about.

anxdpanic commented 5 years ago

Any feelings on warning vs info? I went with warning here since it's a must when submitting.

anxdpanic commented 5 years ago

Updated to use --allow-folder-id-mismatch, also changed reporting to INFO since it requires the argument to override now

Rechi commented 5 years ago

The following line needs an update too. https://github.com/xbmc/addon-check/blob/ad8aa4960a0fefdb2f4661ff9fd7f2e90427e445/tests/test_check_addon.py#L26

anxdpanic commented 5 years ago

Updated test_check_addon, required adding an Args class as well

razzeee commented 5 years ago

The new argument needs to be documented in the readme

anxdpanic commented 5 years ago

Added to the readme and shifted the description alignment accordingly

razzeee commented 5 years ago

thank you!