# Source: https://github.com/danielmiessler/SecLists/blob/master/.github/workflows/wordlist-validator_verify_entries_for_starting_with_slash.yml

name: Wordlist Validator - Verify if any file end with a new line
on:
  push:
    paths:
      - "**.txt"
  pull_request:
    paths:
      - "**.txt"
  workflow_dispatch:

jobs:
  check_files_changed:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Get changed files
        id: changed-files
        with:
          files: "**/*.txt"
        uses: tj-actions/changed-files@v34
      - name: Analyze all added or modified files
        run: |
          ./.bin/new-line-checker.py "${{ steps.changed-files.outputs.all_changed_files }}"