Skip to content

Commit cc99d83

Browse files
itcmsgrclaude
andcommitted
fix(rebuild): add shellcheck SC2034 directives for exported constants
Constants in nftban_rebuild_classify.sh are used by sourcing scripts (cmd_firewall.sh), not within the file itself. ShellCheck correctly flags them as unused within scope. Add per-line SC2034 disable directives to document intent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 78f01a3 commit cc99d83

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

cli/lib/nftban/core/nftban_rebuild_classify.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,53 @@ set -Eeuo pipefail
2929
_NFTBAN_REBUILD_CLASSIFY_LOADED=1
3030

3131
# Recovery marker path
32+
# shellcheck disable=SC2034 # Constants used by sourcing scripts (cmd_firewall.sh)
3233
readonly REBUILD_RECOVERY_MARKER="/var/lib/nftban/state/rebuild_recovery.json"
3334

3435
# Failure classes (match Go enum in internal/rebuild/types.go)
36+
# shellcheck disable=SC2034
3537
readonly FC_PREVALIDATION_FAILED="PREVALIDATION_FAILED"
38+
# shellcheck disable=SC2034
3639
readonly FC_SNAPSHOT_FAILED="SNAPSHOT_FAILED"
40+
# shellcheck disable=SC2034
3741
readonly FC_APPLY_FAILED="APPLY_FAILED"
42+
# shellcheck disable=SC2034
3843
readonly FC_POSTVALIDATION_REGRESSION="POSTVALIDATION_REGRESSION"
44+
# shellcheck disable=SC2034
3945
readonly FC_POSTVALIDATION_HARD_FAIL="POSTVALIDATION_HARD_FAIL"
46+
# shellcheck disable=SC2034
4047
readonly FC_DAEMON_RESTART_FAILED="DAEMON_RESTART_FAILED"
48+
# shellcheck disable=SC2034
4149
readonly FC_MODULE_RESTORE_FAILED="MODULE_RESTORE_FAILED"
50+
# shellcheck disable=SC2034
4251
readonly FC_MODULE_RESTORE_INCOMPLETE="MODULE_RESTORE_INCOMPLETE"
52+
# shellcheck disable=SC2034
4353
readonly FC_ROLLBACK_FAILED="ROLLBACK_FAILED"
54+
# shellcheck disable=SC2034
4455
readonly FC_AUTHORITY_CONFLICT="AUTHORITY_CONFLICT"
56+
# shellcheck disable=SC2034
4557
readonly FC_BACKUP_MISSING="BACKUP_MISSING"
58+
# shellcheck disable=SC2034
4659
readonly FC_RETRY_EXHAUSTED="RETRY_EXHAUSTED"
4760

4861
# Operation results (match Go enum)
62+
# shellcheck disable=SC2034
4963
readonly OR_SUCCESS="SUCCESS"
64+
# shellcheck disable=SC2034
5065
readonly OR_FAILED_RECOVERED="FAILED_RECOVERED"
66+
# shellcheck disable=SC2034
5167
readonly OR_FAILED_DEGRADED="FAILED_DEGRADED"
68+
# shellcheck disable=SC2034
5269
readonly OR_FAILED_FATAL="FAILED_FATAL"
5370

5471
# Module restore results
72+
# shellcheck disable=SC2034
5573
readonly MR_OK="RESTORE_OK"
74+
# shellcheck disable=SC2034
5675
readonly MR_FAILED="RESTORE_FAILED"
76+
# shellcheck disable=SC2034
5777
readonly MR_INCOMPLETE="RESTORE_INCOMPLETE"
78+
# shellcheck disable=SC2034
5879
readonly MR_SKIPPED="RESTORE_SKIPPED"
5980

6081
# Per-rebuild tracking variables

0 commit comments

Comments
 (0)