Whitespace checking tool
Project description
WSCheck
WSCheck is a static analysis tool for whitespaces.
Installation
pip install wscheck
Usage
Check multiple files:
wscheck orange.sh pineapple.xml kiwi.js
Exclude rules:
wscheck --exclude WSC002 --exclude WSC003 orange.sh
Get list of available rules:
wscheck --list-rules
For details about rules, see Rules
Write CheckStyle output too:
wscheck --checkstyle results.xml pineapple.xml
Example
wscheck examples/multiple_problems.py
In examples/multiple_problems.py line 2:
class LabelPrinter:
^-- WSC007: File begins with newline
In examples/multiple_problems.py line 6:
self.print_to_pdf()
^-- WSC002: Tailing whitespace
In examples/multiple_problems.py line 9:
def __generate_pdf(self):
^-- WSC003: Indentation is not multiple of 2
In examples/multiple_problems.py line 10:
pdf_generator = _LabelPdfGenerator()
^-- WSC001: Bad line ending '\r\n'
In examples/multiple_problems.py line 16:
--->--->os.makedirs(self.__cache_dir, exist_ok=True)
^-- WSC004: Indentation with non-space character
In examples/multiple_problems.py line 22:
return os.path.join(self.__cache_dir, pdf_name)
^-- WSC006: Too many newline at end of file (+1)
Bugs
Bugs or suggestions? Visit the issue tracker.
Benchmark
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wscheck-1.3.2.tar.gz
.
File metadata
- Download URL: wscheck-1.3.2.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a0bac6ed9826c84b025ac91ee415f1bafb5b2f71afbffba7fcb8b3209a05c3d2
|
|
MD5 |
85ef771b1d604cc97741b8e9fbb6c5a4
|
|
BLAKE2b-256 |
ee739f8a60e80eee70ff8e37bde6fcc93398da0fc84a6c4125b33a45ffa3edc3
|
File details
Details for the file wscheck-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: wscheck-1.3.2-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2950912697f1d2a04712dde583c4ba1090beaa9b9e3471fb4a904f817581efe6
|
|
MD5 |
473b5b59a2073ffff1a6c3e599446216
|
|
BLAKE2b-256 |
c4c4250b91250de22375304a76e5a09ae6a3e0c7232f3627a7b357c0dfb522e6
|