The ALCops configuration file could not be fully loaded

Properties
CM0001 Warning Configuration Code Fix Ignore Obsolete

CM0001 warns when an alcops.json configuration file was found but could not be fully applied, or when its declared Extends.Source could not be resolved. The warning explains why the intended configuration is not in effect.

The message names the file or external source and the reason:

The ALCops configuration 'C:\Source\MyApp\alcops.json' could not be fully loaded: unknown setting 'CognitivComplexityThreshold'

When it is reported

SituationEffect on settings
The file exists but cannot be read (I/O or permission error)Defaults are used
The file contains invalid JSON (syntax error, wrong value type, unknown enum value)Defaults are used
A declared Extends source cannot be resolved (unreachable source, HTTP error, timeout, oversized HTTP response, unreadable file, invalid JSON or setting values, rejected URL credentials, invalid source declaration, or inheritance chain)The entire configuration uses built-in defaults; local overrides are discarded too
The local or inherited file is valid JSON but contains an unrecognized top-level setting (for example a typo in the name)All recognized settings still apply; one warning per unknown setting

No warning is reported when no alcops.json exists, or when the local file is empty, whitespace-only, comment-only or JSON null. These cases use defaults. A declared inherited source must still contain a JSON object. Cancelling analysis also does not produce CM0001.

Notes

  • Setting names are matched case-insensitively; $schema and the local Extends declaration are allowed. An inherited file cannot declare its own Extends.
  • The warning has no source location because alcops.json is not part of the compilation. Visual Studio Code shows such diagnostics against app.json.
  • An unreadable alcops.json in the app folder does not fall back to a configuration in a parent directory: the app-level file was intended to win, so ALCops uses the defaults and reports the problem instead.
  • HTTP response content is limited to 1 MiB (1,048,576 bytes), with a five-second timeout. A rejected URL’s username and password are omitted from the diagnostic source.
  • Typos inside nested settings (for example a misspelled key under StatementBlockSpacing) are not detected by this rule; reference the JSON schema via $schema to have your editor validate those.

How to fix

Correct the reported problem in the local configuration or its referenced source: fix the JSON or setting value, restore source access, remove an inheritance chain, or reduce an oversized HTTP response. Only reference sources that the project trusts.

Failed HTTP requests are cached per workspace path for 30 seconds after each failure. Compilations inside that cooldown reuse defaults and CM0001 without fetching again; cache hits do not extend the wait. After connectivity recovers and the cooldown expires, the first new compilation requesting settings can load the source without restarting the language server. Concurrent compilations share that retry, and another failure starts a new cooldown. The original compilation keeps its defaults and diagnostic so its rules use consistent settings. Cancelling a request does not start a new cooldown.

Successfully loaded settings and deterministic configuration errors remain cached for the analyzer session. After correcting malformed JSON, invalid setting values or a source declaration, restart the analyzer process; in VS Code, use Developer: Reload Window. The warning disappears when the configuration loads cleanly.