Skip to content

Commit

Permalink
add script to fix end newlines
Browse files Browse the repository at this point in the history
<!-- ps-id: 1af6c3bc-7c17-40af-b082-6c263579d996 -->

Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter committed Mar 6, 2024
1 parent 234220c commit e9931e4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ More information can be found in the [Wiki][22].
[20]: https://code.visualstudio.com/
[21]: https://github.com/coq-community/vscoq

[22]: https://github.com/HoTT/HoTT/wiki
[22]: https://github.com/HoTT/HoTT/wiki
14 changes: 14 additions & 0 deletions etc/fix_end_newlines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# This command fixes the end-of-file newlines for all files in the repository.

while IFS= read -r file; do
# Check if the file is a regular file
if [ -f "$file" ]; then
if [ -n "$(tail -c 1 "$file")" ]; then
echo "Adding newline to file: $file"
echo >> "$file"
git add "$file"
fi
fi
done < <(git ls-files)
2 changes: 1 addition & 1 deletion theories/Cubical.v
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Require Export Cubical.DPath.
Require Export Cubical.PathSquare.
Require Export Cubical.DPathSquare.
Require Export Cubical.PathCube.
Require Export Cubical.DPathCube.
Require Export Cubical.DPathCube.
2 changes: 1 addition & 1 deletion theories/Diagrams/ParallelPair.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Proof.
srapply Build_Cocone.
1: intros []; [exact (q o f) | exact q].
intros [] [] []; [reflexivity | exact Hq].
Defined.
Defined.
2 changes: 1 addition & 1 deletion theories/Diagrams/Span.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Section Span.
+ exact g.
Defined.

End Span.
End Span.
2 changes: 1 addition & 1 deletion theories/Spaces/Int.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Export HoTT.Spaces.Int.Core.
Require Export HoTT.Spaces.Int.Spec.
Require Export HoTT.Spaces.Int.Equiv.
Require Export HoTT.Spaces.Int.LoopExp.
Require Export HoTT.Spaces.Int.LoopExp.
2 changes: 1 addition & 1 deletion theories/Spaces/Pos.v
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Require Export HoTT.Spaces.Pos.Core.
Require Export HoTT.Spaces.Pos.Spec.
Require Export HoTT.Spaces.Pos.Spec.

0 comments on commit e9931e4

Please sign in to comment.