xbmc/addon-check

Don't process hidden folders

Opened this issue · 12 comments

We should ignore hidden folders, everything starting with . like .git

See this log for some false alarms https://travis-ci.org/trakt/script.trakt/jobs/440324400

It seems to me that there is already something that does it.

if addon_folder[0] != '.':

When do you want to skip hidden folders ?

the log you see above is not using the check_repo function as it's not being run on a repo. I think it uses the other way to be run, which is via the check_addon module https://github.com/xbmc/addon-check/blob/master/kodi_addon_checker/__main__.py#L47

I just realized, that we only want this on a single addon run. If we're running for a repo, it should still report hidden folders, as those should not be included.

Okay fine I had trouble reading the logfile.

Edit: you’re right since addon.xml is present at the root of
https://github.com/trakt/script.trakt

https://github.com/xbmc/addon-check/blob/master/kodi_addon_checker/handle_files.py#L33-L44

@Razzee so just a new conditional in this for loop and then appropriate tests right ?

I noticed that os.walk also returns its argument as the first element. Is it okay for the whole addon to be a hidden directory ? If so I should skip the condition on the first iteration. And if not, an error should be thrown; otherwise file_index will remain empty.

It's not okay for an addon to be in a hidden dir.

The method you pointed out seems to be the right spot for this change. I don't think you need to throw any error, just ignore the folder.

If it’s not okay, better test for it and add an entry to the report right ?

Ok I’ll PR something on Monday.

Oh I’m sorry @mzfr I didn’t see your pr

Is this issue open?? @razzeee

It's not solved, but I think it might not be needed anymore

Thanks :)