Skip to content

Commit 79ac948

Browse files
authored
ci: support config properties that are nested and that have numbers in their names (#605)
For some reason I didn't consider either of these 🤦
1 parent 08591ca commit 79ac948

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ci/bin/lint-configs.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ def check_file_for_repeated_config_properties(file)
1919
# ignore conditions for now
2020
next if in_condition
2121

22-
line.match(/(config\.[a-zA-Z_]+) = /) do |match|
22+
# this setting is included twice in the production.rb generated by Rails 7.2
23+
# since the value is different depending on if you use Apache or NGINX,
24+
# but we don't use this feature at all by default and its not worth us actively
25+
# removing the comments in case an app does want to use it, so for now we're
26+
# just ignoring it here
27+
#
28+
# TODO: remove this once we're on Rails 8.0+, as it no longer includes these lines
29+
next if line.include?("# config.action_dispatch.x_sendfile_header")
30+
31+
line.match(/(config\.[\w.]+) = /) do |match|
2332
duplicates << match[1] if seen.include?(match[1])
2433

2534
seen << match[1]

0 commit comments

Comments
 (0)