Contributed rules

Traditional situation:
Up until Prolint release 73, Prolint supports two groups of rules: standard rules and custom rules. Standard rules are installed as part of the Prolint distribution. Custom rules don't come from the Prolint website; a custom rule is created by the Prolint user and never committed to the Prolint website and hence not available to other users.
When someone wants to share their custom rules, they have to be accepted by project admin (=Jurjen) and then wait until the next Prolint release.

New: Contributed rules
In addition to standard rules and custom rules, a new layer "contrib rules" was added. Everyone can contribute their rules to the website and everyone can decide to download any number of contributed rules. Contributed rules are not installed as part of Prolint distribution, unless a contributed rule is "upgraded" to a standard rule.
This is more attractive for people who have custom rules to share, because these rules do not have to wait for acceptance and are published immediately. It is also attractive to Prolint users to be able to choose from a public collection of custom rules, and it is attractive for myself because I won't have the burden to accept/review/reject rules.

Subversion:
In te subversion repository for prolint, a path "/trunk/contribs/rules" is added and user "guest" is authorized to read/write in this path. The password for "guest" is no secret: "OEHive", so anyone can commit their rules to this path. The guest user is not authorized to commit anything outside the "/trunk/contribs/rules" path.

When you commit something in the "/trunk/contribs/rules" as "guest" user, please please please write your real name in the subversion commit note.

Example: suppose you have a rule named "acme.p" that you want to contribute, your own name is "Willy E. Coyote" and you have a subversion command-line client installed on your pc. The full command to upload your acme.p rule would be:


svn import c:\p4gl\tools\prolint\contribs\rules\acme.p svn://oehive.org/prolint/trunk/contribs/rules/acme.p --username guest --password OEHive -m "Dont walk through a painted image of a cave. Rule contributed by Willy E. Coyote"

Personally I hardly ever use the subversion command-line, but prefer the TortoiseSVN program that nicely integrates with Windows Explorer. You can download the command-line tools or TortoiseSVN from http://subversion.tigris.org

Definitions:
Properties for normal rules are defined in a texfile named "rules.d" but that is simply not practical for contributed rules, because it would mean that users would have to download a new rule and also merge a new line into their existing textfile. We have a better solution. The sourcefile of a contributed rule contains its own properties as a structured comment in the sourcefile. Please have a look at existing contributed rules to see working examples. One warning: only the first comment in the sourcefile is parsed.

Help:
Someone who contributes a rule should also add a help page, which is a child-page of http://www.oehive.org/prolint/rules
That help page should describe the purpose of the rule and should also identify the rule as a contributed rule that can be downladed from the subversion contribs path.
In addition, the help page should be attached to the "contributed rules" keyword, so all contributed rules can be easily listed.
Here is a mini-manual how to write a help-page: http://www.oehive.org/node/1227

Shop for rules:
Visitors will be able to discover contributed rules in several ways:

Search order:
Prolint will search rule definitions in the following order:
1. prolint/contribs/rules
2. extend and override the results from (1) by prolint/rules
3. extend and override the results from (2) by prolint/custom/rules

Execution order:
Prolint will search rule code in the following order:
1. prolint/custom/rules
2. when not found, search the rule in turbolint
3. when not found, search the rule in prolint/rules
4. when not found, search the rule in prolint/contribs/rules