How to use the colin.core.checks.fmf_check.FMFAbstractCheck function in colin

To help you get started, we’ve selected a few colin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github user-cont / colin / colin / checks / labels.py View on Github external
name = "release_label"


class SummaryLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "summary_label"


class UrlLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "url_label"


class RunOrUsageLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "run_or_usage_label"


class VcsRefLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "vcs-ref_label"


class VcsTypeLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "vcs-type_label"


class VcsUrlLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "vcs-url_label"


class VendorLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
    name = "vendor_label"


class VersionLabelCheck(FMFAbstractCheck, LabelAbstractCheck):
github user-cont / colin / colin / checks / dynamic.py View on Github external
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see .
#

from colin.core.checks.cmd import CmdAbstractCheck
from colin.core.checks.fmf_check import FMFAbstractCheck


class ShellRunableCheck(FMFAbstractCheck, CmdAbstractCheck):
    name = "shell_runnable"
github user-cont / colin / colin / core / checks / fmf_check.py View on Github external
def __init__(self):
        """
        wraps parameters to COLIN __init__ method format
        """
        if not self.metadata:
            self.metadata = receive_fmf_metadata(name=self.name, path=self.fmf_metadata_path)
        master_class = super(FMFAbstractCheck, self)
        kwargs = {}
        try:
            # this is not available in python2, but second function is deprecated
            args_names = [argument for argument in
                          inspect.signature(master_class.__init__).parameters]
        except NameError:
            args_names = inspect.getargspec(master_class.__init__).args
        for arg in args_names:
            # copy all arguments from metadata.data to class __init__  kwargs
            try:
                kwargs[arg] = self.metadata.data[arg]
            except KeyError:
                pass
        try:
            master_class.__init__(**kwargs)
        except TypeError as error: