Open cguldner opened 4 years ago
Hi @cguldner ! Could please add a log with that error?
@uilianries I'm not sure it will tell you much, but here:
[HOOK - recipe_linter.py] pre_export(): Lint recipe '/path/conanfile.py'
[HOOK - recipe_linter.py] pre_export(): recipes/conanfile.py:36:4: C0116: Missing function or method docstring (missing-function-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/conanfile.py:46:4: C0116: Missing function or method docstring (missing-function-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/conanfile.py:75:4: C0116: Missing function or method docstring (missing-function-docstring)
The functions on those lines are init
, imports
, and deploy
@cguldner Thanks! Yes, it helps, now it's clear.
@cguldner Could you please share your conanfile.py for reproducibility ?
@uilianries Here's a simplified version
import os
from conans import ConanFile
class Conan(ConanFile):
name = "conan"
version = "1.0"
python_requires = "base/1.0@user/channel"
python_requires_extend = "base.BaseConan"
def _base_conan(self):
return self.python_requires["base"].module.BaseConan
def init(self):
base = self._base_conan()
self.settings = set(base.settings + self.settings)
self.generators = set(base.generators + self.generators)
self.options = dict(base.options, **self.options)
self.license = base.license
def imports(self):
self.copy("*", dst=os.environ.get("INSTALL_PREFIX"))
def deploy(self):
self.copy("*", dst=os.environ.get("INSTALL_PREFIX"))
And the corresponding log
[HOOK - recipe_linter.py] pre_export(): Lint recipe '/accts/cguldner/spoc/oms_devkit/recipes/oms_subsystem_api.py'
[HOOK - recipe_linter.py] pre_export(): recipes/oms_subsystem_api.py:1:0: C0114: Missing module docstring (missing-module-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/oms_subsystem_api.py:10:0: C0115: Missing class docstring (missing-class-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/oms_subsystem_api.py:19:4: C0116: Missing function or method docstring (missing-function-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/oms_subsystem_api.py:26:4: C0116: Missing function or method docstring (missing-function-docstring)
[HOOK - recipe_linter.py] pre_export(): recipes/oms_subsystem_api.py:29:4: C0116: Missing function or method docstring (missing-function-docstring)
[HOOK - recipe_linter.py] pre_export(): Linter detected '0' errors
@cguldner Thanks a lot
When running the recipe_linter.py checker, it seems to not report the missing-function-docstring for most of the builtin Conan functions. But with Conan 1.24,
init
was added as a function, and that should probably be added to the listAlso,
imports
anddeploy
are reporting this as well.