fix: Ensure files are committed with eol=lf via .gitattributes (#3527)

* chore: Use `.yml` extension

Both of these files support the `.yml` extension. Normalize on that.

* fix: Add `.gitattributes` to ensure `LF` line-endings are committed

Avoids accidentally committing files with `CRLF` when they're created on Windows. Or worse, if some editors don't detect `LF` and would introduce mixed line-endings with `CRLF`.

Shouldn't be a problem in practice as we already have a linting check to catch this via CI during PRs. This file is complimentary, in that it should automate that concern away.
This commit is contained in:
Brennan Kinney 2023-09-09 09:35:57 +12:00 committed by GitHub
parent 20241691b8
commit ad8b618b46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 161 additions and 1 deletions

View file

@ -35,7 +35,7 @@ function _hadolint() {
--volume "${REPOSITORY_ROOT}:/ci:ro" \
--workdir "/ci" \
--name dms-test_hadolint \
"hadolint/hadolint:v${HADOLINT_VERSION}-alpine" hadolint --config "/ci/test/linting/.hadolint.yaml" Dockerfile
"hadolint/hadolint:v${HADOLINT_VERSION}-alpine" hadolint --config "/ci/test/linting/.hadolint.yml" Dockerfile
then
_log 'info' 'Hadolint succeeded'
else