A demo for adding external rules in sonarwhal
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests/validate-footer
.editorconfig
.eslintrc.json
.gitattributes
.gitignore
.markdownlintrc
.sonarwhalrc
README.md
package-lock.json
package.json
tsconfig.json

README.md

validate-footer (validate-footer)

A new rule to validate footer

Why is this important?

To make sure that the correct copyright text is used at the footer of the pages.

What does the rule check?

  • A footer should be present in the website.
  • The footer should contain my copyright text (c) sonarwhal.

Examples that trigger the rule

<footer>
    <div>
        Whatever
    </div>
</footer>

Examples that pass the rule

<footer>
    <div>
        (c) sonarwhal
    </div>
</footer>

Can the rule be configured?

Yes. The target string to be checked can be configured using stringToBeIncluded property.