-
Notifications
You must be signed in to change notification settings - Fork 41
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
base: master
Are you sure you want to change the base?
Conversation
kodi_addon_checker/pylint_checks.py
Outdated
|
||
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.
This comment was marked as spam.
Sorry, something went wrong.
kodi_addon_checker/pylint_checks.py
Outdated
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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
kodi_addon_checker/check_addon.py
Outdated
@@ -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.
This comment was marked as spam.
Sorry, something went wrong.
requirements.txt
Outdated
@@ -1,3 +1,5 @@ | |||
pillow | |||
requests | |||
radon | |||
pylint |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
kodi_addon_checker/pylint_checks.py
Outdated
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.
This comment was marked as spam.
Sorry, something went wrong.
kodi_addon_checker/.pylintrc
Outdated
persistent=yes | ||
|
||
# Specify a configuration file. | ||
rcfile=/home/mzfr/dev/Addon-check/Misc/Demo/ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
073611c
to
4d2b7f7
Compare
41c5adf
to
04ce558
Compare
Removed all C type error code from pylint checks and enabled F type error codes
With this we will be able check our addons with pylint.
The output will look like:
Currently all the checks are enabled on line 17 in
.pylintrc
but we can then disable the ones we don't want.