Lint Work
Project description
lintwork
Introduction
lintwork is a lint worker of lintflow written in Python.
Prerequisites
- gRPC >= 1.36.0
- Python >= 3.7.0
Run
- Local mode
git clone https://github.com/craftslab/lintwork.git
cd lintwork
pip install -Ur requirements.txt
python work.py --config-file="config.yml" --lint-project="project" --output-file="output.json"
- Service mode
git clone https://github.com/craftslab/lintwork.git
cd lintwork
pip install -Ur requirements.txt
python work.py --config-file="config.yml" --listen-url="127.0.0.1:9090"
Docker
- Local mode
git clone https://github.com/craftslab/lintwork.git
cd lintwork
docker build --no-cache -f Dockerfile -t craftslab/lintwork:latest .
docker run -it -v /tmp:/tmp craftslab/lintwork:latest ./lintwork --config-file="config.yml" --lint-project="/tmp/project" --output-file="/tmp/output.json"
- Service mode
git clone https://github.com/craftslab/lintwork.git
cd lintwork
docker build --no-cache -f Dockerfile -t craftslab/lintwork:latest .
docker run -it --network=host craftslab/lintwork:latest ./lintwork --config-file="config.yml" --listen-url="127.0.0.1:9090"
Usage
usage: work.py [-h] --config-file CONFIG_FILE
[--lint-project LINT_PROJECT | --listen-url LISTEN_URL]
[--output-file OUTPUT_FILE] [-v]
Lint Work
optional arguments:
-h, --help show this help message and exit
--config-file CONFIG_FILE
config file (.yml)
--lint-project LINT_PROJECT
lint project (/path/to/project)
--listen-url LISTEN_URL
listen url (host:port)
--output-file OUTPUT_FILE
output file (.json|.txt|.xlsx)
-v, --version show program's version number and exit
Settings
lintwork parameters can be set in the directory config.
An example of configuration in config.yml:
apiVersion: v1
kind: worker
metadata:
name: lintwork
spec:
cpp:
checkpatch:
- --no-summary
- --no-tree
- --terse
cpplint:
java:
aosplint:
- --disable
- LintError
- --nolines
- --quiet
checkstyle:
- -jar
- /home/craftslab/opt/checkstyle/lib/checkstyle.jar
- -c=/home/craftslab/opt/checkstyle/etc/google_checks.xml
stringscheck:
python:
flake8:
shell:
shellcheck:
- --format=gcc
Design
Errorformat
- JSON format
{
"lintwork": [
{
"file": "name",
"line": 1,
"type": "Error",
"details": "text"
}
]
}
- Text format
lintwork:{file}:{line}:{type}:{details}
License
Project License can be found here.
Reference
Linter
- android-lint
- checkpatch
- checkstyle
- cpplint
- flake8
- golangci-lint
- groovylint
- rust-clippy
- shellcheck
- spotbugs
Misc
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
lintwork-1.3.1.tar.gz
(15.7 kB
view details)
Built Distribution
File details
Details for the file lintwork-1.3.1.tar.gz
.
File metadata
- Download URL: lintwork-1.3.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f8f69901f759f3d0768eaa2c739928470da74b3329fcc823b411ddd743ea6c |
|
MD5 | 6b95127e4ac0035cc029f2b961b5b0d9 |
|
BLAKE2b-256 | 45318f8caea9be18cc500049bbbf3f1c381eb18a696fc81a01053733b153377a |
File details
Details for the file lintwork-1.3.1-py2.py3-none-any.whl
.
File metadata
- Download URL: lintwork-1.3.1-py2.py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2b96bcf33a3678e900962d2d31defe94e7f5bb781751a2d563ac4da6c301709 |
|
MD5 | deed7d1185bada41bf0e77c0067b5cb8 |
|
BLAKE2b-256 | e92c7327efa6310fe6cb8072053b6d6c30a2ab5ef077161535c996a3f5463406 |