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. Without this warning a broken configuration silently falls back to the default settings, and it can be hard to understand why your settings have no effect.

The message names the file 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
The 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 — using the defaults without a configuration file is perfectly fine.

Notes

  • Setting names are matched case-insensitively, and the $schema key is always allowed.
  • 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.
  • 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

Open the alcops.json named in the message and correct the reported problem — fix the JSON syntax, correct the setting name, or resolve the file permission issue. The warning disappears once the file loads cleanly.