Skip to content

[FEATURE] Remove redundant SC1091 inline shellcheck directives #125

@WilliamBerryiii

Description

@WilliamBerryiii

Problem Statement

The .shellcheckrc configuration (#116) added a global disable=SC1091 directive. However, 10 scripts still contain inline # shellcheck disable=SC1091 comments that are now redundant. These redundant directives clutter the codebase and may cause confusion about which exclusions are actually necessary.

Proposed Solution

Remove all redundant inline SC1091 directives:

  1. Delete lines containing only # shellcheck disable=SC1091
  2. For lines with multiple codes like # shellcheck disable=SC1091,SC2154, remove only SC1091
  3. Validate ShellCheck still passes on all modified scripts

Alternative Solutions

  • Do nothing: Accept redundant directives (not recommended - causes confusion)
  • Add comment explaining redundancy: Keep directives but document they're redundant (adds more clutter)

Target Components

  • Terraform modules
  • Bicep modules
  • Blueprints
  • GitHub Actions
  • Documentation
  • Other: Shell scripts (10 files in src/starter-kit/ and src/000-cloud/033-fabric-ontology/)

Implementation Ideas

Scripts with redundant SC1091 directives:

Script Path
deploy-dataflows.sh src/starter-kit/dataflows-acsa-egmqtt-bidirectional/scripts/
create-event-grid.sh src/starter-kit/dataflows-acsa-egmqtt-bidirectional/scripts/
deploy-acsa-pvc.sh src/starter-kit/dataflows-acsa-egmqtt-bidirectional/scripts/
create-blob-storage.sh src/starter-kit/dataflows-acsa-egmqtt-bidirectional/scripts/
deploy-cora-corax-dim.sh src/000-cloud/033-fabric-ontology/scripts/
deploy.sh src/000-cloud/033-fabric-ontology/scripts/
deploy-data-sources.sh src/000-cloud/033-fabric-ontology/scripts/
deploy-semantic-model.sh src/000-cloud/033-fabric-ontology/scripts/
validate-definition.sh src/000-cloud/033-fabric-ontology/scripts/
deploy-ontology.sh src/000-cloud/033-fabric-ontology/scripts/

Discovery command:

grep -rn "shellcheck disable=SC1091" --include="*.sh"

Note: 9 other inline shellcheck directives (SC2154, SC2068, SC2046, SC2034, SC2269, SC2088) exist and should NOT be removed - they serve specific purposes.

Additional Context

Benefits

  • Cleaner codebase with no redundant directives
  • Clear distinction between global and intentional local exclusions
  • Easier maintenance - developers don't need to wonder if inline directives are necessary
  • Consistent approach to ShellCheck configuration

Potential Challenges

  • Minimal risk - this is a cleanup task with no functional changes
  • Need to verify no scripts have SC1091 combined with other codes on the same line

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions