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 -p 9090:9090 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:
- --check Correctness,Correctness:Messages,Security,Compliance,Performance,Performance:Application Size,Usability:Typography,Usability:Icons,Usability,Productivity,Accessibility,Internationalization,Internationalization:Bidirectional Text
- --disable LintError
- --nolines
- --quiet
checkstyle:
- -jar ~/opt/checkstyle/lib/checkstyle.jar
- -c=~/opt/checkstyle/etc/google_checks.xml
strings:
python:
flake8:
shell:
shellcheck:
- --format=gcc
Design
Errorformat
- Error type
E: Error
I: Information
W: Warning
- 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.15.tar.gz
(15.5 kB
view details)
Built Distribution
File details
Details for the file lintwork-1.2.15.tar.gz
.
File metadata
- Download URL: lintwork-1.2.15.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 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 | 97c1bd389248abf61bd3888e31071772de9e71564b45bc50b15a8d0171cc5494 |
|
MD5 | a49959715b322dc8917431c9f320e1c1 |
|
BLAKE2b-256 | 7e373294c4046f3e1b2b527a40638b202e2f76251dc798703d97b9049c05300e |
File details
Details for the file lintwork-1.2.15-py2.py3-none-any.whl
.
File metadata
- Download URL: lintwork-1.2.15-py2.py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 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 | 68a036973ef2f6d0a4a6ec40863cd4d17c3546b6ad1ffa250ecfc29b3eab7253 |
|
MD5 | d5443b3b7aaa92693f17263f77114b64 |
|
BLAKE2b-256 | fd6e4e07d7b707477b564abd008de385d06da4db9255d5aa2e21eb460966c174 |