|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
| 3 | +source scripts/formatting.sh |
| 4 | + |
3 | 5 | echo "********************************"
|
4 | 6 | echo "Running feature flag checks"
|
5 | 7 | echo "********************************"
|
@@ -120,24 +122,24 @@ function perform_checks_on_feature_flags() {
|
120 | 122 | in_array=$(item_in_array "$element" "${imported_classes[@]}")
|
121 | 123 | if [[ $in_array -ne 1 ]]; then
|
122 | 124 | failed_checks=$((failed_checks + 1))
|
123 |
| - echo "$element is not imported in the constructor argument in $file_path at line $imports_line_number" |
| 125 | + echo_error "$element is not imported in the constructor argument in $file_path at line $imports_line_number" |
124 | 126 | fi
|
125 | 127 | done
|
126 | 128 |
|
127 | 129 | for element in "${feature_flags[@]}"; do
|
128 | 130 | in_array=$(item_in_array "$element" "${flags_added_to_map[@]}")
|
129 | 131 | if [[ $in_array -ne 1 ]]; then
|
130 | 132 | failed_checks=$((failed_checks + 1))
|
131 |
| - echo "$element is not added to the logging map in $file_path at line $flags_map_line_number" |
| 133 | + echo_error "$element is not added to the logging map in $file_path at line $flags_map_line_number" |
132 | 134 | fi
|
133 | 135 | done
|
134 | 136 |
|
135 | 137 | if [[ $failed_checks -eq 0 ]]; then
|
136 |
| - echo "Feature flag checks completed successfully" |
| 138 | + echo_success "Feature flag checks completed successfully" |
137 | 139 | exit 0
|
138 | 140 | else
|
139 | 141 | echo "********************************"
|
140 |
| - echo "Feature flag issues found." |
| 142 | + echo_error "Feature flag issues found." |
141 | 143 | echo "Please fix the above issues."
|
142 | 144 | echo "********************************"
|
143 | 145 | exit 1
|
|
0 commit comments