Skip to main content

Whitespace checking tool

Project description


PyPi Build Docs DependencyStatus CodeQuality Coverage License

WSCheck is a static analysis tool for whitespaces.


pip install wscheck


Check multiple files:

wscheck pineapple.xml kiwi.js

Exclude rules:

wscheck --exclude WSC002 --exclude WSC003

Get list of available rules:

wscheck --list-rules

For details about rules, see Rules

Write CheckStyle output too:

wscheck --checkstyle results.xml pineapple.xml


wscheck examples/
In examples/ line 2:
class LabelPrinter:
^-- WSC007: File begins with newline

In examples/ line 6:
                           ^-- WSC002: Tailing whitespace

In examples/ line 9:
   def __generate_pdf(self):
   ^-- WSC003: Indentation is not multiple of 2

In examples/ line 10:
        pdf_generator = _LabelPdfGenerator()
                                            ^-- WSC001: Bad line ending '\r\n'

In examples/ line 16:
--->--->os.makedirs(self.__cache_dir, exist_ok=True)
^-- WSC004: Indentation with non-space character

In examples/ line 22:
        return os.path.join(self.__cache_dir, pdf_name)
                                                       ^-- WSC006: Too many newline at end of file (+1)


Bugs or suggestions? Visit the issue tracker.


  • You can run a quick benchmark:

    tox -- tests/performance --quick-benchmark
  • You can run benchmarks and generate histogram for compare calls to each other:

    tox -- tests/performance --benchmark-histogram
  • You can run benchmarks and save results for later compare:

    tox -- tests/performance --benchmark-save=foo
  • You can run benchmarks and compare with the last saved result with fail treshold:

    tox -- tests/performance --benchmark-histogram --benchmark-compare --benchmark-compare-fail=mean:5% --benchmark-sort=name
  • You can run benchmarks and compare with the last saved result by groups:

    tox -- tests/performance --benchmark-histogram --benchmark-compare --benchmark-group-by=func
    tox -- tests/performance --benchmark-histogram --benchmark-compare --benchmark-group-by=name

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wscheck-1.3.2.tar.gz (25.1 kB view hashes)

Uploaded source

Built Distribution

wscheck-1.3.2-py3-none-any.whl (19.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page