Skip to content

Commit

Permalink
Separate the link and lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Mar 8, 2024
1 parent ef47f82 commit 83a3869
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
14 changes: 14 additions & 0 deletions tools/check-links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

#
# Check for valid symbolic links for non-Steam gamefixes
#

# Lint the following gamefix dir:
# gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform
for file in ./{gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform}/*; do
if [[ -L "$file" && ! -e "$file" ]]; then
echo "The following file is not a valid link: ${file}"
exit 1
fi
done
13 changes: 3 additions & 10 deletions tools/preflight-check.sh → tools/lint.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
#!/usr/bin/env bash

#
# Lint using Pylint and check for valid symbolic links for directories with fixes.
# Lint with Pylint
#

# Links
for file in ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform}/*; do
if [[ -L "$file" && ! -e "$file" ]]; then
echo "The following file is not a valid link: ${file}"
exit 1
fi
done

# Lint
# Lint the following gamefix dir:
# steam, gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform
mapfile -d '' files_array < <(find ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform} -type f -name "*.py" ! -name "__init__.py" -print0)

# Disable these checks:
Expand Down

0 comments on commit 83a3869

Please sign in to comment.