linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

makefile formatting target failing #115

Closed SPlanzer closed 4 years ago

SPlanzer commented 4 years ago

Bug Description

Using the formatting make commands for trailing whitespace I added yesterday it is clear they were not correctly tested.

https://github.com/linz/gazetteer/blob/ec7caa01bf19aa49521c1c93acf3355954819d8c/Makefile#L45-L51

What runs in bash is failing via make.

Steps to Reproduce

running the below make targets

they throw make: *** [formatting-validate-trailing-whitespace] Error 1

This does not affect black targets

Desktop

Ubuntu 18

Screenshots

Add an Assignee, Epics, Estimate and any relevant Labels.

SPlanzer commented 4 years ago

This is as grep doesn't give an error in bash, but it does return a non-zero exit code:

https://stackoverflow.com/questions/4761728/grep-this-foo-txt-this-txt-gives-an-error-in-makefile-not-in-bash-when-gre

will follow above advice and add || true

SPlanzer commented 4 years ago

also found that find . ! -name '*.git' ! -name '*.png' -type f is not ignore git

and am now using find . -type f -not -path "*\.git/*" -not -name "*\.png"