From 100c2328bb04b1d2b7ba0639de4e402914f2452a Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 24 Jul 2020 17:09:51 -0400 Subject: [PATCH 1/3] Add step to check for unix file endings --- synapse/pipeline.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/synapse/pipeline.yml b/synapse/pipeline.yml index 7914a41..d3af81a 100644 --- a/synapse/pipeline.yml +++ b/synapse/pipeline.yml @@ -50,6 +50,17 @@ steps: image: "python:3.6" mount-buildkite-agent: false + - label: "\U0001F5A5 check unix line-endings" + command: + # Run 'file' command on each file, checking for Windows-style line terminators. + # grep returns exit code 1 when it doesn't find anything. We invert this as + # finding entries are a bad thing + - "find . -type f -exec file '{}' ';' | (! grep 'CRLF line terminators')" + plugins: + - docker#v3.0.1: + image: "python:3.6" + mount-buildkite-agent: false + - label: ":mypy: mypy" command: - "python -m pip install tox" From c38af5f0d10ffff4dace73d83da342d56be715da Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 24 Jul 2020 17:19:33 -0400 Subject: [PATCH 2/3] Don't check the .git directory --- synapse/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/pipeline.yml b/synapse/pipeline.yml index d3af81a..f94ee36 100644 --- a/synapse/pipeline.yml +++ b/synapse/pipeline.yml @@ -55,7 +55,7 @@ steps: # Run 'file' command on each file, checking for Windows-style line terminators. # grep returns exit code 1 when it doesn't find anything. We invert this as # finding entries are a bad thing - - "find . -type f -exec file '{}' ';' | (! grep 'CRLF line terminators')" + - "find . -type f -path './.git/*' -prune -o -exec file '{}' ';' | (! grep 'CRLF line terminators')" plugins: - docker#v3.0.1: image: "python:3.6" From c5f42f15565ecdb47b4839afdeb479d2c1d3fd80 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 27 Jul 2020 16:00:16 -0700 Subject: [PATCH 3/3] Update to use check_line_terminators.sh script --- synapse/pipeline.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/synapse/pipeline.yml b/synapse/pipeline.yml index f94ee36..aa98606 100644 --- a/synapse/pipeline.yml +++ b/synapse/pipeline.yml @@ -52,10 +52,7 @@ steps: - label: "\U0001F5A5 check unix line-endings" command: - # Run 'file' command on each file, checking for Windows-style line terminators. - # grep returns exit code 1 when it doesn't find anything. We invert this as - # finding entries are a bad thing - - "find . -type f -path './.git/*' -prune -o -exec file '{}' ';' | (! grep 'CRLF line terminators')" + - "scripts-dev/check_line_terminators.sh" plugins: - docker#v3.0.1: image: "python:3.6"