priv-kweihmann / oelint-adv

Advanced oelint
BSD 2-Clause "Simplified" License
55 stars 27 forks source link

Git Fetcher: usehead parameter implies nobranch parameter #621

Open pasweistorz opened 7 hours ago

pasweistorz commented 7 hours ago

Hi,

when using the Git fetcher module the usehead parameter implies the nobranch parameter. Thus, there should be no need to explicitly specify the nobranch parameter when using the usehead parameter. But if the branch parameter is missing, OELint wants the user to specify the nobranch parameter although the usehead is specified.

Thanks for investigating.

priv-kweihmann commented 2 hours ago

That sounds awfully complicated and requires a lot of knowledge about the internals of the ever-changing fetcher modules. The linter currently already suggests to add either branch or nobranch to the git fetcher, so I would back down to the position and say that this is beyond the scope of a generic linter.

I will keep the issue open if someone is interested in implementing that in a manageable and generic way, but likely I will not add a code myself for that.

pasweistorz commented 1 hour ago

Wouldn't it be enough to just add usehead to _required_unless_options['branch']?

priv-kweihmann commented 1 hour ago

will check on that