@@ -119,12 +119,12 @@ pyyaml:
119
119
cp -r $(PYLIB_SRC_EXT ) /$(PYYAML_DIR ) /build/lib* -3* /* $(PYLIB_DIR ) /
120
120
121
121
#
122
- # PYLINT
122
+ # RUFF
123
123
#
124
124
125
- PYLINT_VERSION =0.21.0
126
- PYLINT_DIR =pylint -$(PYLINT_VERSION )
127
- PYLINT_PYTHONPATH =$(PYLIB_DIR ) :$(PYLIB_SRC_EXT ) /$(PYLINT_DIR ) /build/lib/
125
+ RUFF_VERSION =0.11.5
126
+ RUFF_DIR =ruff -$(RUFF_VERSION )
127
+ RUFF_PYTHONPATH =$(PYLIB_DIR ) :$(PYLIB_SRC_EXT ) /$(RUFF_DIR ) /build/lib/
128
128
MOCK_VERSION =1.0.1
129
129
MOCK_DIR =mock-$(MOCK_VERSION )
130
130
SETUP_TOOLS_VERSION =36.6.0
@@ -139,11 +139,11 @@ PYTHONSRC_INSTALL_PYTHON_PATH=$(PYTHONPATH):$(PYTHONSRC_INSTALL_SITE)
139
139
MOCK_BIN =$(PYTHONSRC_INSTALL ) /lib/python$(PYTHON_VERSION ) /site-packages/mock-1.0.1-py2.6.egg
140
140
UBUNTU_PLATFORM =$(shell if lsb_release -a 2>/dev/null | grep -q 'Ubuntu' ; then echo "Ubuntu"; fi)
141
141
142
- pylint :
143
- @echo " --- pylint "
144
- @cd $(PYLIB_SRC_EXT ) / && $(TAR ) xzf $(PYLINT_DIR ) .tar.gz
145
- @cd $(PYLIB_SRC_EXT ) /$(PYLINT_DIR ) / && python3 setup.py build 1> /dev/null
146
- @touch $(PYLIB_SRC_EXT ) /$(PYLINT_DIR ) /build/lib/__init__.py
142
+ ruff :
143
+ @echo " --- ruff "
144
+ @cd $(PYLIB_SRC_EXT ) / && $(TAR ) xzf $(RUFF_DIR ) .tar.gz
145
+ @cd $(PYLIB_SRC_EXT ) /$(RUFF_DIR ) / && python3 setup.py build 1> /dev/null
146
+ @touch $(PYLIB_SRC_EXT ) /$(RUFF_DIR ) /build/lib/__init__.py
147
147
148
148
$(MOCK_BIN ) :
149
149
@echo " --- mock for platform $( UBUNTU_PLATFORM) "
@@ -161,11 +161,11 @@ PYTHON_FILES=`grep -l --exclude=Makefile --exclude=gplogfilter "/bin/env python3
161
161
` find ./gppylib -name " *.py" ` \
162
162
` find $( SRC) /../sbin -name " *.py" `
163
163
164
- checkcode : pylint
165
- @echo " Running pylint on management scripts..."
166
- @PYTHONPATH=$(PYTHONPATH ) :$(PYLINT_PYTHONPATH ) $(PYLIB_SRC_EXT ) /$(PYLINT_DIR ) /bin/pylint -i y $(PYTHON_FILES ) --rcfile= .rcfile > $(SRC ) /../pylint .txt || true
167
- @echo -n " pylint_score =" > $(SRC ) /../pylint_score .properties
168
- @grep " Your code has been rated at" $(SRC ) /../pylint .txt | sed -e " s|Your .* \(.*\)/.*|\1|" >> $(SRC ) /../pylint_score .properties
164
+ checkcode : ruff
165
+ @echo " Running ruff on management scripts..."
166
+ @PYTHONPATH=$(PYTHONPATH ) :$(RUFF_PYTHONPATH ) $(PYLIB_SRC_EXT ) /$(RUFF_DIR ) /bin/ruff check $(PYTHON_FILES ) --config .rcfile > $(SRC ) /../ruff .txt || true
167
+ @echo -n " ruff_check_status =" > $(SRC ) /../ruff_status .properties
168
+ @grep " Your code has been checked at" $(SRC ) /../ruff .txt | sed -e " s|Your .* \(.*\)/.*|\1|" >> $(SRC ) /../ruff_status .properties
169
169
170
170
check : $(MOCK_BIN )
171
171
@echo " Running pure unit and also " unit" tests that require cluster to be up..."
@@ -189,7 +189,7 @@ installcheck: installcheck-bash
189
189
$(MAKE ) -C gpload_test $@
190
190
191
191
clean distclean :
192
- rm -rf $(PYLIB_SRC_EXT ) /$(PYLINT_DIR )
192
+ rm -rf $(PYLIB_SRC_EXT ) /$(RUFF_DIR )
193
193
rm -rf $(PYLIB_SRC_EXT ) /$(PYGRESQL_DIR ) /build
194
194
rm -rf $(PYLIB_SRC ) /$(PYGRESQL_DIR ) /build
195
195
rm -rf * .pyc
0 commit comments