Skip to content

Commit d5fa1f5

Browse files
committed
chore: enforce LF line endings in gitattributes and renormalize
1 parent 67756fc commit d5fa1f5

7 files changed

Lines changed: 1062 additions & 1054 deletions

File tree

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
entrypoint.sh text eol=lf
44
Dockerfile text eol=lf
55

6+
# CI, docs, and Go sources: LF everywhere (avoids CRLF noise on Windows; GitHub Actions expects LF YAML)
7+
*.yml text eol=lf
8+
*.yaml text eol=lf
9+
*.md text eol=lf
10+
*.go text eol=lf
11+
go.mod text eol=lf
12+
go.sum text eol=lf
13+

.github/workflows/go.yml

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
1-
name: Go CI
2-
3-
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
8-
9-
permissions:
10-
contents: read
11-
12-
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18-
19-
- name: Set up Go
20-
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
21-
with:
22-
go-version: '1.25.9'
23-
24-
- name: Tidy modules
25-
run: go mod tidy
26-
27-
- name: Build
28-
run: go build ./...
29-
30-
- name: Test
31-
run: go test -race ./...
32-
33-
- name: Lint (golangci-lint if available, else go vet)
34-
run: |
35-
if go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest 2>/dev/null; then
36-
$(go env GOPATH)/bin/golangci-lint run ./...
37-
else
38-
go vet ./...
39-
fi
40-
41-
database-smoke:
42-
runs-on: ubuntu-latest
43-
services:
44-
postgres:
45-
image: postgres:16-alpine
46-
ports:
47-
- 5432:5432
48-
env:
49-
POSTGRES_USER: marchat
50-
POSTGRES_PASSWORD: marchat
51-
POSTGRES_DB: marchat_ci
52-
options: >-
53-
--health-cmd "pg_isready -U marchat -d marchat_ci"
54-
--health-interval 5s
55-
--health-timeout 5s
56-
--health-retries 10
57-
mysql:
58-
image: mysql:8.0
59-
ports:
60-
- 3306:3306
61-
env:
62-
MYSQL_ROOT_PASSWORD: root
63-
MYSQL_DATABASE: marchat_ci
64-
MYSQL_USER: marchat
65-
MYSQL_PASSWORD: marchat
66-
options: >-
67-
--health-cmd "mysqladmin ping -h 127.0.0.1 -uroot -proot"
68-
--health-interval 5s
69-
--health-timeout 5s
70-
--health-retries 15
71-
steps:
72-
- name: Checkout code
73-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
74-
75-
- name: Set up Go
76-
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
77-
with:
78-
go-version: '1.25.9'
79-
80-
- name: Tidy modules
81-
run: go mod tidy
82-
83-
- name: Postgres and MySQL schema smoke
84-
env:
85-
MARCHAT_CI_POSTGRES_URL: postgres://marchat:marchat@127.0.0.1:5432/marchat_ci?sslmode=disable
86-
# Must use mysql: or mysql:// prefix so detectDriver() does not treat the DSN as a SQLite path.
87-
MARCHAT_CI_MYSQL_URL: mysql:marchat:marchat@tcp(127.0.0.1:3306)/marchat_ci
88-
run: go test -race ./server -run 'Test(Postgres|MySQL)InitDBAndSchemaSmoke' -count=1 -v
1+
name: Go CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
21+
with:
22+
go-version: '1.25.9'
23+
24+
- name: Tidy modules
25+
run: go mod tidy
26+
27+
- name: Build
28+
run: go build ./...
29+
30+
- name: Test
31+
run: go test -race ./...
32+
33+
- name: Lint (golangci-lint if available, else go vet)
34+
run: |
35+
if go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest 2>/dev/null; then
36+
$(go env GOPATH)/bin/golangci-lint run ./...
37+
else
38+
go vet ./...
39+
fi
40+
41+
database-smoke:
42+
runs-on: ubuntu-latest
43+
services:
44+
postgres:
45+
image: postgres:16-alpine
46+
ports:
47+
- 5432:5432
48+
env:
49+
POSTGRES_USER: marchat
50+
POSTGRES_PASSWORD: marchat
51+
POSTGRES_DB: marchat_ci
52+
options: >-
53+
--health-cmd "pg_isready -U marchat -d marchat_ci"
54+
--health-interval 5s
55+
--health-timeout 5s
56+
--health-retries 10
57+
mysql:
58+
image: mysql:8.0
59+
ports:
60+
- 3306:3306
61+
env:
62+
MYSQL_ROOT_PASSWORD: root
63+
MYSQL_DATABASE: marchat_ci
64+
MYSQL_USER: marchat
65+
MYSQL_PASSWORD: marchat
66+
options: >-
67+
--health-cmd "mysqladmin ping -h 127.0.0.1 -uroot -proot"
68+
--health-interval 5s
69+
--health-timeout 5s
70+
--health-retries 15
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
74+
75+
- name: Set up Go
76+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
77+
with:
78+
go-version: '1.25.9'
79+
80+
- name: Tidy modules
81+
run: go mod tidy
82+
83+
- name: Postgres and MySQL schema smoke
84+
env:
85+
MARCHAT_CI_POSTGRES_URL: postgres://marchat:marchat@127.0.0.1:5432/marchat_ci?sslmode=disable
86+
# Must use mysql: or mysql:// prefix so detectDriver() does not treat the DSN as a SQLite path.
87+
MARCHAT_CI_MYSQL_URL: mysql:marchat:marchat@tcp(127.0.0.1:3306)/marchat_ci
88+
run: go test -race ./server -run 'Test(Postgres|MySQL)InitDBAndSchemaSmoke' -count=1 -v

CONTRIBUTING.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
# Contributing to marchat
2-
3-
Thank you for your interest in contributing! This guide explains how to contribute effectively.
4-
5-
## Types of Contributions
6-
7-
### Bug Reports (GitHub Issues)
8-
- Use the issue tracker for bugs and problems only
9-
- Include:
10-
- Clear description of the problem
11-
- Steps to reproduce
12-
- Expected vs actual behavior
13-
- Your OS and marchat version
14-
- Any relevant logs or screenshots
15-
16-
### Ideas and Questions (GitHub Discussions)
17-
- Start a discussion for:
18-
- Feature requests and suggestions
19-
- Questions about setup or usage
20-
- General feedback and ideas
21-
- Sharing your experience
22-
- Showing off customizations
23-
24-
### Code Contributions
25-
26-
1. **Fork & Clone**
27-
- Fork the repo on GitHub
28-
- Clone your fork locally
29-
- Keep your fork in sync with upstream
30-
31-
2. **Create a Branch**
32-
- Branch from `main`
33-
- Use a clear, descriptive name
34-
- One feature/fix per branch
35-
36-
3. **Code Style**
37-
- Use `gofmt` or `go fmt`
38-
- Follow idiomatic Go patterns
39-
- Keep code readable and well-commented
40-
- Write clear commit messages
41-
42-
4. **Testing**
43-
- Add tests for new features
44-
- Ensure all tests pass locally
45-
- Run `go test ./...`
46-
47-
5. **Submit Pull Request**
48-
- Push to your fork
49-
- Open a PR against `main`
50-
- Describe your changes clearly
51-
- Link related issues
52-
53-
## Automation
54-
55-
- GitHub Actions runs CI on all PRs
56-
- Tests must pass before merge
57-
- Dependabot handles dependency updates
58-
- Do not manually update dependencies unless needed for a fix
59-
60-
## Communication
61-
62-
- Be respectful and constructive
63-
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md)
64-
- All contributions are welcome; no idea is too small!
65-
66-
---
67-
1+
# Contributing to marchat
2+
3+
Thank you for your interest in contributing! This guide explains how to contribute effectively.
4+
5+
## Types of Contributions
6+
7+
### Bug Reports (GitHub Issues)
8+
- Use the issue tracker for bugs and problems only
9+
- Include:
10+
- Clear description of the problem
11+
- Steps to reproduce
12+
- Expected vs actual behavior
13+
- Your OS and marchat version
14+
- Any relevant logs or screenshots
15+
16+
### Ideas and Questions (GitHub Discussions)
17+
- Start a discussion for:
18+
- Feature requests and suggestions
19+
- Questions about setup or usage
20+
- General feedback and ideas
21+
- Sharing your experience
22+
- Showing off customizations
23+
24+
### Code Contributions
25+
26+
1. **Fork & Clone**
27+
- Fork the repo on GitHub
28+
- Clone your fork locally
29+
- Keep your fork in sync with upstream
30+
31+
2. **Create a Branch**
32+
- Branch from `main`
33+
- Use a clear, descriptive name
34+
- One feature/fix per branch
35+
36+
3. **Code Style**
37+
- Use `gofmt` or `go fmt`
38+
- Follow idiomatic Go patterns
39+
- Keep code readable and well-commented
40+
- Write clear commit messages
41+
42+
4. **Testing**
43+
- Add tests for new features
44+
- Ensure all tests pass locally
45+
- Run `go test ./...`
46+
47+
5. **Submit Pull Request**
48+
- Push to your fork
49+
- Open a PR against `main`
50+
- Describe your changes clearly
51+
- Link related issues
52+
53+
## Automation
54+
55+
- GitHub Actions runs CI on all PRs
56+
- Tests must pass before merge
57+
- Dependabot handles dependency updates
58+
- Do not manually update dependencies unless needed for a fix
59+
60+
## Communication
61+
62+
- Be respectful and constructive
63+
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md)
64+
- All contributions are welcome; no idea is too small!
65+
66+
---
67+
6868
Thank you for helping make marchat better!

0 commit comments

Comments
 (0)