Skip to content

Commit 6cc4ddb

Browse files
committed
Fix luacheck reported issues
1 parent 7c96822 commit 6cc4ddb

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

themes/shortbread_v1_gen/topics/boundaries.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,17 @@ end)
193193
local function gen_commands(sql, level)
194194
local c = gen_config[level]
195195

196-
table.insert(sql, 'CREATE TABLE {schema}.boundaries_' .. level .. '_new (LIKE {schema}.boundaries_' .. level .. ' INCLUDING IDENTITY)')
196+
table.insert(sql, 'CREATE TABLE {schema}.boundaries_' .. level ..
197+
'_new (LIKE {schema}.boundaries_' .. level .. ' INCLUDING IDENTITY)')
197198

198199
table.insert(sql, [[
199200
WITH simplified AS (
200201
SELECT way_ids, relation_ids, admin_level, maritime, disputed, ST_SimplifyVW(geom, ]] .. c.simplify .. [[) AS geom
201202
FROM {schema}.boundaries ]] .. c.condition .. [[
202203
)
203204
INSERT INTO {schema}.boundaries_]] .. level .. [[_new (way_ids, relation_ids, admin_level, maritime, disputed, geom)
204-
SELECT way_ids, relation_ids, admin_level, maritime, disputed, geom FROM simplified WHERE ST_Length(geom) > ]] .. c.minlength)
205+
SELECT way_ids, relation_ids, admin_level, maritime, disputed, geom
206+
FROM simplified WHERE ST_Length(geom) > ]] .. c.minlength)
205207

206208
table.insert(sql, 'ANALYZE {schema}.boundaries_' .. level .. '_new')
207209
table.insert(sql, 'CREATE INDEX ON {schema}.boundaries_' .. level .. '_new USING GIST (geom)')

themes/shortbread_v1_gen/topics/streets.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ themepark:add_proc('gen', function(data)
424424
description = 'Merge street lines for medium zoom levels',
425425
transaction = true,
426426
sql = {
427-
themepark.expand_template('CREATE TABLE {schema}.streets_med_new (LIKE {schema}.streets_med INCLUDING IDENTITY)'),
427+
themepark.expand_template([[
428+
CREATE TABLE {schema}.streets_med_new
429+
(LIKE {schema}.streets_med INCLUDING IDENTITY)]]),
428430
themepark.expand_template([[
429431
CREATE OR REPLACE FUNCTION osm2pgsql_shortbread_streets_med() RETURNS void AS $$
430432
DECLARE
@@ -469,7 +471,9 @@ $$ LANGUAGE plpgsql]]),
469471
description = 'Merge street lines for low zoom levels',
470472
transaction = true,
471473
sql = {
472-
themepark.expand_template('CREATE TABLE {schema}.streets_low_new (LIKE {schema}.streets_low INCLUDING IDENTITY)'),
474+
themepark.expand_template([[
475+
CREATE TABLE {schema}.streets_low_new
476+
(LIKE {schema}.streets_low INCLUDING IDENTITY)]]),
473477
themepark.expand_template([[
474478
WITH
475479
merged AS

themes/shortbread_v1_gen/topics/water.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ themepark:add_proc('gen', function(data)
268268
if_has_rows = themepark.expand_template('SELECT 1 FROM {schema}.expire_water_lines LIMIT 1'),
269269
transaction = true,
270270
sql = {
271-
themepark.expand_template('CREATE TABLE {schema}.water_lines_gen_new (LIKE {schema}.water_lines_gen INCLUDING IDENTITY)'),
271+
themepark.expand_template([[
272+
CREATE TABLE {schema}.water_lines_gen_new
273+
(LIKE {schema}.water_lines_gen INCLUDING IDENTITY)]]),
272274
themepark.expand_template([[
273275
WITH merged AS
274276
(SELECT ]] .. name_list .. [[, kind, tunnel, bridge, ST_LineMerge(ST_Collect(geom)) AS geom

0 commit comments

Comments
 (0)