From 0d1a4bba3c363c2c130b6107a0587d5d828043a7 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Fri, 10 May 2024 21:29:35 +0200 Subject: [PATCH 01/23] Remove trailing whitespace --- style/roads.mss | 29 +++++++++++++++-------------- style/tourism.mss | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/style/roads.mss b/style/roads.mss index e6d9d338f..69116fb8b 100644 --- a/style/roads.mss +++ b/style/roads.mss @@ -1682,7 +1682,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ line-pattern-join: round; } } - } + } [feature = 'highway_secondary'] { [zoom >= 9][link != 'yes'], @@ -1742,7 +1742,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ line-pattern-type: repeat; line-pattern-alignment: global; line-pattern-width: @secondary-width-z12 - 2 * @secondary-casing-width-z12; - line-pattern-file: url("symbols/unpaved/unpaved_secondary-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_secondary-fill.svg"); line-pattern-cap: round; line-pattern-join: round; [zoom >= 13] { @@ -1841,7 +1841,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ line-pattern-type: repeat; line-pattern-alignment: global; line-pattern-width: @tertiary-width-z12 - 2 * @casing-width-z12; - line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); [zoom >= 13] { line-pattern-width: @tertiary-width-z13 - 2 * @casing-width-z13; } [zoom >= 14] { line-pattern-width: @tertiary-width-z14 - 2 * @casing-width-z14; } [zoom >= 15] { line-pattern-width: @tertiary-width-z15 - 2 * @casing-width-z15; } @@ -1932,7 +1932,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 19] { line-pattern-width: @residential-width-z19 - 2 * @casing-width-z19; } line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); #bridges { line-pattern-width: @residential-width-z13 - 2 * @bridge-casing-width-z13; [zoom >= 14] { line-pattern-width: @residential-width-z14 - 2 * @bridge-casing-width-z14; } @@ -1990,7 +1990,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 19] { line-pattern-width: @living-street-width-z19 - 2 * @casing-width-z19; } line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_living-street-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_living-street-fill.svg"); #bridges { line-pattern-width: @living-street-width-z13 - 2 * @casing-width-z13; [zoom >= 14] { line-pattern-width: @living-street-width-z14 - 2 * @bridge-casing-width-z14; } @@ -2003,7 +2003,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ line-pattern-join: round; line-pattern-cap: round; } - } + } [feature = 'highway_road'] { [zoom >= 10] { @@ -2047,7 +2047,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 19] { line-pattern-width: @road-width-z19 - 2 * @casing-width-z19; } line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_road-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_road-fill.svg"); #bridges { line-pattern-width: @road-width-z14 - 2 * @bridge-casing-width-z14; [zoom >= 16] { line-pattern-width: @road-width-z16 - 2 * @bridge-casing-width-z16; } @@ -2110,7 +2110,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 17][service = 'INT-minor'] { line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg"); [service = 'INT-normal'] { line-pattern-width: @service-width-z14 - 2 * @casing-width-z14; [zoom >= 16] { line-pattern-width: @service-width-z16 - 2 * @casing-width-z16; } @@ -2183,7 +2183,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 19] { line-pattern-width: @pedestrian-width-z19 - 2 * @casing-width-z19; } line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_pedestrian-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_pedestrian-fill.svg"); #bridges { line-pattern-width: @pedestrian-width-z14 - 2 * @bridge-casing-width-z14; [zoom >= 15] { line-pattern-width: @pedestrian-width-z15 - 2 * @bridge-casing-width-z15; } @@ -2216,7 +2216,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [zoom >= 12] { line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_raceway-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_raceway-fill.svg"); line-pattern-width: 1.2; line-pattern-join: round; line-pattern-cap: round; @@ -2251,7 +2251,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ b/line-pattern-width: 4; b/line-pattern-type: repeat; b/line-pattern-alignment: global; - b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg"); + b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg"); b/line-pattern-cap: round; b/line-pattern-join: round; } @@ -2539,6 +2539,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ line-dasharray: 5,2; } } + [zoom >= 12] { #roads-fill, #bridges { dark/line-join: round; @@ -2764,7 +2765,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ b/line-pattern-width: 4; b/line-pattern-type: repeat; b/line-pattern-alignment: global; - b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg"); + b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg"); b/line-pattern-cap: round; b/line-pattern-join: round; } @@ -3559,7 +3560,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [int_surface = 'unpaved'] { line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg"); line-pattern-width: 2; [zoom >= 12] { line-pattern-width: 4; } [zoom >= 13] { line-pattern-width: 6; } @@ -3593,7 +3594,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [int_surface = 'unpaved'] { line-pattern-type: repeat; line-pattern-alignment: global; - line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg"); + line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg"); line-pattern-width: 1; [zoom >= 13] { line-pattern-width: 2; } [zoom >= 14] { line-pattern-width: 4; } diff --git a/style/tourism.mss b/style/tourism.mss index abe287b70..25968b112 100644 --- a/style/tourism.mss +++ b/style/tourism.mss @@ -16,7 +16,7 @@ line-width: 2.5 + @bridge-casing-width-z16; line-color: #000; line-join: round; - + [tunnel = 'yes'] { line-color: lighten(#000, 20%); } [zoom >= 17] { line-width: 4 + @bridge-casing-width-z17; } From 99ae2782f2bae94f66489396d344c546618b2191 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Fri, 10 May 2024 21:37:34 +0200 Subject: [PATCH 02/23] More trailing whitespace in styles --- style/amenity-points.mss | 4 ++-- style/tourism.mss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/style/amenity-points.mss b/style/amenity-points.mss index 5b224d6ea..d00562754 100644 --- a/style/amenity-points.mss +++ b/style/amenity-points.mss @@ -1476,8 +1476,8 @@ [zoom >= 18] { [feature = 'amenity_parking'] { marker-file: url('symbols/amenity/parking.svg'); } [feature = 'amenity_parking']["parking" = 'street_side'], - [feature = 'amenity_parking']["parking" = 'lane'] { - marker-file: url('symbols/amenity/parking_subtle.svg'); + [feature = 'amenity_parking']["parking" = 'lane'] { + marker-file: url('symbols/amenity/parking_subtle.svg'); } [feature = 'amenity_bicycle_parking'] { marker-file: url('symbols/amenity/bicycle_parking.svg'); } [feature = 'amenity_motorcycle_parking'] { marker-file: url('symbols/amenity/motorcycle_parking.svg'); } diff --git a/style/tourism.mss b/style/tourism.mss index 25968b112..cd98beb25 100644 --- a/style/tourism.mss +++ b/style/tourism.mss @@ -33,7 +33,7 @@ [tunnel = 'yes'][zoom >= 16] { line-color: lighten(@roller-coaster-casing, 20%); } - [zoom >= 16] { + [zoom >= 16] { line-color: @roller-coaster-casing; line-width: 2.5; } From c5153237c554f3505488dacc6a2ca6c602c46290 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Fri, 10 May 2024 21:37:42 +0200 Subject: [PATCH 03/23] More trailing whitespace in project.mml --- project.mml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project.mml b/project.mml index 8152046e5..0d044379c 100644 --- a/project.mml +++ b/project.mml @@ -200,7 +200,7 @@ Layer: CASE WHEN tags->'intermittent' IN ('yes') OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season') THEN 'yes' ELSE 'no' END AS int_intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') + CASE WHEN tunnel IN ('yes', 'culvert') OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge @@ -893,7 +893,7 @@ Layer: CASE WHEN tags->'intermittent' IN ('yes') OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season') THEN 'yes' ELSE 'no' END AS int_intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') + CASE WHEN tunnel IN ('yes', 'culvert') OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel, 'yes' AS bridge @@ -1623,7 +1623,7 @@ Layer: ) AS feature, CASE WHEN access IN ('private', 'no', 'customers', 'permit', 'delivery') THEN 'restricted' ELSE 'yes' END AS int_access, CASE - WHEN "natural" IN ('peak', 'volcano', 'saddle') + WHEN "natural" IN ('peak', 'volcano', 'saddle') OR tags->'mountain_pass' = 'yes' THEN CASE WHEN tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'ele')::NUMERIC @@ -2204,7 +2204,7 @@ Layer: CASE WHEN tags->'intermittent' IN ('yes') OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season') THEN 'yes' ELSE 'no' END AS int_intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') + CASE WHEN tunnel IN ('yes', 'culvert') OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel FROM planet_osm_line From 75ad76ee3e3befdb62c49c776c43608d1ffeed38 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Fri, 10 May 2024 21:41:00 +0200 Subject: [PATCH 04/23] Add CI check --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb8a37cab..dbcac0870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: scripts/indexes.py --notexist > /dev/null && scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null + - name: Check for trailing whitespace + run: | + ! grep --quiet ' $' style/*.mss project.mml import: needs: [syntax] runs-on: ubuntu-22.04 From 32486dcbc1645a91b4294cb6dee14064b929d138 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Fri, 10 May 2024 21:44:32 +0200 Subject: [PATCH 05/23] more trailing spaces --- style/fonts.mss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style/fonts.mss b/style/fonts.mss index e4ca039cd..7dedebefb 100644 --- a/style/fonts.mss +++ b/style/fonts.mss @@ -117,7 +117,7 @@ A regular style. "Noto Sans Vai Regular", "Noto Sans Yi Regular", "Noto Sans CJK JP Regular", - + "Noto Serif Tibetan Regular", "Noto Emoji Regular", From 5e257af63cf74959ee1cb60b4c84bfa53d49bc3c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 09:58:40 +0200 Subject: [PATCH 06/23] Use `zbeekman/EditorConfig-Action` to validate editorconfig entirely --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbcac0870..9ca7e5d71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,9 +49,9 @@ jobs: scripts/indexes.py --notexist > /dev/null && scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - - name: Check for trailing whitespace - run: | - ! grep --quiet ' $' style/*.mss project.mml + - name: Validate conformation to editorconfig + uses: zbeekman/EditorConfig-Action@v1 + import: needs: [syntax] runs-on: ubuntu-22.04 From 4fb1c4ff39135da10235b2c27134a645a3759b17 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 09:59:31 +0200 Subject: [PATCH 07/23] no versioning... --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ca7e5d71..f97b6f5c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - name: Validate conformation to editorconfig - uses: zbeekman/EditorConfig-Action@v1 + uses: zbeekman/EditorConfig-Action import: needs: [syntax] From 8e71f53879c2fbde0d5ca93281daf243fff3bbbc Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:00:49 +0200 Subject: [PATCH 08/23] master branch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f97b6f5c4..52c97bd94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - name: Validate conformation to editorconfig - uses: zbeekman/EditorConfig-Action + uses: zbeekman/EditorConfig-Action@master import: needs: [syntax] From 22a82a5e92d61a8975f48f71c8f47d9f1dbd15d7 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:19:44 +0200 Subject: [PATCH 09/23] cache and download editorconfig-checker --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c97bd94..1fa450f2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,15 @@ jobs: run: npm install -g carto@1.2.0 - name: Set up shell run: set -o pipefail + - name: Cache editorconfig checker + id: cache-editorconfig-checker + uses: actions/cache@v4 + with: + path: bin/ec-linux-amd64 + key: linux-amd64-editorconfig-checker-v3.0.1 + - name: Set up editorconfig-checker + if: steps.cache-editorconfig-checker.outputs.cache-hit != 'true' + run: curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.0.1/ec-linux-amd64.tar.gz && tar xzf ec-linux-amd64.tar.gz - name: Validate YAML files run: | find . \( -type f -name '*.yaml' -o -name '*.yml' -o -name '*.mml' \) -print0 \ @@ -50,7 +59,7 @@ jobs: scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - name: Validate conformation to editorconfig - uses: zbeekman/EditorConfig-Action@master + uses: bin/editorconfig-checker import: needs: [syntax] From cb7bd8761b072b5afdf71b1c4582542da942e19a Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:20:24 +0200 Subject: [PATCH 10/23] run --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fa450f2f..3691edf36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - name: Validate conformation to editorconfig - uses: bin/editorconfig-checker + run: bin/editorconfig-checker import: needs: [syntax] From 77abd0ccb70723a093a214598f5a258d44cb44c9 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:29:43 +0200 Subject: [PATCH 11/23] Try megalinter --- .github/workflows/ci.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3691edf36..ca0e79726 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,15 @@ jobs: run: npm install -g carto@1.2.0 - name: Set up shell run: set -o pipefail - - name: Cache editorconfig checker - id: cache-editorconfig-checker - uses: actions/cache@v4 - with: - path: bin/ec-linux-amd64 - key: linux-amd64-editorconfig-checker-v3.0.1 - - name: Set up editorconfig-checker - if: steps.cache-editorconfig-checker.outputs.cache-hit != 'true' - run: curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.0.1/ec-linux-amd64.tar.gz && tar xzf ec-linux-amd64.tar.gz +# - name: Cache editorconfig checker +# id: cache-editorconfig-checker +# uses: actions/cache@v4 +# with: +# path: bin/ec-linux-amd64 +# key: linux-amd64-editorconfig-checker-v3.0.1 +# - name: Set up editorconfig-checker +# if: steps.cache-editorconfig-checker.outputs.cache-hit != 'true' +# run: curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.0.1/ec-linux-amd64.tar.gz && tar xzf ec-linux-amd64.tar.gz - name: Validate YAML files run: | find . \( -type f -name '*.yaml' -o -name '*.yml' -o -name '*.mml' \) -print0 \ @@ -58,8 +58,17 @@ jobs: scripts/indexes.py --notexist > /dev/null && scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - - name: Validate conformation to editorconfig - run: bin/editorconfig-checker +# - name: Validate conformation to editorconfig +# run: bin/editorconfig-checker + - name: MegaLinter + uses: oxsecurity/megalinter@v7 + env: + VALIDATE_ALL_CODEBASE: true + APPLY_FIXES: true + DISABLE: 'COPYPASTE,SPELL' + FILEIO_REPORTER: false + SHOW_ELAPSED_TIME: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} import: needs: [syntax] From a681584b2108fbcd764077060e8d670645d97f3c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:34:15 +0200 Subject: [PATCH 12/23] Only enable editorconfig --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca0e79726..e641e00a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: env: VALIDATE_ALL_CODEBASE: true APPLY_FIXES: true - DISABLE: 'COPYPASTE,SPELL' + EDITORCONFIG: 'EDITORCONFIG' FILEIO_REPORTER: false SHOW_ELAPSED_TIME: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dd911a4c3a57eacb433ad8f36b97b643907dccaa Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:39:20 +0200 Subject: [PATCH 13/23] use Docker run command for linter --- .github/workflows/ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e641e00a2..1e297118a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,17 +58,8 @@ jobs: scripts/indexes.py --notexist > /dev/null && scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null -# - name: Validate conformation to editorconfig -# run: bin/editorconfig-checker - - name: MegaLinter - uses: oxsecurity/megalinter@v7 - env: - VALIDATE_ALL_CODEBASE: true - APPLY_FIXES: true - EDITORCONFIG: 'EDITORCONFIG' - FILEIO_REPORTER: false - SHOW_ELAPSED_TIME: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Validate conformation to editorconfig + run: docker run --rm --volume $PWD:/check mstruebing/editorconfig-checker import: needs: [syntax] From ee85762ce1653aceb7d777495ed449568d5e3823 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:45:59 +0200 Subject: [PATCH 14/23] linting fixes changelog --- CHANGELOG.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 724cb9089..2323b8e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -909,17 +909,17 @@ and there are now three classes: paved, unpaved and unknown surface - Unification of footway/path and rendering surface of them - The mess that is highway=path is well-known, and it is necessary - to do some kind of processing as a data consumer. A distinction is - now made between paved and unpaved footways. + The mess that is highway=path is well-known, and it is necessary + to do some kind of processing as a data consumer. A distinction is + now made between paved and unpaved footways. ### Changes - Mapnik 3 preperations - The style is not yet fullly tested with Mapnik 3 and we don't claim to - support it, but several bugs were fixed. Most of the work was done on - the Mapnik side + The style is not yet fullly tested with Mapnik 3 and we don't claim to + support it, but several bugs were fixed. Most of the work was done on + the Mapnik side - Power area colour adjusted @@ -932,9 +932,9 @@ Shapefiles are now used for Antartic ice sheets - Rendering minor roads and service rail later for mid-zoom clarity - As all residential, unclassified, and service roads in a city became - mapped the rendered view became over-crowded, bloblike, and difficult - to read. + As all residential, unclassified, and service roads in a city became + mapped the rendered view became over-crowded, bloblike, and difficult + to read. - Rendering of Antartic ice sheets from shapefiles From 067989d0741d5adf746e9e9224a1df14104aa26c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:46:29 +0200 Subject: [PATCH 15/23] linting fixes contributing --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c71a25266..f4e77c30d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,8 +29,8 @@ but to provide an overview. Some changes benefit from a review over a wider area and many zooms, where static images might not be sufficient and a demo layer is necessary. pnorman has a server - which can host layers and has some data from parts of the world loaded. Before - requesting this in a pull request, make sure that it is in a stable condition. +which can host layers and has some data from parts of the world loaded. Before +requesting this in a pull request, make sure that it is in a stable condition. ## Easy pickings From 619a946682388186efad9cbe8cd4da35ea172b17 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:46:50 +0200 Subject: [PATCH 16/23] linting fixes docker --- DOCKER.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DOCKER.md b/DOCKER.md index 8d6964d83..358941a41 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -12,9 +12,9 @@ to be able to run Docker containers. You also need Docker Compose, which should Docker itself. Otherwise, you need to [install Docker Compose manually](https://docs.docker.com/compose/install/). * You need sufficient disk space of _several Gigabytes_. - * Docker creates a disk image for its virtual machine that holds the virtualised operating system and the containers. - * The format (Docker.raw, Docker.qcow2, \*.vhdx, etc.) depends on the host system. It can be a sparse file allocating large amounts of disk space, but still the physical size starts with 2-3 GB for the virtual OS and grows to 6-7 GB when filled with the containers needed for the database, Kosmtik, and a chosen small region of OSM data. - * An additional 1-2 GB are needed for shapefiles to be downloaded and stored in the openstreetmap-carto/data repository. + * Docker creates a disk image for its virtual machine that holds the virtualised operating system and the containers. + * The format (Docker.raw, Docker.qcow2, \*.vhdx, etc.) depends on the host system. It can be a sparse file allocating large amounts of disk space, but still the physical size starts with 2-3 GB for the virtual OS and grows to 6-7 GB when filled with the containers needed for the database, Kosmtik, and a chosen small region of OSM data. + * An additional 1-2 GB are needed for shapefiles to be downloaded and stored in the openstreetmap-carto/data repository. ## Quick start From 13e8556e28ab88366a8261604a65ba55d123fe4b Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:49:43 +0200 Subject: [PATCH 17/23] linting fixes install --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 74029fb1a..22dc3bfc9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ scripts/get-fonts.sh For development, a style design studio is needed. * [Kosmtik](https://github.com/kosmtik/kosmtik) - Kosmtik can be launched with `node index.js serve path/to/openstreetmap-carto/project.mml` - * The 0.0.17 release of Kosmtik is not enough because we need up-to-date CartoCSS and Mapnik versions. To install the current master branch of Kosmtik, you can clone the Kosmtik repository and execute `npm install` within it. + * The 0.0.17 release of Kosmtik is not enough because we need up-to-date CartoCSS and Mapnik versions. To install the current master branch of Kosmtik, you can clone the Kosmtik repository and execute `npm install` within it. * [TileMill](https://tilemill-project.github.io/tilemill/) is not officially supported, but you may be able to use a recent TileMill version by copying or symlinking the project directly into your Mapbox/project directory. To display *any* map, a database containing OpenStreetMap data and some utilities are required: From 70eb3244a9c0241eb7b7940a479e26c0930fa927 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:49:56 +0200 Subject: [PATCH 18/23] linting fixes readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2b9a282c..1fcff4b56 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The general purpose, the cartographic design goals and guidelines for this style These stylesheets can be used in your own cartography projects, and are designed to be easily customised. They work with [Kosmtik](https://github.com/kosmtik/kosmtik) - and also with the command-line [CartoCSS](https://github.com/mapbox/carto) processor. +and also with the command-line [CartoCSS](https://github.com/mapbox/carto) processor. Since August 2013 these stylesheets have been used on the [OSMF tileservers](https://operations.osmfoundation.org/policies/tiles/) (tile.openstreetmap.org), and are updated from each point release. They supersede the previous [XML-based stylesheets](https://github.com/openstreetmap/mapnik-stylesheets). From bfd1460969ca0b0f1166326afe4030879588f52a Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:50:18 +0200 Subject: [PATCH 19/23] linting fixes openstreetmap-carto.lua --- openstreetmap-carto.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openstreetmap-carto.lua b/openstreetmap-carto.lua index 8fc2c8521..ea73f85e7 100644 --- a/openstreetmap-carto.lua +++ b/openstreetmap-carto.lua @@ -39,7 +39,7 @@ local polygon_keys = { -- Objects with any of the following key/value combinations will be treated as linestring local linestring_values = { - golf = {cartpath = true, hole = true, path = true}, + golf = {cartpath = true, hole = true, path = true}, emergency = {designated = true, destination = true, no = true, official = true, yes = true}, historic = {citywalls = true}, leisure = {track = true, slipway = true}, @@ -303,7 +303,7 @@ function filter_tags_generic(tags) end end - -- Filter out objects that have no tags after deleting + -- Filter out objects that have no tags after deleting if next(tags) == nil then return 1, {} end @@ -403,7 +403,7 @@ function isarea (tags) return tags["area"] == "yes" and 1 or 0 end - -- Search through object's tags + -- Search through object's tags for k, v in pairs(tags) do -- Check if it has a polygon key and not a linestring override, or a polygon k=v for _, ptag in ipairs(polygon_keys) do From 6b5eeb91f911dcc8cd4f91b71de2d31872130771 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:56:39 +0200 Subject: [PATCH 20/23] disable indent size check, too many style errors --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e297118a..6d2804a0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - name: Validate conformation to editorconfig - run: docker run --rm --volume $PWD:/check mstruebing/editorconfig-checker + run: docker run --rm --volume $PWD:/check mstruebing/editorconfig-checker ec -disable-indent-size import: needs: [syntax] From a4be6e45d6200e827c60bb5ae57c6dcc1c8b57f8 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:56:46 +0200 Subject: [PATCH 21/23] newline in scripts/readme --- scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index c2f646363..b27ed891d 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,3 +1,3 @@ These scripts are necessary and useful solely during making changes to the map style. -There are unnecessary for map rendering. \ No newline at end of file +There are unnecessary for map rendering. From 7642f3ff7c252b30a52eecc5d512720a99b0b0eb Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 10:58:21 +0200 Subject: [PATCH 22/23] last newline --- .github/workflows/ci.yml | 9 --------- symbols/generating_patterns/scrub.md | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d2804a0d..d775dd3ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,6 @@ jobs: run: npm install -g carto@1.2.0 - name: Set up shell run: set -o pipefail -# - name: Cache editorconfig checker -# id: cache-editorconfig-checker -# uses: actions/cache@v4 -# with: -# path: bin/ec-linux-amd64 -# key: linux-amd64-editorconfig-checker-v3.0.1 -# - name: Set up editorconfig-checker -# if: steps.cache-editorconfig-checker.outputs.cache-hit != 'true' -# run: curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.0.1/ec-linux-amd64.tar.gz && tar xzf ec-linux-amd64.tar.gz - name: Validate YAML files run: | find . \( -type f -name '*.yaml' -o -name '*.yml' -o -name '*.mml' \) -print0 \ diff --git a/symbols/generating_patterns/scrub.md b/symbols/generating_patterns/scrub.md index 3809ab907..c0e0675e7 100644 --- a/symbols/generating_patterns/scrub.md +++ b/symbols/generating_patterns/scrub.md @@ -6,4 +6,4 @@ Generated SVG image is sanitized for use with Mapnik by the script svg_pattern.s The final file is scrub.svg -Because of a [problem in the rendering stack](https://github.com/gravitystorm/openstreetmap-carto/issues/2750) we don’t use the SVG directly, but convert it to PNG: see symbols/scrub.png \ No newline at end of file +Because of a [problem in the rendering stack](https://github.com/gravitystorm/openstreetmap-carto/issues/2750) we don’t use the SVG directly, but convert it to PNG: see symbols/scrub.png From 27b7a27f700a84e05a368b1787c54b6a961d5fd4 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 11 May 2024 14:30:13 +0200 Subject: [PATCH 23/23] Update ci.yml --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d775dd3ff..eb8a37cab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,9 +49,6 @@ jobs: scripts/indexes.py --notexist > /dev/null && scripts/indexes.py --null > /dev/null && scripts/indexes.py --null > /dev/null - - name: Validate conformation to editorconfig - run: docker run --rm --volume $PWD:/check mstruebing/editorconfig-checker ec -disable-indent-size - import: needs: [syntax] runs-on: ubuntu-22.04