Skip to content

Commit 24933e9

Browse files
committed
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org into production
2 parents d05735a + 3b1e7d9 commit 24933e9

77 files changed

Lines changed: 1893 additions & 337 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sql/.sqlfluff

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,57 @@ indented_using_on = False
7373
indented_on_contents = True
7474
template_blocks_indent = True
7575

76+
# Layout configuration
77+
# See https://docs.sqlfluff.com/en/stable/layout.html#configuring-layout-and-spacing
78+
[sqlfluff:layout:type:comma]
79+
spacing_before = touch
80+
line_position = trailing
81+
82+
[sqlfluff:layout:type:binary_operator]
83+
line_position = trailing
84+
85+
[sqlfluff:layout:type:statement_terminator]
86+
spacing_before = touch
87+
line_position = trailing
88+
89+
[sqlfluff:layout:type:end_of_file]
90+
spacing_before = touch
91+
92+
[sqlfluff:layout:type:set_operator]
93+
line_position = alone:strict
94+
95+
[sqlfluff:layout:type:start_bracket]
96+
spacing_after = touch
97+
98+
[sqlfluff:layout:type:end_bracket]
99+
spacing_before = touch
100+
101+
[sqlfluff:layout:type:start_square_bracket]
102+
spacing_after = touch
103+
104+
[sqlfluff:layout:type:end_square_bracket]
105+
spacing_before = touch
106+
107+
[sqlfluff:layout:type:casting_operator]
108+
spacing_before = touch
109+
spacing_after = touch
110+
111+
[sqlfluff:layout:type:comparison_operator]
112+
spacing_within = touch
113+
line_position = leading
114+
115+
[sqlfluff:layout:type:object_reference]
116+
spacing_within = inline
117+
118+
[sqlfluff:layout:type:comment]
119+
spacing_before = any
120+
spacing_after = any
121+
122+
# Template loop tokens shouldn't dictate spacing around them.
123+
[sqlfluff:layout:type:template_loop]
124+
spacing_before = any
125+
spacing_after = any
126+
76127
[sqlfluff:templater]
77128
unwrap_wrapped_queries = True
78129

@@ -84,7 +135,6 @@ apply_dbt_builtins = True
84135
tab_space_size = 2
85136
max_line_length = 80
86137
indent_unit = space
87-
comma_style = trailing
88138
allow_scalar = True
89139
single_table_references = consistent
90140
unquoted_identifiers_policy = all
@@ -93,6 +143,9 @@ unquoted_identifiers_policy = all
93143
[sqlfluff:rules:L003]
94144
hanging_indents = True
95145

146+
# TODO - remove once 1.4.1 fully rolled out as this has been replaced by
147+
# [sqlfluff:layout:type:binary_operator]
148+
# line_position = trailing
96149
[sqlfluff:rules:L007]
97150
operator_new_lines = before
98151

sql/2019/cdn/17_02f.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
SELECT
55
client,
6-
COUNTIF(jscdnHits > 0 ) AS hasJSCDNHits,
6+
COUNTIF(jscdnHits > 0) AS hasJSCDNHits,
77
COUNT(0) AS hits,
8-
ROUND(100 * COUNTIF(jscdnHits > 0 ) / COUNT(0), 2) AS pct
8+
ROUND(100 * COUNTIF(jscdnHits > 0) / COUNT(0), 2) AS pct
99
FROM
1010
(
1111
SELECT

sql/2019/javascript/01_01c.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ FROM (
1616
FROM
1717
`httparchive.summary_pages.2019_07_01_*`
1818
GROUP BY
19-
bin) )
19+
bin))
2020
ORDER BY
2121
bin

sql/2019/javascript/01_01d.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM (
1919
`httparchive.summary_pages.2019_07_01_*`
2020
GROUP BY
2121
bin,
22-
client ) )
22+
client))
2323
ORDER BY
2424
bin,
2525
client

sql/2019/media/04_09a.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ SELECT client,
66
COUNTIF(chHTML AND chHeader) AS chBothCount,
77
COUNTIF(chHTML OR chHeader) AS chEitherCount,
88
COUNT(0) AS total,
9-
ROUND(100 * COUNTIF( chHTML) / COUNT(0), 2) AS chHTMLPct,
10-
ROUND(100 * COUNTIF( chHeader) / COUNT(0), 2) AS chHeaderPct,
11-
ROUND(100 * COUNTIF( chHTML AND chHeader) / COUNT(0), 2) AS chBothPct,
12-
ROUND(100 * COUNTIF( chHTML OR chHeader) / COUNT(0), 2) AS chEitherPct
9+
ROUND(100 * COUNTIF(chHTML) / COUNT(0), 2) AS chHTMLPct,
10+
ROUND(100 * COUNTIF(chHeader) / COUNT(0), 2) AS chHeaderPct,
11+
ROUND(100 * COUNTIF(chHTML AND chHeader) / COUNT(0), 2) AS chBothPct,
12+
ROUND(100 * COUNTIF(chHTML OR chHeader) / COUNT(0), 2) AS chEitherPct
1313
FROM
1414
(
1515
SELECT

sql/2019/media/04_09b.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ FROM
1616
WHERE
1717
date = '2019-07-01' AND
1818
firstHtml AND
19-
( REGEXP_CONTAINS(body, r'(?is)<meta[^><]*Accept-CH\b') OR
20-
REGEXP_CONTAINS(respOtherHeaders, r'(?is)Accept-CH = ') )
19+
(REGEXP_CONTAINS(body, r'(?is)<meta[^><]*Accept-CH\b') OR
20+
REGEXP_CONTAINS(respOtherHeaders, r'(?is)Accept-CH = '))
2121
)
2222
GROUP BY
2323
client,

sql/2019/media/04_09c.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ FROM
2020
WHERE
2121
date = '2019-07-01' AND
2222
firstHtml AND
23-
( REGEXP_CONTAINS(body, r'(?im)<meta[^><]*Accept-CH\b') OR
24-
REGEXP_CONTAINS(respOtherHeaders, r'(?im)Accept-CH = ') )
23+
(REGEXP_CONTAINS(body, r'(?im)<meta[^><]*Accept-CH\b') OR
24+
REGEXP_CONTAINS(respOtherHeaders, r'(?im)Accept-CH = '))
2525
)
2626
GROUP BY
2727
client,

sql/2019/mobile-web/12_17.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ FROM (
1616
FROM
1717
`httparchive.summary_pages.2019_07_01_mobile`
1818
GROUP BY
19-
bin ) )
19+
bin))
2020
ORDER BY
2121
bin

sql/2019/security/08_21.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM (
1212
client,
1313
COUNT(0) AS total,
1414
COUNTIF(REGEXP_CONTAINS(respOtherHeaders, r'(?i)\Wcontent-security-policy =')) AS csp_count,
15-
COUNTIF(REGEXP_CONTAINS(LOWER(REGEXP_EXTRACT(respOtherHeaders, r'(?i)\Wcontent-security-policy =([^,]+)') ), 'upgrade-insecure-requests')) AS csp_upgrade_insecure_requests_count
15+
COUNTIF(REGEXP_CONTAINS(LOWER(REGEXP_EXTRACT(respOtherHeaders, r'(?i)\Wcontent-security-policy =([^,]+)')), 'upgrade-insecure-requests')) AS csp_upgrade_insecure_requests_count
1616
FROM
1717
`httparchive.almanac.requests`
1818
WHERE

sql/2019/security/08_35-37.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SELECT
88
CASE
99
WHEN (STRPOS(LOWER(policy), 'samesite=strict') > 1 OR
1010
STRPOS(LOWER(policy), 'samesite=lax') > 0 OR
11-
STRPOS(LOWER(policy), 'samesite=none') > 1 )
11+
STRPOS(LOWER(policy), 'samesite=none') > 1)
1212
THEN LENGTH(policy)
1313
WHEN STRPOS(policy, '=') > 1
1414
THEN STRPOS(LOWER(policy), '=') - 1

0 commit comments

Comments
 (0)