Skip to content

Commit

Permalink
Use GitHub Action instead of a filter for CRLF normalization (#106)
Browse files Browse the repository at this point in the history
* Use GitHub Action instead of a filter for CRLF normalization
* Update and rename enforce-crlf.yml to enforce_crlf.yml
* Update enforce_crlf.yml
  • Loading branch information
DecimalTurn authored Jul 18, 2024
1 parent 717cca2 commit a351c01
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# By default, auto detect text files and perform LF normalization
* text=auto eol=lf

# VBA extensions - Enforce CRLF using a filter
# To make sure the filter is active, run the command: git config include.path ../.gitconfig
*.bas -text filter=crlf
*.cls -text filter=crlf
*.frm -text filter=crlf
# VBA extensions - Prevent LF normalization
*.bas -text diff
*.cls -text diff
*.frm -text diff

# VBA extensions - Mark as binary
*.frx binary

# AutoHotKey
*.ahk -text filter=crlf
*.ahk -text diff
2 changes: 0 additions & 2 deletions .gitconfig

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/enforce_crlf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Enforce-CRLF

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: write

jobs:
enforce-crlf:
runs-on: ubuntu-latest
steps:
- name: Enforce CRLF action
uses: DecimalTurn/Enforce-CRLF@08706ea4cc4a3de32d8b3c769686355a22d69e84 #v1.1.2
with:
extensions: .bas, .frm, .cls
do-checkout: true
do-push: true

0 comments on commit a351c01

Please sign in to comment.