Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text file, newlines at end of files (backport #9804) #10007

Merged
merged 13 commits into from
May 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 13, 2024

Fixes #9802 for *.hs and *.project files and adds a script taking a file glob pattern for doing this, adding newlines at the ends of files where needed. Adds back the whitespace github workflow and uses fix-whitespace to fix non-conformance. Add a short note about this in the contributing readme.


This is an automatic backport of pull request #9804 done by [Mergify](https://mergify.com).

(cherry picked from commit 265f149)
(cherry picked from commit c31ca12)

# Conflicts:
#	.github/workflows/validate.yml
(cherry picked from commit 2ea012e)
(cherry picked from commit e420bf2)
- Fix whitespace in cabal-testsuite + other tests

(cherry picked from commit e386a13)
Needed for POSIX compliance for text files

(cherry picked from commit ed4c36a)
(cherry picked from commit 38eb1e8)
Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>
(cherry picked from commit 834e1ed)
(cherry picked from commit eb87ffd)
@mergify mergify bot added the conflicts label May 13, 2024
Copy link
Contributor Author

mergify bot commented May 13, 2024

Cherry-pick of c31ca12 has failed:

On branch mergify/bp/3.12/pr-9804
Your branch is ahead of 'origin/3.12' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit c31ca12e9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .github/workflows/bootstrap.skip.yml
	modified:   .github/workflows/validate.skip.yml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .github/workflows/validate.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request May 13, 2024
1 task
@mergify mergify bot added the backport label May 13, 2024
@Kleidukos Kleidukos added the squash+merge me Tell Mergify Bot to squash-merge label May 13, 2024
@Kleidukos
Copy link
Member

bullshit failure from fix-whitespace:

[ Violation detected ] license-list-data/exceptions-3.23.json
[ Violation detected ] license-list-data/licenses-3.23.json

@mergify mergify bot merged commit ea05e10 into 3.12 May 13, 2024
41 of 42 checks passed
@mergify mergify bot deleted the mergify/bp/3.12/pr-9804 branch May 13, 2024 15:36
@ulysses4ever
Copy link
Collaborator

@philderbeast we tried to backport you #9804 to the 3.12 branch but it failed on the whitespace action, as mentioned above:

[ Violation detected ] license-list-data/exceptions-3.23.json
[ Violation detected ] license-list-data/licenses-3.23.json

Here's the failing workflow: https://github.com/haskell/cabal/actions/runs/9065601825/job/24906767545

Do you have any idea why it's fine on master but fails here, on 3.12? I compared these JSON files and the fix-whitespace config to the master versions but didn't find any differences.

@philderbeast
Copy link
Collaborator

@ulysses4ever do you know how I can checkout this branch locally? I tried;

$ gh pr checkout 10007
fatal: couldn't find remote ref refs/heads/mergify/bp/3.12/pr-9804
failed to run git: exit status 128

@ulysses4ever ulysses4ever restored the mergify/bp/3.12/pr-9804 branch May 13, 2024 19:15
@philderbeast
Copy link
Collaborator

Thanks for restoring the branch @ulysses4ever.

@philderbeast
Copy link
Collaborator

philderbeast commented May 13, 2024

There are two choices, either exclude those two files with violations (in fix-whitespace.yaml) or accept the fixes. I prefer the later. Copying the two violating files from this PR's branch to master, I see a difference;

$ git diff
diff --git a/license-list-data/exceptions-3.23.json b/license-list-data/exceptions-3.23.json
index 774f2632e..e2ad72824 100644
--- a/license-list-data/exceptions-3.23.json
+++ b/license-list-data/exceptions-3.23.json
@@ -769,4 +769,4 @@
     }
   ],
   "releaseDate": "2024-02-08"
-}
+}
\ No newline at end of file
diff --git a/license-list-data/licenses-3.23.json b/license-list-data/licenses-3.23.json
index ab676e4ef..884a5e62d 100644
--- a/license-list-data/licenses-3.23.json
+++ b/license-list-data/licenses-3.23.json
@@ -7994,4 +7994,4 @@
     }
   ],
   "releaseDate": "2024-02-08"
-}
+}
\ No newline at end of file

@ulysses4ever
Copy link
Collaborator

Yes, thank you, I am accepting these in #10008. I wined a little about it here: #9818 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants