Adding package suppressions in Checkstyle and Spotbugs

I was recently trying to add a package level suppression in both checkstyle / spotbugs and found it to be having weird syntax.

For checkstyle,

First add a module in your checkstyle configuration file

<module name="SuppressionFilter">
    <property name="file" value="./suppressions.xml"/>

And then in the suppressions.xml , specify the package as follows:

<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
        "-//Puppy Crawl//DTD Suppressions 1.1//EN"

    <suppress files="[\\/]com[\\/]domain[\\/]package" checks="."/>

For, Spotbugs, you specify the package level suppression in the exclude file as follows

        <Package name="~com\.domain\.package.*"/>