|
52 | 52 | outputs: |
53 | 53 | changed-files: ${{ steps.changed-files.outputs.project_all_changed_files }} |
54 | 54 | doc-changed-files: ${{ steps.changed-files.outputs.docs_changed_files }} |
55 | | - py-changed-files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }} |
| 55 | + py-changed-files: ${{ steps.changed-files.outputs.all_changed_files }} |
56 | 56 | pip-any-changed: ${{ steps.changed-files-pip.outputs.any_changed}} |
57 | 57 | py-any-changed: ${{ steps.changed-files.outputs.any_changed}} |
58 | 58 | tesy-changed-files: ${{ steps.changed-files.outputs.test_changed_files }} |
@@ -231,14 +231,65 @@ jobs: |
231 | 231 | pip install -r requirements_dev.txt |
232 | 232 |
|
233 | 233 |
|
| 234 | +
|
| 235 | + # |
| 236 | + # PyLint C value |
| 237 | + # |
| 238 | + # [I]nformational messages that Pylint emits (do not contribute to your analysis score) |
| 239 | + |
| 240 | + # [R]efactor for a "good practice" metric violation |
| 241 | + |
| 242 | + # [C]onvention for coding standard violation |
| 243 | + |
| 244 | + # [W]arning for stylistic problems, or minor programming issues |
| 245 | + |
| 246 | + # [E]rror for important programming issues (i.e. most probably bug) |
| 247 | + |
| 248 | + # [F]atal for errors which prevented further processing |
234 | 249 | - name: Lint ${{ matrix.python-version }} |
235 | 250 | id: lint |
236 | 251 | if: inputs.LINT && needs.init.outputs.py-any-changed |
237 | 252 | shell: bash |
238 | 253 | env: |
239 | 254 | PY_CHANGED_FILES: ${{ needs.init.outputs.py-changed-files }} |
240 | 255 | run: | |
241 | | - pylint --py-version ${{ matrix.python-version }} --msg-template "::notice file={path},line={line},endLine={end_line},title={msg_id}::{msg} see https://pylint.pycqa.org/en/latest/user_guide/messages/{category}/{symbol}.html" ${PY_CHANGED_FILES} || EXITCODE=$? |
| 256 | + set +e; |
| 257 | +
|
| 258 | + echo "Primary Python version [${{ inputs.PYTHON_VERSION }}], Matrix Python Version [${{ matrix.python-version }}]"; |
| 259 | +
|
| 260 | + if [ "${{ inputs.PYTHON_VERSION }}" != "${{ matrix.python-version }}" ]; then |
| 261 | +
|
| 262 | + echo "Only show Github annotations for primary Python version: ${{ inputs.PYTHON_VERSION }}"; |
| 263 | +
|
| 264 | + pylint \ |
| 265 | + --py-version ${{ matrix.python-version }} \ |
| 266 | + ${PY_CHANGED_FILES} || EXITCODE=$? |
| 267 | +
|
| 268 | + else |
| 269 | +
|
| 270 | + # available are debug, notice, warning, error |
| 271 | +
|
| 272 | + export I=debug; |
| 273 | + export R=notice; |
| 274 | + export C=warning; |
| 275 | + export W=warning; |
| 276 | + export E=error; |
| 277 | + export F=error; |
| 278 | +
|
| 279 | + pylint --py-version ${{ matrix.python-version }} --msg-template "::${C} file={path},line={line},endLine={end_line},title={msg_id}::{msg} see <https://pylint.pycqa.org/en/latest/user_guide/messages/{category}/{symbol}.html>" ${PY_CHANGED_FILES} | envsubst; |
| 280 | +
|
| 281 | + export EXITCODE=${PIPESTATUS[0]} |
| 282 | +
|
| 283 | + # pylint \ |
| 284 | + # --py-version ${{ matrix.python-version }} \ |
| 285 | + # --msg-template "::notice \ |
| 286 | + # file={path}, \ |
| 287 | + # line={line}, \ |
| 288 | + # endLine={end_line}, \ |
| 289 | + # title={msg_id}::{msg} see https://pylint.pycqa.org/en/latest/user_guide/messages/{category}/{symbol}.html" \ |
| 290 | + # ${PY_CHANGED_FILES} || EXITCODE=$? |
| 291 | +
|
| 292 | + fi; |
242 | 293 |
|
243 | 294 | echo "Exit code was $EXITCODE"; |
244 | 295 |
|
|
0 commit comments