Beispiel #1
0
def lint_about_urls(meta, lint_ctx):
    for field in ('about/home', 'about/dev_url', 'about/doc_url',
                  'about/license_url'):
        url = get_field(meta, field)
        if url:
            check_url(url)
    lint_ctx.info("About urls (if present) are valid")
Beispiel #2
0
def lint_about_urls(meta, lint_ctx):
    for field in ('about/home', 'about/dev_url', 'about/doc_url',
                  'about/license_url'):
        url = get_field(meta, field)
        if url:
            check_url(url)
    lint_ctx.info("About urls (if present) are valid")
Beispiel #3
0
def lint_summary(meta, lint_ctx):
    summary = get_field(meta, 'about/summary')

    if not summary:
        lint_ctx.warn("No summary supplied in about metadata.")

    if summary and len(summary) > 80:
        msg = "summary exceeds 80 characters"
        lint_ctx.warn(msg)
Beispiel #4
0
def lint_summary(meta, lint_ctx):
    summary = get_field(meta, 'about/summary')

    if not summary:
        lint_ctx.warn("No summary supplied in about metadata.")

    if summary and len(summary) > 80:
        msg = "summary exceeds 80 characters"
        lint_ctx.warn(msg)
Beispiel #5
0
def lint_name(meta, lint_ctx):
    name = get_field(meta, 'package/name')
    check_name(name)
    lint_ctx.info("Valid recipe name [%s]" % name)
Beispiel #6
0
def lint_version(meta, lint_ctx):
    version = get_field(meta, 'package/version')
    check_version(version)
    lint_ctx.info("Valid version number [%s]" % version)
Beispiel #7
0
def lint_build_number(meta, lint_ctx):
    build_number = get_field(meta, 'build/number', 0)
    check_build_number(build_number)
    lint_ctx.info("Valid build number [%s]" % build_number)
Beispiel #8
0
def lint_name(meta, lint_ctx):
    name = get_field(meta, 'package/name')
    check_name(name)
    lint_ctx.info("Valid recipe name [%s]" % name)
Beispiel #9
0
def lint_version(meta, lint_ctx):
    version = get_field(meta, 'package/version')
    check_version(version)
    lint_ctx.info("Valid version number [%s]" % version)
Beispiel #10
0
def lint_build_number(meta, lint_ctx):
    build_number = get_field(meta, 'build/number', 0)
    check_build_number(build_number)
    lint_ctx.info("Valid build number [%s]" % build_number)