-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.shellcheckrc
More file actions
53 lines (43 loc) · 2.13 KB
/
.shellcheckrc
File metadata and controls
53 lines (43 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# .shellcheckrc - Pi-Router + NAS Server shellcheck config
# Multi-Device Setup: 552 Shell-Scripts (Pi 5: ~249, NAS: ~303)
# Best Practices 2025 compliant
# Optimized for ShellCheck 0.9.0+ (Last reviewed: 12. Dezember 2025)
#
# References:
# - https://www.shellcheck.net/wiki/Directive
# - https://www.shellcheck.net/wiki/Optional
# - https://man.archlinux.org/man/extra/shellcheck/shellcheck.1.en
# ============================================================================
# DISABLED CHECKS
# ============================================================================
# SC1090: Can't follow non-constant source
# SC1091: Not following sourced file
# Rationale: Scripts use dynamic library paths (e.g., ${SCRIPT_DIR}/../lib/)
# shellcheck cannot resolve these at static analysis time
# Example: source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../lib/logging.sh"
disable=SC1090,SC1091
# ============================================================================
# OPTIONAL CHECKS
# ============================================================================
# NOT using enable=all (Best Practice 2025)
# Reason: enable=all activates subjective/conflicting optional checks
# meant for discovery only, not production
# Instead: Selectively enable specific optional checks if needed
#
# Available optional checks (use shellcheck --list-optional):
# - avoid-nullary-conditions, deprecate-which, quote-safe-variables, etc.
# No optional checks enabled (Production default)
# ============================================================================
# CONFIGURATION
# ============================================================================
# Shell dialect (Raspberry Pi OS Bookworm: bash 5.2.15, Ubuntu 24.04: bash 5.2.21)
shell=bash
# Source path for library resolution
# SCRIPTDIR = directory of currently checked script
source-path=SCRIPTDIR
# Allow following source statements (Best Practice 2025)
# Safely enables shellcheck to open sourced files where possible
external-sources=true
# Minimum severity threshold (focus on errors + warnings)
# Consistent with script-audit.sh Production-Ready threshold (85%+ clean)
severity=warning