From b566c3263c4c383f24c71b5abe1abbab80b981f1 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Fri, 16 Aug 2024 16:36:22 -0300 Subject: [PATCH] ci: fix lint --- .github/workflows/testing.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3aefbd2..c407006 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -29,13 +29,19 @@ jobs: - name: Check if the lint configuration matches the one in the DAS repository. run: |- - master_lint=$(curl -s https://raw.githubusercontent.com/singnet/das/master/python/.pylintrc | shasum -a 256 | cut -d ' ' -f 1) - local_lint=$(shasum -a 256 .pylintrc | cut -d ' ' -f 1) + config_files=(".black.cfg" ".flake8.cfg" ".isort.cfg") - if [ "$master_lint" != "$local_lint" ]; then - echo "The local lint configuration differs from the one in the DAS repository." - exit 1 - fi + for config_file in "${config_files[@]}"; do + master_lint=$(curl -s https://raw.githubusercontent.com/singnet/das/master/.lint/${config_file} | shasum -a 256 | cut -d ' ' -f 1) + local_lint=$(shasum -a 256 ${config_file} | cut -d ' ' -f 1) + + if [ "$master_lint" != "$local_lint" ]; then + echo "The local lint configuration differs from the one in the DAS repository." + exit 1 + fi + done + + echo "All lint configurations match the ones in the DAS repository." - name: Perform Code Linting run: make lint