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

chore: Test on macos and windows. #75

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: Test on macos and windows.
  • Loading branch information
JeffFaer committed Feb 18, 2025
commit 0e3732179963526e12d4c3a50dcaceb3c045f604
7 changes: 6 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion keepsorted/keep_sorted.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func New(id string, defaultOptions BlockOptions) *Fixer {

// Fix all of the findings on contents to make keep-sorted happy.
func (f *Fixer) Fix(filename, contents string, modifiedLines []LineRange) (fixed string, alreadyCorrect bool, warnings []*Finding) {
lines := strings.Split(contents, "\n")
lines := strings.Split(strings.ReplaceAll(contents, "\r\n", "\n"), "\n")
findings := f.findings(filename, lines, modifiedLines)
if len(findings) == 0 {
return contents, true, nil
Expand Down
Loading