File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
tools/rail_inspector/lib/rail_inspector Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def configuration(rails_path)
25
25
checker = Configuring . new ( rails_path )
26
26
checker . check
27
27
28
- puts checker . errors unless checker . errors . empty ?
28
+ puts checker . error_message if checker . errors . any ?
29
29
exit checker . errors . empty? unless options [ :autocorrect ]
30
30
31
31
checker . write!
Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ def write!
83
83
File . write ( doc_path , doc . to_s )
84
84
end
85
85
86
+ def error_message
87
+ return unless errors . any?
88
+
89
+ errors . join ( "\n " ) + "\n " +
90
+ "Make sure new configurations are added to configuring.md#rails-general-configuration in alphabetical order.\n " +
91
+ "Errors may be autocorrectable with the --autocorrect flag"
92
+ end
93
+
86
94
private
87
95
def doc_path
88
96
@rails_path . join ( DOC_PATH )
You can’t perform that action at this time.
0 commit comments