Open SSE4 opened 4 years ago
Probably this is something to do using a linter, together with other checks that are currently implemented in the hooks. Probably it is the easiest way and it should cover 100% of the scenarios, other approaches with regex/find always have exceptions.
Not sure if this should be enough with a file in conans/pylint_plugin.py
or there would be some specific errors here and we will need to maintain another file in this repo
btw, I totally support using regex/find strategies while we add the linter to the pipeline (this is something I've already talked with @uilianries in some PRs here but we couldn't find time to do it) 😓
@jgsogo do you have an example of how we can implement such a check with conans/pylint_plugin.py
?
will we need to maintain black/white list of functions in Conan codebase?
will we need to somehow mark API functions in Conan codebase?
can we just assume regular functions are public API, but something with one or two underscores is private?
Maybe we need a plain pylint_plugin
adding only the objects and methods we allow in ConanCenter and run pylint in a Python environment without Conan installed
is it somehow possible more or less generic checks for undocumented APIs in recipes? we had some issues with it previously, e.g.: https://github.com/conan-io/conan-center-index/pull/1293#discussion_r408189278 https://github.com/conan-io/conan-center-index/pull/1284 maybe we can avoid such kind of issues possible methods:
conans.client.build
might be black-listed)suggestions are welcomed
/cc @uilianries @jgsogo