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:
aosp:
sdk:
- Correctness
- Correctness:Messages
- Security
- Compliance
- Performance
- Performance:Application Size
- Usability:Typography
- Usability:Icons
- Usability
- Productivity
- Accessibility
- Internationalization
- Internationalization:Bidirectional Text
strings:
cpp:
cpplint:
- --linelength=120
golang:
golangci-lint:
- --config ~/opt/golangci-lint/config.yml
groovy:
groovylint:
- --codenarc-version 1.2.1
- --gmetrics-version 1.0
- --slf4j-version 1.7.25
- -includes="./Jenkinsfile,**/*.groovy,**/*.gradle"
java:
checkstyle:
- -c=~/opt/checkstyle/config.xml
spotbugs:
- -effort:default
linux:
checkpatch:
- --ignore MSLEEP
python:
flake8:
- --ignore=E501,F841,W503,W605
- --max-line-length=88
rust:
clippy:
- -D clippy::assign_ops
shell:
shellcheck:
- disable=SC2086
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
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.11.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for lintwork-1.2.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea89ed33e5ac0d8583e820b78701d15a0297a8089339c803529704b659cf5144 |
|
MD5 | 4a7fa43d0f68104cf723749a32305043 |
|
BLAKE2b-256 | f583aba8d3e42bf1d93a2a61f8cf7851ca482beeba0b54eb5352ed28bee114cd |