Skip to main content
Skip to main content

AG015: Source Directive Path Not Found

PropertyValue
CodeAG015
SeverityWarning
Sincev0.8.0

Description

A # argsh source=<path> directive at the top of a file references a path that does not exist or is not a directory. This directive tells the linter (and LSP) where to search for imported modules. If the path is invalid, import resolution will be incomplete.

Example

This triggers AG015:

#!/usr/bin/env bash
# argsh source=vendor/libs
source argsh

import my-lib.sh

If vendor/libs does not exist relative to the script's directory, AG015 fires.

How to Fix

Ensure the path exists and is a directory:

mkdir -p vendor/libs

Or correct the directive to point to the right location:

# argsh source=lib/

How to Suppress

# argsh disable=AG015
# argsh source=vendor/libs

Or file-wide:

# argsh disable-file=AG015
Was this section helpful?