Skip to content

Commit 7d294cb

Browse files
authored
Merge pull request #59 from chame1eon/feature/github-actions
added a github action for linting checks
2 parents 8a4a63f + 6644550 commit 7d294cb

File tree

4 files changed

+45
-3
lines changed

4 files changed

+45
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: deploy
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
lint:
8+
runs-on: ['ubuntu-22.04']
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.7.16'
17+
- run: npm install
18+
- run: touch jnitrace/build/__init__.py
19+
- uses: pypa/gh-action-pypi-publish@release/v1
20+
with:
21+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: lint-check
2+
on: ['push']
3+
jobs:
4+
lint:
5+
runs-on: ['ubuntu-22.04']
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/setup-node@v3
9+
with:
10+
node-version: 16
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.7.16'
14+
- run: pip install -r requirements.txt
15+
- run: pip install .
16+
- run: npm install
17+
- run: touch jnitrace/build/__init__.py
18+
- run: pylint jnitrace/jnitrace.py
19+
- run: npm run lint

jnitrace/jnitrace.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
from colorama import Fore, Style, init
1818

19+
# pylint: disable=C0209
20+
1921
__version__ = require("jnitrace")[0].version
2022

2123
init()
@@ -230,11 +232,11 @@ def _print_args(self, method, args, java_params, data):
230232
else:
231233
padding = 4
232234
arg_offset = 0
233-
for i, _ in enumerate(java_params):
235+
for i, java_param in enumerate(java_params):
234236
arg = args[i + len(jni_args) - arg_offset]
235237
self._print_arg_sub_data(
236238
arg["value"],
237-
arg_type=java_params[i],
239+
arg_type=java_param,
238240
opt=arg.get("metadata"),
239241
padding=padding
240242
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jnitrace",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"description": "A tool for tracing use of the JNI in Android apps",
55
"private": true,
66
"main": "jnitrace/src/main.js",

0 commit comments

Comments
 (0)