Headline

abstract module to apply rules to files

Description

Apply the rules gathered by Module:rules101meta to specified files. This module is abstract and it can not be called directly but is rather used a library for other modules to apply rules to the file system. It could also be used by non-modules as it is independent from the path it is called from. It implements the whole new api, including fpredicates. It can be called in append or overwrite/create mode.

Output

One file per input ".metadata.json"

Usage

The most important function of this module is:

def apply_rules(files, rules, filter_function, append):
    # code omitted
    pass

The application works like this:

apply_rules(['/tmp/antlrParser/contributions/antlrParser/src/file.java'], rules, lambda rule: not any(filter(lambda key: key in ('predicate', 'fpredicate', 'content', 'locator'), rule['rule'].keys())), append=False)

The third predicate is a filter function to filter out rules, it is advised to use this parameter instead doing this by hand.


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.