Lint AOSP
Project description
lintaosp
Introduction
lintaosp is a lint worker of lintflow on AOSP written in Python.
Prerequisites
- Android lint >= 4.1.0
- gRPC >= 1.36.0
- Python >= 3.7.0
Run
- Local mode
git clone https://github.com/craftslab/lintaosp.git
cd lintaosp
pip install -Ur requirements.txt
python aosp.py --config-file="config.yml" --lint-project="project" --output-file="output.json"
- Service mode
git clone https://github.com/craftslab/lintaosp.git
cd lintaosp
pip install -Ur requirements.txt
python aosp.py --config-file="config.yml" --listen-url="127.0.0.1:9090"
Docker
- Local mode
git clone https://github.com/craftslab/lintaosp.git
cd lintaosp
docker build --no-cache -f Dockerfile -t craftslab/lintaosp:latest .
docker run -it -v /tmp:/tmp craftslab/lintaosp:latest ./lintaosp --config-file="config.yml" --lint-project="/tmp/project" --output-file="/tmp/output.json"
- Service mode
git clone https://github.com/craftslab/lintaosp.git
cd lintaosp
docker build --no-cache -f Dockerfile -t craftslab/lintaosp:latest .
docker run -it -p 9090:9090 craftslab/lintaosp:latest ./lintaosp --config-file="config.yml" --listen-url="127.0.0.1:9090"
Usage
usage: aosp.py [-h] --config-file CONFIG_FILE
[--lint-project LINT_PROJECT | --listen-url LISTEN_URL]
[--output-file OUTPUT_FILE] [-v]
Lint AOSP
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
lintaosp parameters can be set in the directory config.
An example of configuration in config.yml:
apiVersion: v1
kind: worker
metadata:
name: lintaosp
spec:
sdk:
- Correctness
- Correctness:Messages
- Security
- Compliance
- Performance
- Performance:Application Size
- Usability:Typography
- Usability:Icons
- Usability
- Productivity
- Accessibility
- Internationalization
- Internationalization:Bidirectional Text
Design
Errorformat
- Error type
E: Error
I: Information
W: Warning
- JSON format
{
"lintaosp": [
{
"file": "name",
"line": 1,
"type": "Error",
"details": "text"
}
]
}
- Text format
lintaosp:{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
lintaosp-1.2.4.tar.gz
(15.8 kB
view hashes)
Built Distribution
Close
Hashes for lintaosp-1.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1819f81192f029bdf6f0c97cab209907991c39b93a5ddd5d2875ed27ab5f6392 |
|
MD5 | 54d3402db38340f3d385d51300ecf487 |
|
BLAKE2b-256 | 0f3a13ec20a8790db663521aea028986ce4d74b2c915e6140157e500bcbe6ac5 |