From d890e6dcb8faa96fd6cd0902e5894dcb9e0ec7c9 Mon Sep 17 00:00:00 2001 From: wingdeans <66850754+wingdeans@users.noreply.github.com> Date: Sat, 23 Jul 2022 20:58:55 +0000 Subject: [PATCH] Add pylint to CI --- .github/workflows/lint.yml | 4 ++++ pylintrc | 10 ++++++++++ src/main.py | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pylintrc diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 849433c..8d3b5a8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,6 +25,10 @@ jobs: run: | pyflakes src/*.py if: ${{ always() }} + - name: Run pylint + run: | + pylint src/*.py + if: ${{ always() }} - name: Run black run: | black --check --diff src/*.py diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..50bc451 --- /dev/null +++ b/pylintrc @@ -0,0 +1,10 @@ +[MESSAGES CONTROL] + +disable=missing-class-docstring, + missing-function-docstring, + consider-using-in, + too-many-locals, + too-many-branches, + too-many-statements, + too-many-instance-attributes, + too-few-public-methods diff --git a/src/main.py b/src/main.py index dfe4f4d..33b2c5e 100644 --- a/src/main.py +++ b/src/main.py @@ -232,5 +232,5 @@ rz_main.add_prefixed_methods(main_h, "rz_main_") rz_main.add_prefixed_funcs(main_h, "rz_main_") -with open(cast(str, args.output), "w") as output: +with open(cast(str, args.output), "w", encoding="utf-8") as output: rizin.write(output)