Skip to end of metadata
Go to start of metadata

General guidelines

New rule implementations in existing plugins

  • Start from an existing RSpec (Rule Specification) that lists your language of interest in the "Targeted languages" field. 
    • If the RSpec you're interested in doesn't target the language where you want to implement it, raise the question on the Community Forums .
    • If no RSpec exists for the rule you want to implement, raise the question on the Community Forums .
  • Put your rule implementation class in the [language]-checks (e.g. java-checks, javascript-checks, &etc.) module, in the checks sub-package
  • The naming convention for implementation classes is [A-Z][A-Za-z] (Yes, put "Check" in the name too.) The class name should be descriptive and not reflect the rule key. E.G., not
  • A good way to get started on a rule implementation is to look at the implementations of rules that do similar things.
  • During development there's no need to load the plugin in a server to test your implementation, use the rule's unit test for that.
  • For a complete implementation, make sure all of the following are done:
    • create HTML description file
    • write * with annotations specifying
      • title
      • SQALE
      • tags
      • any parameters
    • write test class
    • register the rule in
    • add the rule to the profile used for the integration test in profile.xml
    • run the integration test and add any new issues to the set of expected issues 
      • [ detail needed ]


  • No labels