aboutsummaryrefslogtreecommitdiff
path: root/batchtools/rsTester/src/test/resources/ruleSets/headingGuidelines-caps.js
blob: f6c1cb6585c64d8a345a76e4fbdbcf3d286a4cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
exports.name = "Headings are capitalized";

exports.description = "Check to see if all headings use leading capital letters.";

exports.rule = function() {
  var badHeadings =
    fiveui.query(':header').filter(
      function(idx) {
        var ch = $(this).text()[0];
        if (ch) {
          return (ch == ch.toLowerCase() );
        } else {
          return false;
        }
      });
  $(badHeadings).map(function(idx, elt){
                       report('Heading does not start with a capitol letter.', elt);
                     });
};