Merge branch 'linter-bug'

pull/110/head
Dave Musicant / thinkpad 2 years ago
commit 9772832381

@ -1,3 +1,4 @@
---
name: Gitwatch QA name: Gitwatch QA
on: on:
@ -9,7 +10,7 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
#----------------------------------------------------------------------------- #-------------------------------------------------------------------------
super-lint: super-lint:
name: Lint Code Base name: Lint Code Base
@ -25,18 +26,23 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Run Super-Linter # For the time being, I'm giving up on Super Linter. It's a great tool,
uses: github/super-linter@v3 # but it's currently broken, and it's taking more time to make it work than
env: # it's worth.
DEFAULT_BRANCH: master # - name: Lint Code Base
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # uses: github/super-linter@v4
# Linter is having errors at symbolic link, appears to be # env:
# this bug: # DEFAULT_BRANCH: master
# https://github.com/github/super-linter/issues/1400 # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/kucherenko/jscpd/issues/481 # # Linter is having errors at symbolic link, appears to be
FILTER_REGEX_EXCLUDE: \.github/linters/\.markdown-lint.yml # # this bug:
# # https://github.com/github/super-linter/issues/1400
#----------------------------------------------------------------------------- # # https://github.com/kucherenko/jscpd/issues/481
# # Test files are bats files, which don't follow bash standards
# # FILTER_REGEX_EXCLUDE: \.github/linters/\.markdown-lint.yml | tests\.*
# # FILTER_REGEX_EXCLUDE: tests\.*
#-------------------------------------------------------------------------
bats: bats:
name: BATS Tests name: BATS Tests

@ -21,3 +21,5 @@ MD007:
# We don't care about inline HTML # We don't care about inline HTML
MD033: false MD033: false
# Removing eval as recommended broke code; might fix later, but not now
SC2294: false

@ -7,9 +7,9 @@
load startup-shutdown load startup-shutdown
@test "commit log messages working" { function commit_log_messages_working { #@test
# Start up gitwatch with logging, see if works # Start up gitwatch with logging, see if works
${BATS_TEST_DIRNAME}/../gitwatch.sh -l 10 "$testdir/local/remote" 3>&- & "${BATS_TEST_DIRNAME}"/../gitwatch.sh -l 10 "$testdir/local/remote" 3>&- &
GITWATCH_PID=$! GITWATCH_PID=$!
# Keeps kill message from printing to screen # Keeps kill message from printing to screen
@ -25,11 +25,11 @@ load startup-shutdown
# Wait a bit for inotify to figure out the file has changed, and do its add, # Wait a bit for inotify to figure out the file has changed, and do its add,
# and commit # and commit
sleep $WAITTIME sleep "$WAITTIME"
# Make a new change # Make a new change
echo "line2" >> file1.txt echo "line2" >> file1.txt
sleep $WAITTIME sleep "$WAITTIME"
# Check commit log that the diff is in there # Check commit log that the diff is in there
run git log -1 --oneline run git log -1 --oneline

@ -7,7 +7,7 @@
load startup-shutdown load startup-shutdown
@test "remote git dirs working, with commit logging" { function remote_git_dirs_working_with_commit_logging { #@test
# Move .git somewhere else # Move .git somewhere else
dotgittestdir=$(mktemp -d) dotgittestdir=$(mktemp -d)
mv "$testdir/local/remote/.git" "$dotgittestdir" mv "$testdir/local/remote/.git" "$dotgittestdir"

@ -7,7 +7,7 @@
load startup-shutdown load startup-shutdown
@test "commit only when git status change" { function commit_only_when_git_status_change { #@test
# Start up gitwatch and capture its output # Start up gitwatch and capture its output
${BATS_TEST_DIRNAME}/../gitwatch.sh "$testdir/local/remote" > "$testdir/output.txt" 3>&- & ${BATS_TEST_DIRNAME}/../gitwatch.sh "$testdir/local/remote" > "$testdir/output.txt" 3>&- &

@ -7,7 +7,7 @@
load startup-shutdown load startup-shutdown
@test "syncing correctly" { function syncing_correctly { #@test
# Start up gitwatch and see if commit and push happen automatically # Start up gitwatch and see if commit and push happen automatically
# after waiting two seconds # after waiting two seconds
${BATS_TEST_DIRNAME}/../gitwatch.sh -r origin "$testdir/local/remote" 3>- & ${BATS_TEST_DIRNAME}/../gitwatch.sh -r origin "$testdir/local/remote" 3>- &

Loading…
Cancel
Save