mirror of
https://github.com/tw93/Mole.git
synced 2026-02-08 18:29:19 +00:00
style: standardize punctuation across codebase
- Replace parentheses with commas for supplementary info - Use commas instead of em-dashes for separators - Update bullet points from - to * in some contexts - Improve version extraction regex with fallback logic
This commit is contained in:
@@ -78,7 +78,7 @@ show_optimization_summary() {
|
||||
local total_applied=$((safe_count + confirm_count))
|
||||
|
||||
if [[ "${MOLE_DRY_RUN:-0}" == "1" ]]; then
|
||||
summary_title="Dry Run Complete - No Changes Made"
|
||||
summary_title="Dry Run Complete, No Changes Made"
|
||||
summary_details+=("Would apply ${YELLOW}${total_applied:-0}${NC} optimizations")
|
||||
summary_details+=("Run without ${YELLOW}--dry-run${NC} to apply these changes")
|
||||
else
|
||||
@@ -115,9 +115,9 @@ show_optimization_summary() {
|
||||
fi
|
||||
|
||||
if [[ -n "$key_stat" ]]; then
|
||||
summary_details+=("Applied ${GREEN}${total_applied:-0}${NC} optimizations — ${key_stat}")
|
||||
summary_details+=("Applied ${GREEN}${total_applied:-0}${NC} optimizations, ${key_stat}")
|
||||
else
|
||||
summary_details+=("Applied ${GREEN}${total_applied:-0}${NC} optimizations — all services tuned")
|
||||
summary_details+=("Applied ${GREEN}${total_applied:-0}${NC} optimizations, all services tuned")
|
||||
fi
|
||||
|
||||
local summary_line3=""
|
||||
@@ -126,11 +126,11 @@ show_optimization_summary() {
|
||||
if [[ -n "${AUTO_FIX_DETAILS:-}" ]]; then
|
||||
local detail_join
|
||||
detail_join=$(echo "${AUTO_FIX_DETAILS}" | paste -sd ", " -)
|
||||
[[ -n "$detail_join" ]] && summary_line3+=" — ${detail_join}"
|
||||
[[ -n "$detail_join" ]] && summary_line3+=": ${detail_join}"
|
||||
fi
|
||||
summary_details+=("$summary_line3")
|
||||
fi
|
||||
summary_details+=("System fully optimized — faster, more secure and responsive")
|
||||
summary_details+=("System fully optimized")
|
||||
fi
|
||||
|
||||
print_summary_block "$summary_title" "${summary_details[@]}"
|
||||
@@ -226,12 +226,12 @@ cleanup_path() {
|
||||
|
||||
if [[ "$removed" == "true" ]]; then
|
||||
if [[ -n "$size_display" ]]; then
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} $label ${GREEN}(${size_display})${NC}"
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} $label${NC}, ${GREEN}${size_display}${NC}"
|
||||
else
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} $label"
|
||||
fi
|
||||
else
|
||||
echo -e "${GRAY}${ICON_WARNING}${NC} Skipped $label ${GRAY}(grant Full Disk Access to your terminal and retry)${NC}"
|
||||
echo -e "${GRAY}${ICON_WARNING}${NC} Skipped $label${GRAY}, grant Full Disk Access to your terminal and retry${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ collect_security_fix_actions() {
|
||||
fi
|
||||
if [[ "${GATEKEEPER_DISABLED:-}" == "true" ]]; then
|
||||
if ! is_whitelisted "gatekeeper"; then
|
||||
SECURITY_FIXES+=("gatekeeper|Enable Gatekeeper (App download protection)")
|
||||
SECURITY_FIXES+=("gatekeeper|Enable Gatekeeper, app download protection")
|
||||
fi
|
||||
fi
|
||||
if touchid_supported && ! touchid_configured; then
|
||||
@@ -304,7 +304,7 @@ apply_firewall_fix() {
|
||||
FIREWALL_DISABLED=false
|
||||
return 0
|
||||
fi
|
||||
echo -e " ${GRAY}${ICON_WARNING}${NC} Failed to enable firewall (check permissions)"
|
||||
echo -e " ${GRAY}${ICON_WARNING}${NC} Failed to enable firewall, check permissions"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ apply_touchid_fix() {
|
||||
|
||||
perform_security_fixes() {
|
||||
if ! ensure_sudo_session "Security changes require admin access"; then
|
||||
echo -e "${GRAY}${ICON_WARNING}${NC} Skipped security fixes (sudo denied)"
|
||||
echo -e "${GRAY}${ICON_WARNING}${NC} Skipped security fixes, sudo denied"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -391,7 +391,7 @@ main() {
|
||||
|
||||
# Dry-run indicator.
|
||||
if [[ "${MOLE_DRY_RUN:-0}" == "1" ]]; then
|
||||
echo -e "${YELLOW}${ICON_DRY_RUN} DRY RUN MODE${NC} - No files will be modified\n"
|
||||
echo -e "${YELLOW}${ICON_DRY_RUN} DRY RUN MODE${NC}, No files will be modified\n"
|
||||
fi
|
||||
|
||||
if ! command -v jq > /dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user