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:
aosp:
- --disable
- LintError
- --nolines
- --quiet
checkstyle:
- -jar
- /home/craftslab/opt/checkstyle/lib/checkstyle.jar
- -c=/home/craftslab/opt/checkstyle/etc/google_checks.xml
strings:
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.2.19.tar.gz
(15.6 kB
view details)
Built Distribution
File details
Details for the file lintwork-1.2.19.tar.gz
.
File metadata
- Download URL: lintwork-1.2.19.tar.gz
- Upload date:
- Size: 15.6 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 | 5cc914fce725f8286da238769540741b22bc33451e4fe7d5ecb3d4aa6145e8e4 |
|
MD5 | 7069ee4360e10bafe7178e4ff50b73dc |
|
BLAKE2b-256 | 56fb827caf7fb4b8f43623f538d4fee355aab51ea761bc66e432a4fdbcae7126 |
File details
Details for the file lintwork-1.2.19-py2.py3-none-any.whl
.
File metadata
- Download URL: lintwork-1.2.19-py2.py3-none-any.whl
- Upload date:
- Size: 26.5 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 | 7c4f2825c9ecb523e76d5725658e487837a73f342580e5c725e14f13f1a52979 |
|
MD5 | 29974c420f379a9ec924f37b6e4fb17b |
|
BLAKE2b-256 | d31e08be8ca5fd67eab86a66490d84ef896eee2df5e9f199817785fa4f1495f9 |