drewkerrigan / nagios-http-json

A generic plugin for Nagios which checks json values from a given HTTP endpoint against argument specified rules and determines the status and performance data for that service.
Other
67 stars 60 forks source link

Broken Makefile and lint test #89

Closed lbetz closed 5 months ago

lbetz commented 5 months ago

Makefile uses python should be python3 and I got a lint error on Debian Bullseye and Ubuntu Focal Fossa: python3 -m pylint check_http_json.py ***** Module check_http_json check_http_json.py:614:0: E0012: Bad option value 'consider-using-with' (bad-option-value)

martialblog commented 5 months ago

Regarding the use of python3, we can change that. The script uses #!/usr/bin/env python3 anyways.

About the lint errors. I don't really have an explanation, nor can I recreate the issue.

podman run -ti --rm -v $(pwd):/app --entrypoint bash docker.io/python:3-bullseye                    
root@f49b22a6dcb0:/app# pip3 install -r requirements-dev.txt 
root@f49b22a6dcb0:/app# make lint
python3 -m pylint check_http_json.py

------------------------------------
Your code has been rated at 10.00/10

Same works with bookworm:


podman run -ti --rm -v $(pwd):/app --entrypoint bash docker.io/python:3-bookworm
root@b6471af0a1a5:/app# pip3 install -r requirements-dev.txt 
root@b6471af0a1a5:/app# make lint
python3 -m pylint check_http_json.py

------------------------------------
Your code has been rated at 10.00/10