Skip to content

Commit 67b332b

Browse files
committed
Disable unnecessary linters, delint some code...
1 parent 7c1e1ea commit 67b332b

5 files changed

Lines changed: 22 additions & 13 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1+
# Summary
2+
3+
TODO...
4+
15
## Expected Behavior
26

7+
TODO...
38

49
## Actual Behavior
510

11+
TODo...
612

713
## Steps to Reproduce the Problem
814

915
1.
1016
1.
1117
1.
1218

13-
## Specifications
19+
# Specifications
1420

1521
- Python version (`python --version`)
1622
- OS (Mac/Linux/Windows)

.github/scripts/lint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export LANG=C.UTF-8
2121
CL_FILE="${HOME}/changed_files.txt"
2222

2323
if [ -f "${CL_FILE}" ] && ! grep -q .pylintrc "${CL_FILE}"; then
24-
cat "${HOME}/changed_files.txt" | grep ".py$" | xargs pylint
24+
grep ".py$" "${HOME}/changed_files.txt"| xargs pylint
2525
else
26-
find . -iname "*.py" | xargs pylint
26+
find . -iname "*.py" -print0 | xargs pylint
2727
fi

.github/scripts/test.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ export LANG=C.UTF-8
1818
export PIPENV_PYTHON="${PYENV_ROOT}/shims/python"
1919
export GOOGLE_APPLICATION_CREDENTIALS="${HOME}/secrets/default_credentials.json"
2020

21+
dirs=()
22+
2123
if [ -f "requirements.txt" ]; then
2224
pipenv install -r "requirements.txt"
2325
fi
2426

25-
TEST_DIRS=`find . -name '*_test.py' -exec dirname '{}' \;| sort -u`
27+
IFS=$'\n' read -r -d '' -a dirs < <( find . -name '*_test.py' -exec dirname '{}' \; | sort -u )
2628

2729
exit_code=0
2830

29-
for DIR in ${TEST_DIRS[@]}; do
30-
pushd "${DIR}"
31-
echo $DIR
31+
for dir in "${dirs[@]}"; do
32+
pushd "${dir}" || exit
3233
if [ -f "requirements.txt" ]; then
3334
# If requirements.txt present, create a new isolated environment
3435
touch Pipfile
@@ -39,7 +40,7 @@ for DIR in ${TEST_DIRS[@]}; do
3940
if [ $status -ne 0 ]; then
4041
exit_code=$status
4142
fi
42-
popd
43+
popd || exit
4344
done
4445

4546
if [ $exit_code -ne 0 ]; then

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- name: Fetch and Diff PR with base from which it was cloned
2121
if: ${{ github.event.pull_request.base.sha }}
2222
run: |
23-
git fetch origin main ${{ github.event.pull_request.base.sha }}
24-
git diff --diff-filter=ACM --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > $HOME/changed_files.txt
23+
git fetch origin main "${{ github.event.pull_request.base.sha }}"
24+
git diff --diff-filter=ACM --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" > "${HOME}/changed_files.txt"
2525
- name: Set up Python ${{ matrix.python-version }}
2626
uses: actions/setup-python@v2
2727
with:
@@ -32,9 +32,9 @@ jobs:
3232
pip install pipenv
3333
- name: Write test credentials
3434
run: |
35-
mkdir $HOME/secrets
36-
echo "$DEFAULT_CREDENTIALS" > $HOME/secrets/default_credentials.json
37-
echo "$CLIENT_ID_FILE" > $HOME/secrets/client_id.json
35+
mkdir "${HOME}/secrets"
36+
echo "${DEFAULT_CREDENTIALS}" > "${HOME}/secrets/default_credentials.json"
37+
echo "${CLIENT_ID_FILE}" > "${HOME}/secrets/client_id.json"
3838
env:
3939
DEFAULT_CREDENTIALS: ${{secrets.SNIPPETS_DEFAULT_CREDENTIALS}}
4040
CLIENT_ID_FILE: ${{secrets.SNIPPETS_CLIENT_ID_FILE}}

.github/workflows/lint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ jobs:
2323
- uses: github/super-linter/slim@v4.8.4
2424
env:
2525
ERROR_ON_MISSING_EXEC_BIT: true
26+
VALIDATE_JSCPD: false
27+
VALIDATE_PYTHON_BLACK: false
2628
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' }}
2729
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)