Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pylint checks #98

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add pylint checks #98

wants to merge 5 commits into from

Conversation

mzfr
Copy link
Contributor

@mzfr mzfr commented Jun 29, 2018

With this we will be able check our addons with pylint.
The output will look like:

File name Line no Message
kodi.py 24 Imports from package xbmc are not grouped
url_dispatcher.py 99 Line too long (165/120)

Currently all the checks are enabled on line 17 in .pylintrc but we can then disable the ones we don't want.


json_data = json.loads(out.getvalue())
for issue in json_data:
table_format.append([short_path(issue['path']), issue['line'], issue['message']])

This comment was marked as spam.

table_format.append([short_path(issue['path']), issue['line'], issue['message']])

table = AsciiTable(table_format).table
report.add(Record(WARNING, table))

This comment was marked as spam.

This comment was marked as spam.

@@ -42,6 +43,10 @@ def start(addon_path, branch_name, all_repo_addons, pr, config=None):

check_dependencies.check_addon_dependencies(addon_report, repo_addons, parsed_xml, branch_name)

pylint_checks.analyze(addon_report, addon_path)

check_dependencies.check_addon_dependencies(addon_report, repo_addons, parsed_xml)

This comment was marked as spam.

requirements.txt Outdated
@@ -1,3 +1,5 @@
pillow
requests
radon
pylint

This comment was marked as spam.

def analyze(report: Report, filename: str):
table_format = [["Line no", "Message", "message-id"]]

ARGS = ["-r", "n", "--score=yes", "--lint-all=y", "--rcfile=.pylintrc"]

This comment was marked as spam.

persistent=yes

# Specify a configuration file.
rcfile=/home/mzfr/dev/Addon-check/Misc/Demo/

This comment was marked as spam.

mzfr added 5 commits May 13, 2023 10:42
Removed all C type error code from pylint checks and enabled F type error codes
This is a temporary method for getting a new version of pylint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants